This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC430 communication with RF SoC

I keep getting the following error in RF1AIFERR:

OUTERR

The spec explains this error this way: "Not enough data available for the executed read access". However I have only one access to RF1ADOUTB in my code, and it is on interrupt when RF1AIFIV is RF1AIFIV_RFDOUTIFG.

If I get this interrupt, then reading DOUT should be safe, right? So why am I getting this error?

The error is intermittent, it probably depends on timing (and frequency of occurrence varies with level of compiler optimization).

I could use a hint. When could this error happen, if I don't read DOUT any other place than in the interrupt? I have also protected the communication so that no new communication is started if there is already one on-going.

Oh, and I set RFDOUTIE just after writing to RF1AINSTR1B (auto-read feature). The value written to this register is RF_SNGLREGRD + address.

  • And I don't read RF1ASTATx either.

  • In a version of my firmware that does NOT read from RF1A, OUTERR appears in my RF1A interrupt routine while burst sending setting data to the SoC.

    Here is the relevant case of the switch on RF1AIFIV:

    case RF1AIFIV_RFDINIFG:
        if (tx_data_counter < local_data_length) {
            if ((RF1AIFERR & OUTERR) != 0) { // ---------DEBUG
                trap();
            } // ----------------------------------------end DEBUG
    
            RF1ADINB = tx_data_buffer[tx_data_counter++];
    
            // DEBUG
            if ((RF1AIFERR & OUTERR) != 0) { // ---------DEBUG
                trap();    // <------------------- falling into that trap!
            } // ----------------------------------------end DEBUG
    
        } else {
            write_terminate();
        }
        break;

    The assembly looks fine, I think, since RF1AINSTRW is the same as RF1ADINB as long as it's a byte operation:

    if ((RF1AIFERR & OUTERR) != 0) {
     0083BA    B2A2 0F06          bit.w   #0x4,&RF1AIFERR
     0083BE    2802               jnc     0x83C4
        trap();
     0083C0    13B0 AFEA          calla   #trap
                RF1ADINB = tx_data_buffer[tx_data_counter++];
     0083C4    421F 1C9E          mov.w   &tx_data_counter,R15
     0083C8    4F0D               mov.w   R15,R13
     0083CA    531D               inc.w   R13
     0083CC    4D82 1C9E          mov.w   R13,&tx_data_counter
     0083D0    421D 1C9A          mov.w   &tx_data_buffer,R13
     0083D4    5F0D               add.w   R15,R13
     0083D6    4DE2 0F10          mov.b   @R13,&RF1AINSTRW
    if ((RF1AIFERR & OUTERR) != 0) {
     0083DA    B2A2 0F06          bit.w   #0x4,&RF1AIFERR
     0083DE    2825               jnc     0x842A
        trap();
     0083E0    13B0 AFEA          calla   #trap
    

    Depending on optimization level, the error occurs after having sent 7 to 9 bytes (of 47) to the SoC. It seems constant at any given optimization level.

    It is always on the second trap that the program gets stuck.

    The settings are sent a couple of times a second, and the error occurs after some minutes of running.

    As said earlier, this is in an ISR, so the interrupts are globally disabled.

    My conclusion is that writing to RF1ADINB can somehow trigger OUTERR. From the doc, it seems to me that OUTERR is only supposed to get set on erroneously reading RF1ADOUTx.

    Please someone, point out how this writing could set OUTERR?

  • Hi ,
    I am having similar issues. Can you please let me know, if you had resolved this or have any work around. THanks in advance...

**Attention** This is a public forum