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, I changed RAM1 start because it was instructed by tutorial "ROM and RAM Management"

    I've put back RAM1 start 0x2000000 and size 0x4000, still no improvement, and result in warning "JLink Warning: T-bit of XPSR is 0 .........", so I keep the previous settings.

    Now I've tried to put break point at here and got some findings:

    err_code = softdevice_enable(&ble_enable_params);
    
    APP_ERROR_CHECK(err_code);  <---break point
    

    Then I found the function return err_code = 0x0000004, and in turn this APP_ERROR_CHECK will reset the chip. Which means actually the program could enter main(), just got an error when running into softdevice_enable(), it seems that the situation also related to RAM allocation, isn't it?

    Screen of return err_code

    Screen of nRFgo

    Thanks!

Reply
  • Thank you Petter, I changed RAM1 start because it was instructed by tutorial "ROM and RAM Management"

    I've put back RAM1 start 0x2000000 and size 0x4000, still no improvement, and result in warning "JLink Warning: T-bit of XPSR is 0 .........", so I keep the previous settings.

    Now I've tried to put break point at here and got some findings:

    err_code = softdevice_enable(&ble_enable_params);
    
    APP_ERROR_CHECK(err_code);  <---break point
    

    Then I found the function return err_code = 0x0000004, and in turn this APP_ERROR_CHECK will reset the chip. Which means actually the program could enter main(), just got an error when running into softdevice_enable(), it seems that the situation also related to RAM allocation, isn't it?

    Screen of return err_code

    Screen of nRFgo

    Thanks!

Children
No Data
Related