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

Beginner question: SDK BLE examples not working

Hello, I'm a beginner for nRF51822, now my status is sticking on those SDK_11.0.0 BLE examples, while I could successfully running non-BLE (such as examples of bsp/uart).

Setup:

  • Environment: Keil4
  • Board: Custom board with 32MHz and LF 32.768kHz crystal circuity connected
  • Programming tools: J-link with nRFgo Studio / Keil4
  • Peer device: iPhone nRF Toolbox App

Problem:

  • Following tutorial "Getting started with nRF5 DK", I've erased chips, flashed SoftDevice S130 v2.0, and set ROM/RAM map on project, added header for custom board, then compile and flash \examples\ble_peripheral\ble_app_uart, and then I found there are no uart output, and even iPhone nRF Toolbox could not search any device with name Nordic_UART

  • Then I try to use debugger, and I found out that the program cannot run into the main(), but looping in address somewhere inside SoftDevice region

Tried:

  • Erase chips, without flashing SoftDevice, compile and flash examples\peripheral\uart to chips, I could successfully use TeraTerm to get the "Start" message and send "q" to quit.

  • Erase chips, flashed SoftDevice, set ROM/RAM address, compile and flash the above examples\peripheral\uart , I could still got positive result (I know this uart example won't use SoftDevice, this is a try for validating the new ROM/RAM settings are fine)

Can anyone help, what's wrong in my case and how to solve? Many thanks!

Parents
  • Thank you Petter, now the program could pass softdevice_enable(), however, the new setting will make the program halt at power_manage(), not even generate an error_code, and gives a warning:

    " **JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1. "

    Screen capture 1

    The new target RAM setting like this:

    Screen capture 2

    Note that I've set the RAM size to 0x1F80 as my chips only have 16kB.

    Moreover, should I need to make the same setting in J-link Utility Tags like this?

    Screen capture 3

    It seems that sd_app_evt_wait() will overwrite the memory inside SoftDevice, and triggered a hard halt. What's going wrong now? Many thanks!

Reply
  • Thank you Petter, now the program could pass softdevice_enable(), however, the new setting will make the program halt at power_manage(), not even generate an error_code, and gives a warning:

    " **JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1. "

    Screen capture 1

    The new target RAM setting like this:

    Screen capture 2

    Note that I've set the RAM size to 0x1F80 as my chips only have 16kB.

    Moreover, should I need to make the same setting in J-link Utility Tags like this?

    Screen capture 3

    It seems that sd_app_evt_wait() will overwrite the memory inside SoftDevice, and triggered a hard halt. What's going wrong now? Many thanks!

Children
No Data
Related