Re: Soft serial 9k6 for debugging on free GPIO?

Piotr Mienkowski

Hi Martijn,

On 31.05.19 15:53, martijn@... wrote:
We have a prototype utilising the nRF52840 BME340 SoC module. Since we
use a LoRaWAN module and a MAX3485 we used the two 840 uarts for
connecting to these subsystems. But I do have some free GPIOs on the
prototype PCB which I'd like to use as a console when running the
project in debug mode. So I'm looking for a way to have a low-speed
soft-serial taking care of logging. Any pointers, or perhaps other
ways to get logging output (we are using BLE)?
Since nRF52840 is a Cortex-M4 device yet another option that you have is
to use Serial Wire Output (SWO). ARM added it specifically to support
trace/logging. It is a high speed interface with low code footprint /
resource usage. Zephyr logger has SWO backend but you would need to
prepare a PR to add support for Nordic device(s). It shouldn't be too
difficult. At minimum you would need to select 'HAS_SWO' Kconfig option
and - looking quickly at the documentation, there may be things I missed


Join to automatically receive all group messages.