SPI, Uart interface not working in DWM3001c module

I had a custom board with DWM3001c module I am trying to interface dwm3001c module an stm32 processor using SPI, SPI2 is set as master for the communication, While debugging the process is stuck on NRF_BREAKPOINT_COND in the app_error_weak.c file. I have also tried to make an UART connection between stm32 and DWM3001c module, data is not received at the stm32 processor. What will bet the issue we were facing. Can you please suggest a solution.

Hi @shahas
the DWM3001C is delivered without any firmware. So you need to flash it with some firmware first to have any communication over SPI/UART.


Hi @leapslabs
Thanks for your reply, I had already flashed the firmware by modifying the DWM3001CDK-DW3_QM33_SDK_CLI-FreeRTOS. Successfully tested the TWR by using this SDK. Now we were looking to take the distance value to the STM32 processor in order to send this value to the internet. Enabled SPI2 as master in SDK_CONFIG.H file. SPI init and sending code is given as follows.
void spi_init(void)
nrf_drv_spi_config_t *spi_config;

spi_config->sck_pin = NRF_GPIO_PIN_MAP(0, 31);
spi_config->mosi_pin = NRF_GPIO_PIN_MAP(0, 27);
spi_config->miso_pin = NRF_GPIO_PIN_MAP(0, 7);
spi_config->ss_pin   = NRF_DRV_SPI_PIN_NOT_USED;  // pin driven manually, not by the driver
spi_config->irq_priority = (APP_IRQ_PRIORITY_MID - 2);
spi_config->orc = 0xFF;
spi_config->frequency = NRF_SPIM_FREQ_4M;
spi_config->mode = NRF_DRV_SPI_MODE_0;
spi_config->bit_order = NRF_DRV_SPI_BIT_ORDER_MSB_FIRST;

// Configure the chip select as an output pin that can be toggled
nrf_drv_gpiote_out_init(Stm_SPI_CS, &out_config);
APP_ERROR_CHECK(nrf_drv_spi_init(&spi, &spi_config, spi_event_handler, NULL));


void spi_send_data(uint8_t *data, size_t length)
APP_ERROR_CHECK(nrf_drv_spi_transfer(&spi, data, length, NULL, 0));