Hello,
My program tends to gets stuck once and a while:
Using a debugger I've found out that it happens when trying to read the IOCFG2 state:
RF1AINSTR1B = (IOCFG2 | RF_SNGLREGRD);
while (!(RF1AIFCTL1 & RFDOUTIFG)); <--- Infinite loop !!!
I've tried to use a timeout counter and then continue, but then I get the same phenomena when I try to write the IOCFG2:
RF1AINSTRB = (IOCFG2 | RF_SNGLREGWR); // Send address + Instruction
RF1ADINB = value; // Write data in
__no_operation();
while( !(RF1AIFCTL1 & RFSTATIFG)) //<--- Infinite loop !!!
When I try again to use a timeout counter and to continue, the program reaches the start label (I think that it indicates a BOR...?)
The RF1AIFERR sometimes gets 0x4 or 0x5 or 0x2 (OPERR, OUTERR)
At the last time I've noticed that the SYSRSTIV is 0x2 (BOR)
Do you have an idea why it happens, and how to debug / solve this issue?
Thanks,
Lior.