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

nRF only mode only works sometimes

Hello,

I am looking to run the ble_app_uart example from the SDK v17 in nRF only mode on the nRF52840 DK. When running the application as is on nRF only mode, it fails during the initialization phase and does not seem to enter the main loop.

However, when I set it up such that Rx and Tx are mapped to pins 1.14 and 1.13 so the DK communicates through UART to an external module, it is able to run on nRF only mode, but only if SW6 is on Default when I power the board on and then toggle SW6 to nRF only mode.

I am not sure why this happens, so could someone please explain this behavior?

In both scenarios, the board is powered via the J2 USB connector (the one on the shorter edge of the board) and SW9 is on VDD.

Thanks!

  • Hi,

    nRF only mode means that the only the nRF IC is powered on the DK. The unmodified ble app uart example is setup so that it communicates through the P0.08 and P0.07 which is connected to the interface chip which again is connected to the J2 USB header. If you want to directly through the J3 USB header then you would have to use the USB ble app uart example instead. 

    regards

    Jared

  • Thanks for the reply. However, transmitting through USB is not quite what I am looking for.

    What I am trying to do is use the ble app uart example but replace the interface MCU with another chip by using GPIO pins for the UART instead of the pins routed through the interface MCU. In other words, taking the MCU and virtual COM port out of the situation. 

    I was trying to use nRF only mode to accomplish this, but a summary of my results is as follows: the application is only able to initialize when the interface MCU is powered (the DK is NOT in nRF only mode when powered on). When running the example unmodified, enabling nRF only mode while the board is powered makes it stop working altogether in that I cannot establish a bluetooth connection with my mobile device. When I set the UART Rx and Tx pins to be the GPIO pins and disconnect RTS and CTS, it continues to work after enabling nRF only mode, but turning the board off and on again using SW8 (still in nRF only mode) results in it not working again.

    The latter case is the one I am interested in because I seek to make the DK's interface MCU irrelevant while the application is running. It's ok if I am still using it to flash updated firmware though.

    Do you have any guidance in terms of alternate power settings that will fix this, code changes I am overlooking, or an explanation as to why the code fails to reach the main loop in nRF only mode?

  • Hi,

    I understand. The application is probably asserting due to the logging feature which uses RTT as backend which again is connected to the interface chip.This will cause the application to assert when the interface is powered down. You can try to remove the logging from the project. 

    regards

    Jared

  • Thanks so much! That made it work after power cycling in nRF only mode when configured for UART to external module. Now I'm curious about the other case, namely running the unmodified application in nRF only mode.

    I do not have a debug probe yet, but by turning on LEDs and shorting SB89 in nRF only mode I found that the unmodified application fails in main() --> ble_stack_init() --> nrf_sdh_enable_request() --> sd_softdevice_enable(), at which point it's hard for me to place the error with limited tools.

    Do you know why there is an error fault here?

Related