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

Migrating ble_app_hrs_pca10056 to custom board nRF52833 - SOFTDEVICE: INVALID MEMORY ACCESS. INFO 0x0

Hi,

Using the HRS peripheral example provided in SDK17 with S140 7.2.0, I am in the process of migrating to a custom board using nRF52833. I have already made some changes to accommodate for this, including disabling the CC310 hardware-accelerated cryptography backend and enabling Oberon instead.

However, I am running into issues with the linker. The new section placements I used are as follows:

      linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x80000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x20000;FLASH_START=0x27000;FLASH_SIZE=0x51000;RAM_START=0x20001198;RAM_SIZE=0x1ee68"
      linker_section_placements_segments="FLASH RX 0x0 0x80000;RAM1 RWX 0x20000000 0x20000"

The code runs fine until ble_stack_init() is called. Here, inside the nrf_sdh_enable_request(), a fatal error is thrown when the CRITICAL_REGION_EXIT(); is reached. Following another post, I have expanded the error message, which is now:

 

SOFTDEVICE: INVALID MEMORY ACCESS. INFO 0x0

Is there anything else I would need to change to make this code work on nRF52833? I'm attaching the full source code below.

8688.ble_app_hrs.zip

Parents
  • This has been resolved with the following memory configuration:

    linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x80000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x20000;FLASH_START=0x27000;FLASH_SIZE=0x59000;RAM_START=0x20002BE0;RAM_SIZE=0x1d518"
    linker_section_placements_segments="FLASH RX 0x0 0x80000;RAM1 RWX 0x20000000 0x20000"
    arm_linker_heap_size="2048"

Reply
  • This has been resolved with the following memory configuration:

    linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x80000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x20000;FLASH_START=0x27000;FLASH_SIZE=0x59000;RAM_START=0x20002BE0;RAM_SIZE=0x1d518"
    linker_section_placements_segments="FLASH RX 0x0 0x80000;RAM1 RWX 0x20000000 0x20000"
    arm_linker_heap_size="2048"

Children
  • Thank you for the update. So looks like the problem was that you had set the app RAM base address too low earlier (this assert is raised when the application writes to the RAM region reserved to the Softdevice - Memory resource map and usage). But you should also make sure that RAM_START + RAM_SIZE does not exceed the total amount of RAM on the chip (i.e. RAM_PH_SIZE). It's 0x200F8 bytes, and therefore exceeding RAM_PH_SIZE by 0xF8 bytes. To correct this I would change  RAM_SIZE from 0x1d518 to 0x1D420.

Related