I try to migrate a working code from nRF52832 to nRF5340 with the use of 7002 companion chip for the network part (BLE). However, while I can jump to main and successfully run the program on nRF52, the RTC1_IRQHandler is triggered before I jump to main on nRF5340, and I fall into infinite wfi or even the default NMI handler. It ss because I call a custom function in the IRQ handler that hasn't been initialized yet :
At this point, mTimer is NULL so maybe this is why my functions are being populated weirdly. The thing is, I fall here :
If I don't test mTimer I end up in the default NMI handler forever.
The prj.conf of the nrf52 and nrf53 are very similar.
pjr_nrf5340.conf:
prj_nrf52.conf :
The things that differs the most is that I use the 7002 as companion chip. I know this guy is responsible for some pre-main initializations. I tried to debug the nrf53_sync_rtc sample after adding RTC1_IRQHandler, and I don't have the issue : I first jump into the main, and after the IRQ_CONNECT, I break in the IRQ_Handler.
Can someone explain please? Thank you for you help