Hello everyone,
I wrote a little code for my MSP432 to use two software timers on two separate hardware timers.
The first hardware timer runs on SMCLK 3Mhz/64 and counts to 46875 before the interrupt. That is 1 second. And on that timer runs a software timer that counts 2 seconds, and then it triggers a red LED.
The second hardware timer runs on SMCLK 3Mhz and counts to 3000 before the interrupt. That is 1 m second. And on that timer runs a software timer that counts 500 m seconds, and then it triggers a blue LED.
So after i run the program the blue and red LED should both turn off after 4 seconds. But after a few minutes the 2 LEDS get async and i dont know why.
Does someone have an explanation?
I think it's because no 2 hardware timers can be in sync.
I wrote a little code for my MSP432 to use two software timers on two separate hardware timers.
The first hardware timer runs on SMCLK 3Mhz/64 and counts to 46875 before the interrupt. That is 1 second. And on that timer runs a software timer that counts 2 seconds, and then it triggers a red LED.
The second hardware timer runs on SMCLK 3Mhz and counts to 3000 before the interrupt. That is 1 m second. And on that timer runs a software timer that counts 500 m seconds, and then it triggers a blue LED.
So after i run the program the blue and red LED should both turn off after 4 seconds. But after a few minutes the 2 LEDS get async and i dont know why.
Does someone have an explanation?
I think it's because no 2 hardware timers can be in sync.