2016-05-23 02:21 AM
Dear All
I want to rum a timer in my MCU: SPC560D40L1.I am using SPC 5studio.Please advise, if i can generate the code for any specific duration timer or what documents i should refer to rum a timer.Awaiting for your kind reply.Thanks in advance !!Harsh #bolerod #pit2016-05-24 01:47 AM
Hi Harsh,
you can use PIT timer. It's an array of timersthat can be used to raise interrupts. please refer to reference manual RM0045 chapter Your Platform has 4 timers one of which is used by spc5studio for system tick generation, so you can use PIT1 for your purposes. Attached you can find a main.c explaining how to configure and manage interrupt coming from pit1. To try it, import RLA SERIAL test app using the wizard and change the main.c file with this one. Please note that starting from next release, PIT driver will be included in spc5studio , so you'll be able to configure it using the graphical interface. Regards, Procolo ________________ Attachments : main.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtgI&d=%2Fa%2F0X0000000aVg%2F7x47G2_IHQoSnUE6pU1O1YBOSOdfJU7hvZMsY_.2GSw&asPdf=false2016-05-30 10:10 PM