This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

unable to print debug logs in my custom board

hello sir/ma'am

we are using nrf52840 chip in our customized board product and IAR as a development environment and also a debugger called segger jlink .we are not able to view the NRF_LOG_INFO output.attached is the schematic diagram of the product,do let us know if it is possible to view the logs according to our design,if not what are the changes we need to do in order to be able to achieve the same logging on terminal.

NOTE: 1. the jlink debug header is present at "J6" in the schematic. 2. the usb connector which is used for programming the device is present at "J9" in the schematic. 3. the com port is getting detected and we are able to open the port using termite with all the configuration defined in the document. 4. the cli usbd is working feature is working smoothly 5.

we've cross-checked the following things. 1.Processor always call NRF_LOG_PROCESS. 2.NRF_LOG_INIT and NRF_LOG_DEFAULT_BACKENDS_INIT macros are called in the beggining of the main. 3.NRF_LOG_ENABLED set

below is the schematic of board

105-X6-00.pdf

thanks

sakib

Parents
  • Hi

    I suggest you use the RTT logger for debug logging instead. The RTT logger only requires the programmer pins (SWDIO/SWDCLK) connected to the J-Link debugger. In order to enable the RTT instead of the UART, you can set NRF_LOG_BACKEND_RTT_ENABLED to 1 and NRF_LOG_BACKEND_UART_ENABLED to 0 in sdk_config.h.

    I took a look at your design and I can't see anything in particular that poses a problem. One thing though. P0.09 and P0.10 are configured as NFC pins by default. You'll need to configure these as GPIOs to use them as such in your project settings.

    Best regards,

    Simon

  • Hello, Simon

    I am able to print the logs using the j-link RTT viewer.I'd follow the below-linked blog 

    https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/debugging-with-real-time-terminal 

    I think the RTT requires/follows different sets of functions like  SEGGER_RTT_WriteString(),SEGGER_RTT_printf() etc to print the logs.

    My question is, is it not possible to print the logs using NRF_DEBUG_LOG() through RTT viewer?

    thanks

    sakib

  • functions like  SEGGER_RTT_WriteString(),SEGGER_RTT_printf()

    Those are just the low-level functions - NRF_DEBUG_LOG() sits above them.

    NRF_DEBUG_LOG()  is agnostic to the underlying transport used.

  • hi,

    thanks for the clarification awneil, just for confirmation sake, do I have to use these functions for debugging as per my setup and design? or are there any better ways to debug my application with the same design and setup.

    my concern is won't these RTT debugs have an effect on other time constraint applications of the product like BLE, NFC, etc?

    thanks

    sakib

  • do I have to use these functions

    Of course, you don't have to - you can write it all from scratch if you really want to.

    won't these RTT debugs have an effect on other time constraint applications

    RTT has far less impact that doing it over the UART!

    With RTT, all your code does is write to a RAM buffer. The J-Link then reads the RAM directly - so there's no CPU resource consumed.

    https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/

  • Hi,
    we required an NFC tap to pair the Bluetooth feature in our product. our aim/application is, when a user taps his/her smartphone onto the antenna present on the product/device, it should start pairing, and as soon as the BT gets paired a window should appear onto the smartphone asking the user to enter a password/authentication key. if the entered password doesn't match the preset password, the paired board/device should get disconnected.

    we have integrated the "ble_nfc_pairing_reference" example from the SDK into our application code and it seems to satisfy most of our application requirement except one.

    the path where the example is present in the SDK
    \nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\experimental\ble_nfc_pairing_reference

    problem:- the example doesn't seem to ask for an authentication key when the BT is getting paired.

    in addition, we are developing a customized Bluetooth application for this feature.

    in short, our aim is to provide better security of the product so that a user would not be able to enter into the device just by doing tap to pair.

    please guide us with the best possible option to achieve our requirements.

    thanks
    sakib

Reply
  • Hi,
    we required an NFC tap to pair the Bluetooth feature in our product. our aim/application is, when a user taps his/her smartphone onto the antenna present on the product/device, it should start pairing, and as soon as the BT gets paired a window should appear onto the smartphone asking the user to enter a password/authentication key. if the entered password doesn't match the preset password, the paired board/device should get disconnected.

    we have integrated the "ble_nfc_pairing_reference" example from the SDK into our application code and it seems to satisfy most of our application requirement except one.

    the path where the example is present in the SDK
    \nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\experimental\ble_nfc_pairing_reference

    problem:- the example doesn't seem to ask for an authentication key when the BT is getting paired.

    in addition, we are developing a customized Bluetooth application for this feature.

    in short, our aim is to provide better security of the product so that a user would not be able to enter into the device just by doing tap to pair.

    please guide us with the best possible option to achieve our requirements.

    thanks
    sakib

Children
Related