Most of the examples and posts are about the libuarte async driver, but I am using the basic libuarte_drv (not async) and running into difficulty. Without any concrete example implementations I've based my development on the SDK's libuarte async example. I've attached an archive below including a simple Make project to reproduce the behaviour I am seeing. In the archive is also a README with more details and instructions but I'll outline the issue here as well.
My setup:
- Ubuntu 20.04
- GNU Make v4.2.1
- arm-none-eabi-gcc v10.2.1
- Nordic SDK v17.0.2
- nRF52840-DK
- bootloader: 0244_sam3u2c_bootloader_update_0x5000
- firmware: J-Link_OB-SAM3U128-V2-NordicSemi_170724
- Python v3.8.8
Use case:
I am trying to create an application that communicates with a host PC via UART, the host code is written in Python. The rest of the device-side application is in C++ so I've made my main file C++ instead of C to try and keep this minimal example realistic for my needs.
Problem:
I cannot seem to receive values from the host PC on the device, whenever I read from the rx buffer I just get zeros. I've tested the device tx and the host receives the correct values which narrowed it down to how I'm receiving/reading values on the device. I am assuming I have a problem in my config or how I am handleing the rx start/stop. I am also unclear if and where I need to use the nrf_libuarte_drv_rx_buf_rsp() function given this is not async.
Please take a look at the attached project. If there is nothing specific that jumps out I would also appreciate some debug tips or tool suggestions!
Thank you!