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

ERROR 4 [NRF_ERROR_NO_MEM] in nRF52832

I'm using nRF52832 SDK board with softdevice s132_nrf52_5.0.0. The error appears when I try to load it to the board, right on line 1247 where it initializes the NUS service (nordic uart service).

static void services_init(void){
  ret_code_t      err_code;
  ble_nus_init_t nus_init;

  memset(&nus_init, 0, sizeof(nus_init));
  nus_init.data_handler = nus_command_handler;

  err_code = ble_nus_init(&m_nus, &nus_init);
  APP_ERROR_CHECK(err_code); //*** error here

The program is ble_app_hrs_rscs_relay_pca10040_s132 that I'm trying to adapt to use NUS service with the smartphone.

Thanks.

Parents
  • Have you tried to debug further? Which function inside ble_nus_init() is returning the error code? Maybe you need to increase the attribute table? Or maybe increase the number of vendor specific UUIDs you have reservered space for in the SoftDevice?

  • When running the program again, it throws the same problem but in the line of enable ble stack:

        // Enable BLE stack.
    err_code = nrf_sdh_ble_enable(&ram_start);
    APP_ERROR_CHECK(err_code); //Error here
    

    Error is:

    <warning> nrf_sdh_ble: RAM starts at 0x20002C50, can be adjusted to 0x20002C60.
    <warning> nrf_sdh_ble: RAM size can be adjusted to 0xD3A0.
    <error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
    <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at C:\Nordic_Semi\nRF5_SDK_14.2.0_17b948 a\examples\BikeLite\exp2\ble_app_hrs_rscs_relay\main.c:1069
    

    I'm using SEGGER Embedded Studio for ARM V3.34 and I'm trying to change ram start and size...

Reply
  • When running the program again, it throws the same problem but in the line of enable ble stack:

        // Enable BLE stack.
    err_code = nrf_sdh_ble_enable(&ram_start);
    APP_ERROR_CHECK(err_code); //Error here
    

    Error is:

    <warning> nrf_sdh_ble: RAM starts at 0x20002C50, can be adjusted to 0x20002C60.
    <warning> nrf_sdh_ble: RAM size can be adjusted to 0xD3A0.
    <error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
    <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at C:\Nordic_Semi\nRF5_SDK_14.2.0_17b948 a\examples\BikeLite\exp2\ble_app_hrs_rscs_relay\main.c:1069
    

    I'm using SEGGER Embedded Studio for ARM V3.34 and I'm trying to change ram start and size...

Children
Related