I am trying to exchange string data between STM32F4 and DWM1001C-dev Board using either I2C or UART serial communication protocols .I didnt find a way to control upcoming UART data terminal only execute the upcoming uart message even when the board is flashed is usb interface and J10 UART are the the same UART?
When using I2C API (dwm_i2c_read) and (dwm_i2c_write) i couldnt print the received i even didint know if that data is being received when data register of upcoming data is empty
The question is is it possible to exchange serial data between dwm1001C-dev board with other board or external sensors and if it is the case how can i proceed and if there is an working example of someone trying it before.
I suppose that you are using PANS firmware. It is not exactly clear to me what you are trying to do.
Lets start from beginning - Do you have DWM1001C-DEV with flashed PANS firmware? If so can you enter into the shell via UART over USB?
Please note that if you wan to enter into the shell you need to hit enter twice fast.
Yes i can access to shell mode via USB and everything works fine for the PANS firmware
my question is I’am trying to send custom data(name/street address/zipcode) from STM32F4 to dwm1001c-dev board using UART or I2C API ,is it possible and how can i do it
1–when trying UART communication protocol the data is being transmitted and visualised through dwm1001c-dev board terminal even if the dwm1001c-board is flashed with no firmware So how can i control the upcoming data and store it in a buffer? how can i access it using UART custom C API and not through shell terminal
2–I tried using I2C communication protocol and i cant get my hand on the upcoming data nothig is stored in the data buffer i even used examples in the dwm-api-test on board example and the format if the firmware api guide but i cant know if the data is transmitted from stm32f4 to dwm1001c or after the transmission somethoing went wrong
the following is the lines of code used on SEGGER for custom API
code I2C test number1
uint8_t i2cBuf_transmit_R = 0x01;
uint8_t i2cBuf_transmit_W = 0x00;
uint8_t i2cBuf_receive ;
data = i2cBuf_receive;data <<= 8;
data |= i2cBuf_receive;data <<= 8;
data |= i2cBuf_receive;
//data = i2cBuf_receive| (i2cBuf_receive <<8) | (i2cBuf_receive <<16);
printf(“la valeur du distance est\n%u”,*(i2cBuf_receive+1));
or code I2C test number 2
const uint8_t addr = 0X57; // some address of the slave device
data2 = 0xAA;
data2 = 0xBB;
dwm_i2c_write(addr, data2, 2, true);
dwm_i2c_read(addr, data, 2);/
this is the code responsible of sending data from STM32F4
i’am trying to send data from stm32f4 to dwm1001c-dev through J10 I2C pins
give me a couple days - I might be able to dig out i2c example. But its been a couple years and Im not sure if I can find it.
The main problem is that the i2c is shared with accelerometer which PANS is using. Try to disable the movement detection.
regarding the uart: eck this example mdek\DWM1001\Source_Code\DWM1001_on_board_package\DWM1001_on_board_package_R2.0.zip\dwm\examples\dwm-uart\ in the MDEK zip package.
i will try to disable the movement detection and if you have any tips or old thread on how to dot i will be grateful
I tried digging into mdek\DWM1001\Source_Code\DWM1001_on_board_package\DWM1001_on_board_package_R2.0.zip\dwm\examples\dwm-uart\ in the MDEK zip package
the problem is i cant get my hand on the upcoming data and in the API example the data buffer is being filled with the data being written by me on the terminal
if I recall it correctly then the nRF52832 have only one UART peripheral. So you cant have shell + your uart operational at the same time. But the segger support virtual UART over the SWD. Try to look after it.