The DW1000 SPI protocol doesn’t include a length at the beginning of the message. There is a single byte header specifying read/write status, any additional header bytes for subaddressing, and the primary address. So if I write an arbitrary sequence of bytes into, say, register 0x21, which will take any number of bytes up to 41, how does the device know when the message is complete?
Does it just keep accepting bytes and writing them (including any buffer overflow risk) as long as the SPI control line is held low? Does raising the control line back to high signal that the message is complete?
What sort of delay is required after pulling the control line low before sending data and after sending the last data before raising the line back high again? I’ve tried no delay up through 100ms and see how difference in behavior.
I cannot get SPI to work reliably. I can read. For example, I can get ‘DECA0130’ from the first register, but writing basic numerical sequences into 0x21 (which appears to be the recommended register for SPI testing) is extremely sporadic. Sometimes the the data gets in there (as confirmed by a subsequent read) and sometimes it doesn’t…and sometimes it writes some of the sequence but not the entire sequence. It doesn’t matter what baud I set. I have tested two separate DWM1000s from two separate SPI controllers and I’m getting this behavior consistently. It isn’t broken enough to be totally broken (as stated above, I can read fine, and sometimes it writes a few bytes successfully, so it’s configured correctly enough to work some), but it doesn’t work reliably, which is weird (I would expect total failure if I was doing something wrong).
I’m flummoxed. Other than baud rate, polarity, phase (standard SPI parameters), and configuring the single byte header, which is a very simple piece of data to put together, I don’t know what else I have control over.