cancel
Showing results for 
Search instead for 
Did you mean: 

Proper sequence to exit LDCR mode for the SPIRIT1?

dgardner88
Associate II
Posted on May 10, 2017 at 08:14

Hello,

What is the recommended procedure to exit (or disable) LDCR mode for the Spirit1?

The documentation has the start up procedure for RX, but no mention of start up for TX or the disable procedure for both.

http://www.st.com/content/ccc/resource/technical/document/application_note/47/50/91/3a/f5/fd/4d/c1/DM00068699.pdf/files/DM00068699.pdf/jcr:content/translations/en.DM00068699.pdf

 

I have tried several variations of the following code however the Spirit1 occasionally (but not always) reports MC_STATE = 0x20 or 0x53 or 0x29 during the status refreshes.

    SpiritCmdStrobeFlushTxFifo();

    SpiritTimerLdcrMode(S_DISABLE);

    SpiritTimerLdcrAutoReload(S_DISABLE);

    SpiritCmdStrobeSabort(); //In case the Spirit1 is in TX or RX

    do

    {

    SpiritRefreshStatus();

    }while(g_xStatus.MC_STATE==MC_STATE_RX || g_xStatus.MC_STATE==MC_STATE_TX);

    

    SpiritCmdStrobeReady(); //In case the device is sleeping

    

    do

    {

    SpiritRefreshStatus();

     }while(g_xStatus.MC_STATE!=MC_STATE_READY);
1 REPLY 1
dgardner88
Associate II
Posted on May 15, 2017 at 01:27

Investigating this further, it appears that after setting the LDCR mode bit to 0 (disabling LDCR) the SPIRIT1 stays in sleep mode until a READY command is issue.

Upon issuing the READY command the SPIRIT1 wakes and then begins to transmit a packet regardless of whether anything is loaded into the TX FIFO. This occurs even if the SPIRIT1 has been skipping TX cycles due to the TX FIFO being empty (expected behavior according to the datasheet). I have primarily been testing with STack packet format with auto-ack enabled.

I have not figured out a work around for this yet, but am planning to try setting PA to 0 and datarate to max prior to this transmission, and then resetting those after the unexpected transmission. (same process for the dummy transmission described in the errata sheet section 1.4)