This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C51 - Using Timer 5 on C8051F138X (ISR not firing)

Hi all,

I'm having a problem with something that should be simple: getting a Timer5 ISR to fire on a C8051F1380 MCU.

This being my first time using 8051 (I normally use PICs or Cypress PSoC5 controllers) I'm not sure what I'm doing wrong.

The Timer SFRs are set up as follows:

I'm setting up the timer as follows for a 48MHz SYSCLK (divided by 12) in a Timer_Init() function:



I am enabling the timer on a button press and can confirm the button press code is firing correctly:

The ISR itself is meant to count 5 seconds to set a flag for for an OSD timeout before disabling the timer:

Any thoughts/advice is greatly appreciated.  Not sure what I'm getting wrong here.

Thanks in advance!

0