Hello
I'm using CC430F5135 for my device and it is configured as an end device to communicate with another end device. I had it worked really well previously until today it just stopped working. I used CCS step in feature to debug it and found that the microcontroller got trapped in a while loop. More specifically, when it's executing SMPL_Init(sRxCallback), it went to the MRFI_Init(void) function, and then the MRFI_STROBE_IDLE_AND_WAIT() function, this is just a simple function to put the radio in idle state, but the microcontroller got trapped by this while loop: while ((RF1AIN & 0x04) == 0x04), which means that the radio is in sleep state and RF_readyn signal is always 1. Here is the code for MRFI_STROBE_IDLE_AND_WAIT() function, line 40 the trapped while loop. Does anyone encountered this kind of situation before? Is it because that the radio core is somehow damaged and it cannot be waked up by the SIDLE strobe? Thanks for any possible help!
uint8_t mrfiRadioInterfaceCmdStrobe(uint8_t addr) { uint8_t statusByte, gdoState; mrfiRIFIState_t s,a,b; /* Check for invalid address. * 0xBD is for SNOP with MSP set to read the bytes available in RX FIFO. */ MRFI_RIF_ASSERT( (addr == 0xBD) || (addr >= RF_SRES) && (addr <= RF_SNOP)); /* Lock out access to Radio IF */ MRFI_RIF_ENTER_CRITICAL_SECTION(s,a,b); /* Clear the Status read flag */ MRFI_RADIO_STATUS_READ_CLEAR(); /* Wait for radio to be ready for next instruction */ MRFI_RADIO_INST_WRITE_WAIT(); if ((addr > RF_SRES) && (addr < RF_SNOP)) { /* buffer IOCFG2 state */ gdoState = MRFI_RADIO_REG_READ(IOCFG2); /* c-ready to GDO2 */ MRFI_RADIO_REG_WRITE(IOCFG2, 0x29); RF1AINSTRB = addr; /* chip at sleep mode */ if ((RF1AIN & 0x04) == 0x04) { if ( (addr == RF_SXOFF) || (addr == RF_SPWD) || (addr == RF_SWOR) ) { /* Do nothing */ } else { /* c-ready */ while ((RF1AIN & 0x04) == 0x04); /* Delay should be 760us */ Mrfi_DelayUsec(760); } } /* restore IOCFG2 setting */ MRFI_RADIO_REG_WRITE(IOCFG2, gdoState); } else { /* chip active mode */ RF1AINSTRB = addr; } /* Read status byte */ statusByte = RF1ASTAT0B; /* Allow access to Radio IF */ MRFI_RIF_EXIT_CRITICAL_SECTION(s,a,b); /* return the status byte */ return statusByte; }