Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Program flash in custom board

I want to flash the program in my custom board. I have flash the program in nrf52832 BLE module via j-link using nrf52832 development board. So, how do i confirm that the program is flashing into the development board or in my custom board ?   

Parents
  • Hi,

    Of course the easiest way is if the board has a LED that can be used to indicate that it is working. Then you can erase the flash (nrfjprog -e) and see that it is dead, then program it and see that it is alive.

    If you can not do the above, then one way would be to use an nRF51 DK to program the nRF52 custom board with nrfjprog and the "-f nrf52" option. That way you would get an error from nrfjprog if the board turns out to be the nRF51 on the DK.

    Another way is if you erase the flash of the on-DK nRF52 before you start, with "nrfjprog -e". (Do this when the custom board is disconnected.) Then connect and program the custom board, before you disconnect it again and read the flash of the on-DK nRF52 with "nrfjprog --readcode temp.hex". The file temp.hex now contains the full flash of the on-DK nRF52. If it is the contents that you programmed, then you have failed. If the data portion of the lines are all FFs, then you have succeeded. (For the intel hex formatting, see for instance the file example on wikipedia, which highlights the data with cyan background marking. It is a colon followed by eight hexadecimal digits, then a number of data bytes, then a two digit checksum.)

    Another way, if you are not afraid of cutting the solder bridges on the nRF52 DK, is to cut solder bridge SB9 which cuts the power supply for the on-board nRF52. That way there is no way to program it, and so if programming succeeds it must be the external nRF52. (In order to resupply the on-DK nRF again you must then use a jumper on P22, or alternatively resolder the solder bridge.)

    Regards,
    Terje

  • I am trying to flash the program using nrf go studio ( I have directly flash the .hex file into the board). my question is , how can i know the program is properly flashed in my custom board . there is no LED on my custom board.   

  • Hi,

    When you flash an nRF device with nRFgo Studio, with nrfjprog, or with almost any other programming tool, this is a two step process. First it gets flashed. Then it gets read out again and compared to the hex file you were going to flash. So unless you get any error messages you know that you have flashed an nRF chip.

    This means the only question is if you have flashed your custom board, or if you have flashed the DK. For that, I have suggested a couple of solutions above. The easiest method by far is to turn off the DK, power the external board, and see if it behaves as expected.

    Regards,
    Terje

Reply
  • Hi,

    When you flash an nRF device with nRFgo Studio, with nrfjprog, or with almost any other programming tool, this is a two step process. First it gets flashed. Then it gets read out again and compared to the hex file you were going to flash. So unless you get any error messages you know that you have flashed an nRF chip.

    This means the only question is if you have flashed your custom board, or if you have flashed the DK. For that, I have suggested a couple of solutions above. The easiest method by far is to turn off the DK, power the external board, and see if it behaves as expected.

    Regards,
    Terje

Children
No Data
Related