Announcements
Community Announcement : Welcome to the NEW Cypress Developer Community.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

alli_264371
Contributor

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
VenkataD_41
Moderator
Moderator

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
VenkataD_41
Moderator
Moderator

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

alli_264371
Contributor

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