Hello everyone,
I am working with nrf connect sdk toolchain v2.6.1.
My project requirements are as follows:
- 1 MBaud UART Async API
- Two Modes for UART RX
- fill buffer rx buffer with fix len
- timeout after 200 µs after last byte received (then read out of buffer)
- I will have BLE activated in later version, but as of now all testing was without BLE.
I read through some dev zone posts and my understanding so far is as follows:
- max baud rate is 1 MBaud for nRF52840 (specification)
- high baud rate can be critical with BLE active due to interrupts of BLE and time required. However, with nRF52 SDK v17.1.0 I had no problems with both.
- when going to 1MBaud I found information in dev zone that HW counting of incoming bytes might be necessary instead of SW counting as it is done by default
Samples I checked:
- lpuart - uses different API, so not applicable for me
- ble peripheral uart - does not have 1 MBaud UART
So far I have tested the following with zephyr async uart api:
- up to 460800 Baud
- RX with timeout works perfectely
- RX with fix buffer len, works perfectely
- > 460800 Baud
- RX with timeout, less bytes than visible on RX line are being received
- RX with fix buffer len, incoming bytes are not correct
My questions:
- there are zephyr guides on how to use UART APIs and some advice, but there seem to be some special requirements for nordic devices. Is there an offical NordicGuide for pushing UART with ASYNC API to 1 MBaud reliably?
- when going through dev zone I found several posts addressing the issue with different KConfigs to use. However, none of them seem to work for me so I guess as most posts are already a little older, that some of them are outdated. Do you have a list of KConfigs which clearly outline the usage of each? During build process I often get error messages or warnings about KConfigs not being used corretly, but the referenced webpages often do not have any useful information linking to almost empty pages.
- Is it recommended by Nordic to use nordic uart driver instead of zephyr for 1 MBaud? The few posts discussing zephyr API or nrfx driver suggested to stick to zephyr API.
If needed I can share details about my project setup and error messages. But as of now I would first like to know if there are any resources out there already.
Thanks for any help!
Markus