Hello, I’m using SPI interface between ESP32-S3 and DWM1000, which is a UWB module. What I want to do is to write a value into the register of DWM1000. DWM1000 is SPI slave. Here’s my code.
id(spi_dwm1000).enable();
uint8_t MTXFRS[4] = {0x80, 0x00, 0x00, 0x00};
id(spi_dwm1000).write_byte(0x8E);
id(spi_dwm1000).write_array(MTXFRS, 4);
id(spi_dwm1000).write_byte(0x0E);
id(spi_dwm1000).read_array(MTXFRS, 4);
ESP_LOGD(“SPI”, “CHAN_CTRL: 0x%02X%02X%02X%02X”, MTXFRS[3], MTXFRS[2], MTXFRS[1], MTXFRS[0]);
I checked the register value but it wasn’t what I wrote.
I’m writing a value into the register 0x0E. In order to write to DWM1000, MSB is needed to be 1 so I wrote 0x8E.
Anyone knows about this problem, please help me.