building APP with no SD but with secure bootloader

we currently have a product which use nrf52832 as processor using SD132 for BLE capability with DFU capability

we want to build a sister product with nrf552810 with no SD (no BLE functionality) but with DFU capability. We build the APP with flash map to 0 and it works fine. However, when we move the APP to 0x1000 to make room for the MBR, we encounter issue with MemManagementFault, BusFault etc.

Can someone explain what the MBR does (ie API, significant flash location, etc) ? 

More importantly, I am new in this DFU/BOOTLOADER/MBR functionality. Can someone point me to a place where I can read about this ?

Thanks

Parents Reply Children
  • Thanks Sigurd.


    I am using SES to build my solution.I built my own BL image and APP image separately. When I want to debug my APP, I told SES to also load MBR.hex (in softdevice folder), and BL.elf that I build earlier. Everything looks good. I can step through the code and I can see that MBR's Reset Handler, the BL's Reset Handler and the APP's Reset Handler is getting call and I am in my APP. However after stepping through several functions, strange thing happened. In one of the function call, if I step through it using assembly then it is working fine but if I step through it using C or step over in assembly, I got a bus fault (0xa60). Note that if I reallocated the APP to start at 0 and step through using C, then I don't see the same issue. What is going on ?

  • Hi,

    1)

    Do your memory configuration look something like this? (for nRF52810):

    FLASH_PH_START=0x0
    FLASH_PH_SIZE=0x30000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x6000
    FLASH_START=0x1000
    FLASH_SIZE=0x2f000
    RAM_START=0x20000008
    RAM_SIZE=0x5ff8

    nRF52832:

    FLASH_PH_START=0x0
    FLASH_PH_SIZE=0x80000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x10000
    FLASH_START=0x1000
    FLASH_SIZE=0x7f000
    RAM_START=0x20000008
    RAM_SIZE=0xfff8

    2) Check out the MBR variant of the Blinky peripheral example, and see if you can recreate the issue based on that.
    nRF5-SDK\examples\peripheral\blinky\pca10040e\mbr\ses

    3) To debug a hardfault, you can add the hardfault library to your project https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_hardfault.html

Related