Errors while flashing a custom nrf52840 board

Dear Team DevZone,

We are facing some problems while flashing our protoypes ( custom board whit nRF52840 chip ),

We are using nRF Connect for Desktop v4.1.1, The Toolchain Manager v1.2.4 and nRF connect SDK 2.2.0 to generate our Hex files (that works in DK). 

We are using Programmer (v3.0.8) to flash the custom board ( nRF52840 xxAA REV2 ) whit a ( nRF52840DK xxAA REV3) as a JLINK ( V7.80c ).

We use the Tag-Connect ( TC2030-CTX ) a 10pins to 6pins connector. 

The reset pin P0.18 in our chip is not connected. We look to disable it in the software also, can we do it whit the register PSELRESET(0x200)?.

While flashing any of our test programs we face two problems (sometimes the jlink recognize the customboard but does not communicate properly ) : 

First : Unsupported device. The detected device could not be recognized as neither JLink device nor Nordic USB device.

Second : [error] [SeggerBackend] - 10 second timeout elapsed, no time left to wait for debug port to power up.

We are locked at this point, so that we open this ticket.

Thank you in advance,

Kinds regards.

Parents
  • Hello Simon,

    We encountered two problems when flashing the protos with the default flash (the classic method for dev kits), we just had to adapt our way of flash to the case of our prototype.

    - The pin reset:


    o Problem: In our case the pin reset is not connected and therefore upgraded high internally, so it had to be disabled at the firmware level, the problem is that we use the classic flash (default settings) which force the reset to be reactivated by writing in the UICR registry and thus cancelling the configs we made in the firmware.


    o Solution: To solve this problem, you must disable the firmware reset on the one hand by adding this configuration to the file prj.conf (CONFIG_GPIO_AS_PINRESET=n), for more security add the appropriate deactivation function (see pj Désactiver_APPROTECT) to the project then call it at the beginning of the hand (as an initialization function).  And for flash firmware use the following command line: ( west flash --recover –softreset ) with recover removes the contents of the chip and then with softreset we write the program without enabling the reset.


    - Power:
    o Problem: In our case we pass the power directly to the microcontroller, this is not a problem because the chip has a LDO and a DCDC that allows to avoid current peaks and physical phenomena of this style. However, in order for these microcontroller internal elements to function properly, it is necessary to place components including inductances ( see pj DCDCMODE ) but we didnt add them.


    o Solution: To solve this problem you must disable the LDO and DCDC part in the power registry with the following configuration (CONFIG_BOARD_ENABLE_DC_DC=n ).

    These solutions allow us to flash our protos without the program locking and with a single command line.

    Do you have some advices to improves our project ?

    Thank you,

    Best regards,

    -Mehdi

Reply
  • Hello Simon,

    We encountered two problems when flashing the protos with the default flash (the classic method for dev kits), we just had to adapt our way of flash to the case of our prototype.

    - The pin reset:


    o Problem: In our case the pin reset is not connected and therefore upgraded high internally, so it had to be disabled at the firmware level, the problem is that we use the classic flash (default settings) which force the reset to be reactivated by writing in the UICR registry and thus cancelling the configs we made in the firmware.


    o Solution: To solve this problem, you must disable the firmware reset on the one hand by adding this configuration to the file prj.conf (CONFIG_GPIO_AS_PINRESET=n), for more security add the appropriate deactivation function (see pj Désactiver_APPROTECT) to the project then call it at the beginning of the hand (as an initialization function).  And for flash firmware use the following command line: ( west flash --recover –softreset ) with recover removes the contents of the chip and then with softreset we write the program without enabling the reset.


    - Power:
    o Problem: In our case we pass the power directly to the microcontroller, this is not a problem because the chip has a LDO and a DCDC that allows to avoid current peaks and physical phenomena of this style. However, in order for these microcontroller internal elements to function properly, it is necessary to place components including inductances ( see pj DCDCMODE ) but we didnt add them.


    o Solution: To solve this problem you must disable the LDO and DCDC part in the power registry with the following configuration (CONFIG_BOARD_ENABLE_DC_DC=n ).

    These solutions allow us to flash our protos without the program locking and with a single command line.

    Do you have some advices to improves our project ?

    Thank you,

    Best regards,

    -Mehdi

Children
No Data
Related