Can't change the UDB Timer period in software after enabling interrupt

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

cross mob
lock attach
Attachments are accessible only for community members.
alli_264371
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked

If connect the interrupt component to the "interrupt" pin, it not work at all, but if connect to the "tc" pin it work, but can change the period in software only if make it before the interrupt enable..


I cannot confirm email and add messages due to a bug on your site, the email section is not active
0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

For your first issue "If connect the interrupt component to the "interrupt" pin, it not work at all, but if connect to the "tc" pin it work"

--> Please ensure you have checked "interrupt on TC" in Timer component GUI. Please find the attached project and test it in your board.

Ideally the change of period is independent of the enabling of interrupt. When you change the value of the Period, please note that you have to manually write the counter value to '0' using the Write counter API. Please go through the following KBA for more details.

http://www.cypress.com/comment/305831

Please try this and check once.

Thanks

Ganesh

View solution in original post

2 Replies
lock attach
Attachments are accessible only for community members.
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

For your first issue "If connect the interrupt component to the "interrupt" pin, it not work at all, but if connect to the "tc" pin it work"

--> Please ensure you have checked "interrupt on TC" in Timer component GUI. Please find the attached project and test it in your board.

Ideally the change of period is independent of the enabling of interrupt. When you change the value of the Period, please note that you have to manually write the counter value to '0' using the Write counter API. Please go through the following KBA for more details.

http://www.cypress.com/comment/305831

Please try this and check once.

Thanks

Ganesh

lock attach
Attachments are accessible only for community members.

Hi Ganesh
the timer interrupt work nice, but the period still work strange, it really changed, but if i put the same period value in creator window and in program it work different..

I put the 4 in timer window,work nice, but if i put the 4 again in function-the speed fall to half..

if i put 8 in the psoc creator window ..and check if it real 8 in program,

while(Timer1_ReadPeriod()!=8);

the program enter to infinity loop and no continue..

PS Look the timer period value for the

  • Timer_WritePeriod(period);

function want be 1 less of the real period, for example it I want set the timer period to 4 i write

  • Timer_WritePeriod(3);


I cannot confirm email and add messages due to a bug on your site, the email section is not active
0 Likes