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

app_ble_uart example not initializing BLE on nRF52DK PCA10040 SDKv16 and S132 soft device

Hi

I am trying to get the ble_app_uart to run on my nRF52DK with the nRF52832 on board. I am using SDK version 16 and SoftDevice version 132.

When compile and download the program, i do not see it advertising as it is not visible in the scanned device list on the nRF Connect app on my iPad.

Upon debugging, I find that during initialization in main(), the program seems to run into an error and goes to the app_error_weak() function and stays there.

The call stack shows that it arrived there from the following function - APP_ERROR_CHECK(err_code) after bsp_init() funct

<code>

static void buttons_leds_init(bool * p_erase_bonds)
{
    bsp_event_t startup_event;

    uint32_t err_code = bsp_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS, bsp_event_handler);
    APP_ERROR_CHECK(err_code);

    err_code = bsp_btn_ble_init(NULL, &startup_event);
    APP_ERROR_CHECK(err_code);

    *p_erase_bonds = (startup_event == BSP_EVENT_CLEAR_BONDING_DATA);
}
</code>

Since there were no logging calls in place in the code until this point, there was no information on the Debug terminal.  I will put in some logging calls to indicate the status of the execution and post it here soon.

PS: To confirm if the hardware is ok, I downloaded the LED_blinky example and it works fine - i am able to see the blinky device on the nRF LED_Blinky app on my iPad and communicate with it.

So it appears the problem is happening only with this example, which sounds strange. I haven't made any changes yet, just using the default example code. 

Regards

Sreenivasa Chary

Parents
  • Hello Amanda

    I use the Segger SES example and when I download the application, the output log shows me the following:

    Connecting ‘J-Link’ using ‘USB’
    Connecting to target using SWD
    Loaded C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.30c/bin/JLink_x64.dll
    Firmware Version: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 21 2020 17:30:48
    DLL Version: 6.54c
    Hardware Version: V1.00
    Target Voltage: 3.300
    Device "NRF52832_XXAA" selected.
    InitTarget() start
    InitTarget() end
    Found SW-DP with ID 0x2BA01477
    Scanning AP map to find all available APs
    AP[2]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x24770011)
    AP[1]: JTAG-AP (IDR: 0x02880000)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    Found Cortex-M4 r0p1, Little endian.
    FPUnit: 6 code (BP) slots and 2 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    Preparing target for download
    Executing Reset script TargetInterface.resetAndStop()
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Downloading ‘s132_nrf52_7.0.1_softdevice.hex’ to J-Link
    Programming 2.7 KB of addresses 00000000 — 00000aff
    Programming 146.1 KB of addresses 00001000 — 000258bf
    J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
    Download successful
    Downloading ‘ble_app_uart_pca10040_s132.elf’ to J-Link
    Programming 62.1 KB of addresses 00026000 — 0003587f
    Programming 0.1 KB of addresses 00035880 — 0003591f
    J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
    Download successful

    Regards

    Sreenivasa Chary

    s132_nrf52_7.0.1_softdevice.hex
Reply
  • Hello Amanda

    I use the Segger SES example and when I download the application, the output log shows me the following:

    Connecting ‘J-Link’ using ‘USB’
    Connecting to target using SWD
    Loaded C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.30c/bin/JLink_x64.dll
    Firmware Version: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 21 2020 17:30:48
    DLL Version: 6.54c
    Hardware Version: V1.00
    Target Voltage: 3.300
    Device "NRF52832_XXAA" selected.
    InitTarget() start
    InitTarget() end
    Found SW-DP with ID 0x2BA01477
    Scanning AP map to find all available APs
    AP[2]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x24770011)
    AP[1]: JTAG-AP (IDR: 0x02880000)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    Found Cortex-M4 r0p1, Little endian.
    FPUnit: 6 code (BP) slots and 2 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    Preparing target for download
    Executing Reset script TargetInterface.resetAndStop()
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Downloading ‘s132_nrf52_7.0.1_softdevice.hex’ to J-Link
    Programming 2.7 KB of addresses 00000000 — 00000aff
    Programming 146.1 KB of addresses 00001000 — 000258bf
    J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
    Download successful
    Downloading ‘ble_app_uart_pca10040_s132.elf’ to J-Link
    Programming 62.1 KB of addresses 00026000 — 0003587f
    Programming 0.1 KB of addresses 00035880 — 0003591f
    J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
    Download successful

    Regards

    Sreenivasa Chary

    s132_nrf52_7.0.1_softdevice.hex
Children
No Data
Related