Hi,
We have 400 IC of DWM3000 qurvo modules. Some of them working fine but some of them got stuck in hardfault.
i am using stm32l496 +dwm3000 module and use example code provided by qurvo but it goes into hardfault after dwt_readdevid
I run the function() called dwt_probe() and it return DWT_ERROR.
below is my read dev id function which is working fine with the few modules
int read_dev_id(void)
{
int err;
uint32_t dev_id;
int Aret;
/* Display application name on LCD. */
test_run_info((unsigned char *)APP_NAME);
/* Configure SPI rate, DW3000 supports up to 36 MHz */
port_set_dw_ic_spi_fastrate();
/* Reset DW IC */
reset_DWIC(); /* Target specific drive of RSTn line into DW IC low for a period. */
Sleep(2); // Time needed for DW3000 to start up (transition from INIT_RC to IDLE_RC, or could wait for SPIRDY event)
/* Probe for the correct device driver. */
Aret = dwt_probe((struct dwt_probe_s *)&dw3000_probe_interf);
dev_id = dwt_readdevid();
/* Reads and validate device ID returns DWT_ERROR if it does not match expected else DWT_SUCCESS */
if ((err = dwt_check_dev_id()) == DWT_SUCCESS)
{
test_run_info((unsigned char *)"DEV ID OK");
}
else
{
test_run_info((unsigned char *)"DEV ID FAILED");
}
return err;
}
The linker script has changed to include this structure in the “.text” segment of memory like so:
. = ALIGN(4);
__dw_drivers_start = .;
KEEP(*(.dw_drivers))
__dw_drivers_end = .;
- if i read dev id with below function i get correct dev if but still it stuck in dwt_probe function.
dev_id = my_dwm3000_read32bitoffsetreg_packeted(0,0);