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

nRF51822 mbed - Use mbed on a nrf51822 breakout board

Hi all, I'm designing my own breakout board for nrf51822 and want to use the mbed platform for it. I was able to make the board work with a very simple, blinking-LED program. However, i run into some issues while using the Heart Rate example in mbed.

  • First of all, when i flashed the combined hex file into the chip using Ulink2 debugger. The program wouldn't run at all. The prog would stop right at the beginning (address 0x0). I think it's supposed to start at address 0x14000 according to the scatter-loading file included in the project file.

  • Then, i tried to download the softdevice seperately at address 0x0, then downloaded the application hex code into another region (starting from 0x14000). This approach actually works 'partially' :(. The prog would run and halt at sd_softdevice_enable() function, which is used to set up LFCLK source and enable soft device. It throws an Hard_fault exception. Checking the LFCLK souce, it's already initialized and started.

I have no idea what is going wrong here. Should the way i used to flash the chip have anything to do with this? Besides, how can i use the combined hex file? i couldn't make it work by just downloading this hex file into the chip.

Parents
  • Hi there,

    Which tool are you using for the parsing and flashing of the hex file? The lack of correct UICR parameters are not desirable but not detrimental. Your application should still run without encountering the errors you have outlined.

Reply
  • Hi there,

    Which tool are you using for the parsing and flashing of the hex file? The lack of correct UICR parameters are not desirable but not detrimental. Your application should still run without encountering the errors you have outlined.

Children