I am evaluating the nRF5340, but cannot run a simple register based interrupt. Within nRF connect v1.2.0, I can find vector tables for nRF52840, and many other parts, but nothing for nRF5340.
The chip is working OK, but the interrupt routines are not being called. Does this sort of code, that works great on the nRF52840 (our current solution) work on nRF5340?
Any help appreciated! BTW we cannot use zephyr. We have been successful since the introduction of nRF51822, and through nRF52840 programming using registers, works great, and want to continue, but maybe we have to stop with 52840?
void setupTimer(void) {
NRF_TIMER2_S->TASKS_STOP = 1;
NRF_TIMER2_S->MODE = TIMER_MODE_MODE_Timer;
NRF_TIMER2_S->BITMODE = TIMER_BITMODE_BITMODE_32Bit;
NRF_TIMER2_S->PRESCALER = 0;
NRF_TIMER2_S->TASKS_CLEAR = 1;
NRF_TIMER2_S->SHORTS = 1;
NRF_TIMER2_S->CC[0] = 1000;
NRF_TIMER2_S->INTENSET = (1UL << TIMER_INTENSET_COMPARE0_Pos);
NVIC_EnableIRQ(TIMER2_IRQn);
NRF_TIMER2_S->TASKS_START = 1;
}
void TIMER2_IRQHandler(void) {
NRF_TIMER2_S->EVENTS_COMPARE[0] = 0;
}