This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debugging data from nrf51822

Hello Everyone,

I am new to BLE world. Currently using MDBT40 which has nrf51822 as core: www.raytac.com/.../MDBT40-ANT-D.pdf

I am following this repo:github.com/.../arduino-nRF5 in which nrf51822 can be programmed using arduino IDE. Nrf is running S130 and is being programmed using J-link with SWD programming.

Arduino IDE provides serial monitor to debug data which is printed using Serial.print() function but it doesn`t works with nrf51822 which is programmed using J-link. Is there any software in which I can print data which needs to be debugged? I tried nrf-sniffer and followed the documentation, however it get stuck in between and none of the device is visible. Am I on right track? Are there any other tools to monitor the data?

Thanks in advance

Parents
  • nRF Sniffer is for radio interface, that won't help with UART. If you have any mean how to connect to UART (serial) PINs on your board (e.g. popular FTDI "serial to USB" cable) then you can observe debug print outs in any terminal (e.g. PuTTY).

  • Well there are two ways how to use or repurpose SDW "programming" PINs but I'm afraid none o these will be available for you (at least from your description it sounds like only SWDCLK and SWDIO are used and these are fixed, no magic with them, also as I see nRF51 PIN layout these two options are not even supported by the chip):

    • Using SWO which is dedicated PIN for specific debugging printout protocol defined by ARM (supported by nRF52 but not supported by nRF51 from what I see).
    • Switching some "optional" SWD PINs such as nRESET to GPIO and configuring it as UART Tx to transport debugging messages to the host (this is nice trick on nRF52 but again nRF51 seems to have nRESET merged with SWDIO and no alternative GPIO function possible).

    So if you really need some debug messaging I recommend to sacrifice some PIN from "motors, buzzer and others".

Reply
  • Well there are two ways how to use or repurpose SDW "programming" PINs but I'm afraid none o these will be available for you (at least from your description it sounds like only SWDCLK and SWDIO are used and these are fixed, no magic with them, also as I see nRF51 PIN layout these two options are not even supported by the chip):

    • Using SWO which is dedicated PIN for specific debugging printout protocol defined by ARM (supported by nRF52 but not supported by nRF51 from what I see).
    • Switching some "optional" SWD PINs such as nRESET to GPIO and configuring it as UART Tx to transport debugging messages to the host (this is nice trick on nRF52 but again nRF51 seems to have nRESET merged with SWDIO and no alternative GPIO function possible).

    So if you really need some debug messaging I recommend to sacrifice some PIN from "motors, buzzer and others".

Children
No Data
Related