User Manual v2.18v LDELOAD

Hello all,

Table 4 in the user manual states that to load the LDE microcode, you must first write 0x0301 to register address 0x36:00 (PMSC_CTRL0) before setting the LDELOAD bit; however, does this alter the value of bit 8 which is reserved? When I attempted to do this, all register reads from then on returned 0xFFFFFFFF so I think I am correct in thinking this is a typo.

If I am mistaken and I’m missing something obvious then please let me know. But if not what exactly is the correct procedure of register accesses to load LDE microcode?

Any information on this will be very much appreciated and many thanks in advance!

Hello,

this is not a mistake. its an undocumented register section.

also make sure you use the correct procedure:

1.) first set your SPI transaction speed to less than 3MHz
2.) then set the dw1000 system clock to XTI with a first write transaction 0X01
3.) then set bit number 8 in a second write offset transaction 0X03

my guess for your issue with respect to reading 0XFFFFFFFF is that your SPI speed is to high or that you do not activate bit 8 in separate steps.

1 Like

Hey,

Thank you so much for getting back to me, that’s super helpful! :slight_smile:

This switches DW1000 into XTI mode. In this mode it can operate on 3 MHz SPI clock only.
Try to work on 3 MHz SPI clock while do initialization.
The good practice is to split your code into two parts: init() and config(), then use 3MHz for Init and 10-20MHz for config.

1 Like

Thank you so much for your input, Dan! I really appreciate the help - I’m very much new to the embedded programming world!

Apologies in advance for the open-ended question, but what exactly goes in each block?

For the 3MHz init block is it just loading the LDE microcode from ROM to RAM and then Loading LDO tune from the OTP then copying over the 40-bits to sub-register 0x28:30 if it returns a non-zero value.

Then for the 10-20MHz config block is it just all other general register accesses for device configuration?

I’m currently using a 2MHz SPI clock for init and 8MHz for config and so far I’m having difficulties with register access in the initialisation phase.

If you write your own library look at the source code below:

Init and Config functions is in deca_device.c file.

Full an oficial software package is here:
https://www.decawave.com/wp-content/uploads/2019/01/dw1000_api_rev2p14.zip

The calling sequence looks like:

   reset_DW1000(); 
   	
   spi_set_rate_low();
   dwt_initialise(DWT_LOADNONE)
   spi_set_rate_high();
   
   dwt_configure(&config);

Amazing, thank you so much for your help!