blocked receive

Hi to all

I’m running a DW1000 application and now i have a problem to ping multiple anchor after a wake up from sleep mode.

I make this sequence.

  • turn on the board

  • Send a single message to the all the anchor just to identify me and receive configuration data and this parts work fine

  • go to sleep both DW1000 and microcontroller, to do this i use this api call for the DW1000

      dwt_configuresleep(DWT_PRESRV_SLEEP | DWT_CONFIG, DWT_WAKE_CS | DWT_SLP_EN);
  • After 2 second i wake up microcontroller and DW1000 with this api for DW1000, during the sleep i never remove power to the DW1000

     dwt_spicswakeup(dummy_buffer, DUMMY_BUFFER_LEN);
     After the wakeup reconfigure the dw1000
  • Start a three way range exchange with four anchor but just the first one work the other stop when DW1000 will receive the anchor answer.
    my sequence is:
    Send start ranging message to the anchor (this message works in all the four case)

    Receive the anchor answer to calculate timesamp (this message is received only first time), seem that my DW1000 receive somethings because the EXTRXE pin go LOW before the expiration of RXTIMEOUT but the RXDFR bit of status reg is not set while is set RXPRD,
    RXSFDD, LDEDONE and RXPHD bit. I see also that the EXTTXE pin of the anchor go high before the RXTIMEOUT.

    Send back the final message to calculate distance (also this works just the first time due to the fail of previous message)

If i don’t go to sleep all works fine and also if i put to sleep just the DW1000 (not the micro) all works fine but if place both to sleep i have this problem.

Have any suggest?

There is a local structure in deca_device.c … what happens to this structure when micro goes asleep? Do you reinitialise this structure?

The DW driver assumes this structure is not lost during application operation. It is initially populated with dwt_initialise and then dwt_configure. If DW is using sleep, you should not need to call dwt_initialise and dwt_configure after wake up, however if the local structure is lost you may need to… or write a new function to restore the local structure.

Dear zoran

thank you for the answer, you are right the problem is with this structure that was lost after the reset. Moving this structure to a RAM area not clear from reset solve the problem.

Thank you again