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

S110 Soft Device and wired UART

I am using UART0 for wired communication and S110 for Bluetooth LE communication at the same time, using HRM profile. System seems to work as expected, I get log output from UART and heart rate is delivered via BTLE. However, after about three minutes the system blocks i.e. stops logging into the UART and BTLE also goes down. This happens regularly every time.

I have no idea what could be the reason, but if I do not use simple_uart.c -functions, the blocking doesn't happen (my led keeps blinking and BTLE stays working). I would appreciate any idea that would help me on this issue.

  • Hi Jarmo,

    Using simple_uart should not break the BLE link.

    I assume you are aware of the interrupt latency caused by BLE stack (CPU blocking time) that can affect the UART communication.

    Could you run on Debug mode and catch the BLE_GAP_EVT_DISCONNECTED event then look for the disconnect reason in ble_gap_evt_t ?

    If possible please send us your project for closer look.

  • Now it looks like the problem is not UART related, because it happens also without that. System just runs bout three minutes and then crashes. I have to set up debugging environment and strip out code that actually causes the problem. However, I haven't got uVision debugging working very well. Stepping code line by line does not work for me.

  • Hi Jarmo,

    Stepping code line by line would not work if the stack is active, since the stack is not paused by the debugger. What you should do is to add a breakpoint inside app_error_handler() to check if there is any assertion, and then look for the err_code, line number and file name of the function that cause the issue.

    Do you have the same issue with the stock SDK's example ?

  • Hi

    I just tried with pca10001\s110\ble_app_hrs stock example. It seems to work as long as I connect my Mac with LightBlue relatively soon after starting the ble_app_hrs. However, if I leave the example running without connecting (LightBlue not running on Mac), after a few minutes my Mac is no more able to find the Nordic_HRM profile or anything. Looks like the app has crashed or something, don't know what.

    So I would say yes, similar issue is happening also with stock SDK example.

  • Jarmo, the HRM example will automatically enter deep sleep mode after advertising 3 minutes ( APP_ADV_TIMEOUT_IN_SECONDS) without a connect request from a master. You can wake the chip up by pressing a button on the board.

Related