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

BC840 Unable to flash device

Hi,

I have used several nrf52 based devices and modules. For the first time I bought some BC840 modules from Fanstel. I have been unable to get them to program, see the log below.

Flashing: _build/nrf52840_xxaa.hex
nrfjprog -f nrf52 --program _build/nrf52840_xxaa.hex --sectorerase
Parsing hex file.
Erasing page at address 0x0.
ERROR: Access to the selected address is blocked by the block protection mechanism.
make: *** [flash] Error 38

I would usually use the command make erase flash_softdevice flash to program my devices. This does not work. I have spent a long time browsing Fanstel's documentation and cannot find a good guide to get started. I have connected the SWD lines and ground and power.

I am able to erase the whole board and flash some things. For example, I downloaded this file from Fanstel

BT840X_AT_3in1PC181113.hex

And using this command works.

nrfjprog -f NRF52 --program BT840X_AT_3in1PC181113.hex --chiperase --reset

But I am not even sure what this program does, not a lot of information from Fanstel.

I have also tried nrfjprog --recover and it has bricked 2 modules.

From what I understand, the Fanstel modules come pre-loaded with a bootloader and this may be the problem. But I am not sure what the next steps are to load a program. Any help would be greatly appreciated. 

  • I have also tried nrfjprog --recover and it has bricked 2 modules.

    How did you determine that the modules were bricked? Your code above does not use softdevice, so you need a complete chip erase anyways.

    But I am not even sure what this program does

    A "3in1"  is a hex file that merged the softdevice, application and bootloader into just one file.

  • I determined it was bricked because an error came up, now I keep getting Jlink errors. I am unable to perform any commands and all communication attempts results in Jlink errors. Let me know if there is a way out of this. 

    So I understand about the 3in1 but I am not sure what to expect when I flash the code because Fanstel doesn't exactly describe it. 

    I guess my main question is, what is the best way to program the Fanstel device?

  • Hi

    The recommended way to program and debug nRF52 based products is using an nRF52 DK (an nRF52840 DK in your case), this is also stated in the BC840 datasheet. We have a user guide describing how to program external boards amongst other things.

    In order to recover a chip after an accidental UICR erase, you should be able to follow the instructions in our Dongle Programming Tutorial to program a bootloader and/or an application onto the chip. I couldn't see any recommended ways to do this by Fanstel, so if you want something specific for their products, you'll have to contact them.

    Best regards,

    Simon

  • Thanks for the response I did solve the issue in the end.

    This was the first time running the system at 1.8V and I didn't realise that the dev boards were not able to flash external boards at this voltage. 

    I guess it was just interesting that some things could flash but other things couldn't..

    Powering it at a higher voltage works now.

  • Hi, maybe I have your same problem,

    I have to program 2 board (nRF52840 DK and the BC840E) with the radio_test application.
    When I connect only the nRF52840 board to the PC and load the zephyr.hex programme (i.e. without the 10 connection wires to the BC840E) the serial terminal seems to work, so it seems to work for nRF52840 DK.

    Instead it prints in the serial terminal continuously the values "bfdegeffcgfedd e!e "f#d$f%f&e'e(f)f*f+c,e-f.g/f0d1g2g3f4f5c6f7g8f9g:c;d<e=g>g?c@eAfBfCgDdEfFeGfHfIdJeKfLeMgNdOfPddffeedee d
    f
    f
    ceffgadfgfddedbgfe e!b "e#f$f%f&e'f(f)e*g+d,g-e.f/g0c1f2f3g4f5e6g7g8e9e:a;g<d=e>f?b@eAfBgCgDdEgFeGfHfIcJfKfLeMhNdOfPfehfeedcd e
    f"......" if I program the nRF52840 with the 10 connection wires attached and then the BC840E as well.

    I tried changing USBs and Putty and the same thing happens.
    How can I load the program in the BC840E? I'm pretty sure the problem lies in flashing the programme on nRF52840 when the other board (BC840 E) is also attached via 10 wires, because only in this case does the programme give problems.

    If by chance it is the same problem you encountered, how can I solve it?

    I also tried to solve the problem in the last answers of this post.

    Thanks in advance!

Related