Hello,
I am running a 430F5137 MCU using 32768Hz Crystal, and a 26MHz crystal for RF.
The code occasionally gets stuck, especially when MCU is located in an area of noisy RF (there are a lot of units which are scheduled to transmit, more or less at the same time).
I've used a debbuger, and found out that the code is stuck in an infinite loop while trying to perform a reading of the IOCFG2 register:
uint8 ReadSingleReg(uint8 addr)
{
uint8 data_out;
// Check for valid configuration register address, 0x3E refers to PATABLE
if ((addr <= 0x2E) || (addr == 0x3E))
// Send address + Instruction + 1 dummy byte (auto-read)
RF1AINSTR1B = (addr | RF_SNGLREGRD);
else
// Send address + Instruction + 1 dummy byte (auto-read)
RF1AINSTR1B = (addr | RF_STATREGRD);
while (!(RF1AIFCTL1 & RFDOUTIFG) ); // <====== STUCK FOREVER.....
data_out = RF1ADOUTB; // Read data and clears the RFDOUTIFG
return data_out;
}
Here are some registers values:,
RF1AIFERR = 0x0005 ==> Output data not available error flag (OUTERR) + Low core voltage error flag (LVERR)
RF1AIFERRV = 0x0002 ==> Low core voltage error (LVERR)
RF1AIFCTL1 = 0x0034
RF1AIFIV = 0x0
RF1AIV = 0x0
RF1AIE = 0x0
RF1AIES = 0x0200
SVSMLCTL = 0x0
PMMCTL0 = 0x9680 ===> VCORE level 0, PMMHPMRE = 1
SVSMHCTL / SVSMHCTL = 0x0
As I understand from the error, there might be a problem with the core voltage (Unless this is false alarm as indicated in RF1A6). However, I've set it in an earlier phase to level 2 (SetVCoreUp(2)), so according to the datasheet it should be enough.
1. Does the "LVERR = 1" has something to do with RF1A6?
2. What can explain the phenomena specifically, when acting in a noisy environment (all other MCU are transmitting at once)?
Suggestions, anyone? Is there more information I can provide in order to get to the bottom of this?
Thanks,
Lior.