Reset a timer in one shot mode | Cypress Semiconductor
Reset a timer in one shot mode
I have a one shot timer that I want to start multiple times on my demands in software. I have the following setup
For TopDesign see attach picture.
The isr code:
/* Set the flag variable */
toggle_flag = 1;
the main code:
CyGlobalIntEnable; /* Uncomment this line to enable global interrupts. */
if(toggle_flag == 1)
toggle_flag = 0;
But it will only goes into the isr once (because it is a one shot timer). How do I get it to go into the isr multiple time? what did I do wrong?
An other thing in the datasheet for the timer it state the following but it does make complete sence to me can anyone explain?
"Note In order to be sure that One Shot mode does not start prematurely, you should use a
Trigger Mode to control the start time, or use some form of software enable mode (Software
Only or Software and Hardware)."