PSoC5LP : How to use SysTick timer

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Dear Sirs and Madams,

We would like to use SysTick Timer of PSoC5LP, However I can't use it well.

Is there a sample project that turns on the LED with a SysTick timer interrupt?

Regards,

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
bezobraznic
Level 2
Level 2
25 sign-ins 10 likes given 10 sign-ins
3 Replies
lock attach
Attachments are accessible only for community members.
bezobraznic
Level 2
Level 2
25 sign-ins 10 likes given 10 sign-ins

Use this one!

MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

ALMe-san,

It was very helpful.

Thank you!

Regards,

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

MaMi,

This is old-fashioned style:

#define SYSTICK_INTERRUPT_VECTOR_NUMBER 15u // hard vector

#define SYSTICK_MAXVAL 0x00FFFFFF //max allowed SysTick counter value is 24bit

//==============================================================================

// Interrupt SysTick.

//==============================================================================

CY_ISR(SysTick_ISR)

{

    //SysTick->CTRL = 0;   // stop counter (if needed)

    `//Do something...

}

CyGlobalIntEnable;

// Initialize SysTick timer and point the Systick vector to the ISR

CyIntSetSysVector(SYSTICK_INTERRUPT_VECTOR_NUMBER, SysTick_ISR);

// start timer, will fire interrupt after 10000 BUS_CLK ticks

SysTick_Config(10000);  // max value is 0x00FFFFFF

see also Using the SysTick Timer in PSoC® 4 – KBA91374

/odissey1

0 Likes