cancel
Showing results for 
Search instead for 
Did you mean: 

SPC560D40L1: Timer

harsh2
Associate II
Posted on May 23, 2016 at 11:21

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 #pit
2 REPLIES 2
procolo
Senior
Posted on May 24, 2016 at 10:47

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=false
harsh2
Associate II
Posted on May 31, 2016 at 07:10

Thanks a lot Procolo... it works...

Regards

Harsh