I´m trying to use the API. Calling dwt_probe((struct dwt_probe_s *)&dw3000_probe_interf) returns -1 (the device answers over SPI 0x02 0x03 0xCA 0xDE).
The dw_driver section is inserted in the Linker script.
Hi, I’m having the same problem as you, dwt_probe((struct dwt_probe_s *)&dw3000_probe_interf) returns -1 (the device answers over SPI 0x02 0x03 0xCA 0xDE). Can you share your solution? thank you
I ported it through 32, and the code dwt_probe((struct dwt_probe_s *)&dw3000_probe_interf) returns -1, but the device ID read from SPI is 0x02 0x03 0xCA 0xDE.
You can take a look at DW3XXX_Software_API_Guide_2p2.pdf under DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Docs which mention you need to add symbols below to your linker script in order to add DW device descriptor to .text segment of flash memory,
…
. = ALIGN(4);
__dw_drivers_start = .;
KEEP(*(.dw_drivers))
__dw_drivers_end = .;
…
During DW initialization phase, dwt_probe() try to fetch device descriptor, if no available device descriptor found, DW driver panic & return -1.
Check if you have added these symbols to linker script, if yes, .map file should include symbols details like
…
0x00000000080001b0 __dw_drivers_start = .
*(.dw_drivers)
.dw_drivers 0x00000000080001b0 0x1c C:\Users\ty080253\Downloads\build_dir\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\API\Shared\dwt_uwb_driver\lib\libdwt_uwb_driver-m4-sfp-6.0.7.a(dw3000_device.c.obj)
0x00000000080001b0 dw3000_driver
.dw_drivers 0x00000000080001cc 0x1c C:\Users\ty080253\Downloads\build_dir\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\API\Shared\dwt_uwb_driver\lib\libdwt_uwb_driver-m4-sfp-6.0.7.a(dw3700_device.c.obj)
0x00000000080001cc dw3700_driver
.dw_drivers 0x00000000080001e8 0x1c C:\Users\ty080253\Downloads\build_dir\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\API\Shared\dwt_uwb_driver\lib\libdwt_uwb_driver-m4-sfp-6.0.7.a(dw3720_device.c.obj)
0x00000000080001e8 dw3720_driver
0x0000000008000204 __dw_drivers_end = .
…
if you are not seeing these symbols in .map file, go back to check your linker script.
} >> FLAS。I wrote this in flash, but when downloading the program Cortex_M4_0: File Loader: Verification failed: Values at address 0x0057FFA8 do not match Please verify target memory and memory map. Download not enter