Hi,
This is related to this:
https://devzone.nordicsemi.com/f/nordic-q-a/60464/c-pc-app-development-with-nrf52840-dongle
I am now testing the UART communication between the nRF52840 (using eval board ISP1807), which is connected over UART to another MCU (controlling sensors).
The Nordic chip is running the ble_app_uart.
I am getting unstable data arriving at my main MCU. It seems some initialization/synchronization issue between the two MCUs.
I'm running both MCUs in debug, and cannot determine why the Nordic is sending other data than expected.
Questions:
1. Is the uart_init() in the main enough? When restarting app, is this call enough, or any other reset/uninitialize call is required? How can i make sure UART buffers are empty during app initialization?
2. I see that printf() also calls the uart_put/get functions. This of course will cause contention. So I tried commenting out the uart calls in file retarget.c, but strangely, it seems that causes the UART to stop altogether. How should the retarget.c be handled?
Thanks, Moshe