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

sd_mbr_command causign hard fault SDKv8/S110v8

I am using the S110 softdevice from v8, and building the bootloader from SDKv8, using keil uv5. The project is dfu_dual_bank_ble_s110_pca10028, loaded from the dfu_dual_bank_ble_s110_pca10028.uvprojx project file in arm5_no_packs. Builds cleanly. Keil says it is targetting an nrf51422_xxac chip; I'm using an InsightSIP module with an nrf51822 xxac chip.

I've mass-erased the chip, loaded the soft modem at location zero, bootloader at 0x3c000 and written 0x3c000 to the UICR register at 0x10001014.

Under gdb, the bootloader is started but at this line (line 151): err_code = sd_mbr_command(&com); it hard faults.

Does anyone have any suggestions for where I am going wrong? A softmodem + hrs app works fine, but everything stops when I add a bootloader.

Parents
  • My device is a rev 2 Nrf51822, so I went back to basics: Install uVision4 installed SDK v5.2 installed SD110 6.0 (copying the API headers over)

    Performed mass erase, loaded s110 to 0x0 Opened the bootloader project, targeted dfu_dual_bank_ble,_xxAA chip. Changed the IROM1 address to 0x3C800, size 0x3800. SRAM to 0x20002000, size 0x2000 Fixed the bug in bootloader.c (devzone.nordicsemi.com/.../) Built; builds ok. load bootloader to 0x3c800 set UCIR to values specified by s110 and bootloader (I program those separately) I then debug the code with gdb. It single steps fine up to line 231 in softdevice_handler.c: err_code = sd_softdevice_enable(clock_source, softdevice_assertion_handler); at which point I get a SIGSEGV: Error accessing memory address 0xfffffff8: (undocumented errno -1)

    Please, can anyone spot my mistake?

Reply
  • My device is a rev 2 Nrf51822, so I went back to basics: Install uVision4 installed SDK v5.2 installed SD110 6.0 (copying the API headers over)

    Performed mass erase, loaded s110 to 0x0 Opened the bootloader project, targeted dfu_dual_bank_ble,_xxAA chip. Changed the IROM1 address to 0x3C800, size 0x3800. SRAM to 0x20002000, size 0x2000 Fixed the bug in bootloader.c (devzone.nordicsemi.com/.../) Built; builds ok. load bootloader to 0x3c800 set UCIR to values specified by s110 and bootloader (I program those separately) I then debug the code with gdb. It single steps fine up to line 231 in softdevice_handler.c: err_code = sd_softdevice_enable(clock_source, softdevice_assertion_handler); at which point I get a SIGSEGV: Error accessing memory address 0xfffffff8: (undocumented errno -1)

    Please, can anyone spot my mistake?

Children
No Data
Related