Transfer data using I2C/UART pins

I am trying to exchange string data between a STM32F4 board and a DWM1001C-dev board using either I2C or UART serial communication protocols. However, I am facing some difficulties.

When using UART communication, I am unable to control the incoming data as I want to execute the upcoming UART message only when I want to, even when the board is flashed. Additionally

Furthermore, when using I2C API (dwm_i2c_read) and (dwm_i2c_write), I am unable to print the received data, and I am not sure if the data is being received when the data register of upcoming data is empty.

So, my question is: Is it possible to exchange serial data between the DWM1001C-dev board and other boards or external sensors using UART or I2C protocols? And if so, how can I proceed? Also, if there are any working examples of someone who has tried it before, could you please share it with me?

please dont post duplicate topics: