hatdfault BLE application on srf52833 with s140 softdevice

Hello,
I'm trying to use BLE on nrf52833. I'm developping with segger embedded studio and I' m usign the BLE peripheral example "ble_app_blinky".
Firstly I erased the flash memory and installed the softdevice:

nrfjprog --eraseall
nrfjprog --program s140_nrf52_7.2.0_softdevice.hex --verify

Then I compiled the application and debugged. When the application go to sd_softdevice_enable, the system go to hardfault!

The linker setup is:
FLASH_PH_START=0x27000
FLASH_PH_SIZE=0x59000
RAM_PH_START=0x20002C00
RAM_NOINIT_SIZE=0x3000
RAM_PH_SIZE=0x1d400
FLASH_START=0x27000
FLASH_SIZE=0xa59000
RAM_START=0x20000000
RAM_SIZE=0x20000
DEFAULT_CONFIG_START=0x27000
DEFAULT_CONFIG_SIZE=0x400
FCONFIG_START=0x28000
FCONFIG_SIZE=0x1000
INIT_START=0x29100

Thank you in advance for support.
Davide

Parents Reply Children
  • Hi Hieu,

    isn't a new project. It's an old project in Segger embedded studio with Qorvo DWM3001C (nrf52833). In this project I use UWB ranging and Rtos. Now, I must add BLE functions, but it doen't work! I think it's very hard convert the segger eproject into nRf Connect SDK!

    I hope you can help me.

    Best regards,

    Davide

  • Hello Davide,

    I am a little confused now. Are you having the hardfault with the unmodified ble_app_blinky example, or are you trying to integrate the ble_app_blinky features into your UWB with RTOS project?

    If you are working on an unmodified example, then please check your SEGGER Embedded Studio version. nRF5 SDK v17.1.0 was tested and released with SES v5.42a. That is the version you should use.

    If you are working on integrating BLE into your UWB project, then please give some more information about your project. It might be outside of my expertise then, but Susheel will return next week and resume helping you in this case.

    Best regards,

    Hieu

  • Hello Hieu,

    yes I'm  integrate the ble_app_blinky features into UWB with RTOS project. I confirm I'm using nRF5 SDK v17.1.0.

    I started my project with "DWM3001CDK-DW3_QM33_SDK_CLI-FreeRTOS.emProject" example project by Qorvo (UWB with RTOS). Then I added my application and all works fine. Now, I want to add  BLE functionalities. So, my steps were as follow:

    1) I modified the linker as shown above.

    2) I installed the s140_nrf52_7.2.0_softdevice.hex as shown above.

    3) I setup following parameters in sdh_config.h:

    NRF_SDH_BLE_ENABLED 1

    NRF_SDH_BLE_ENABLED 1
    NRF_SDH_BLE_VS_UUID_COUNT 1
    NRF_SDH_BLE_SERVICE_CHANGED 1

    4) I add following parametrs in Project Options->Preprocessor->Preprocessor Definitions:

    SOFTDEVICE_PRESENT

    S140

    NRF_SD_BLE_API_VERSION=7

    5) I compiled the application (WITHOUT add BLE functionalities) and everything continues to work well.

    6) Then, in  main.c, after board initialization, I added BLE call as follow:

    int main(void) {

       disable_nfc_pins(); 
       BoardInit();
       APP_ERROR_CHECK(nrf_sdh_enable_request());

     ......

    }

    In debug mode, when I go into APP_ERROR_CHECK(nrf_sdh_enable_request(), the debug jump to SVCALL(SD_SOFTDEVICE_ENABLE, uint32_t, sd_softdevice_enable(nrf_clock_lf_cfg_t const * p_clock_lf_cfg, and right after click "Step Into", the debug stop at void vPortSVCHandler( void ) and the register values are like there:

    Go forward  1 step and the debug goes to hardfault handler, and  the register values are there:

    I hope I have been clear, and you can help me.

    Best regards,

    Davide 

Related