BICR file for custom boards

I'm developing a custom board that uses the nRF54H20.

The Getting Started guide for the nRF54H20DK explains how to use the pre-built BICR file and program it to the chip, but it doesn't explain how to create custom BICRs for custom boards.

In the Zephyr build logs for my application that uses a board configuration (devicetree, etc.) for my custom board, I see that it is generating its own BICR files:

-- Generated BICR hex file: C:/Users/MyName/Documents/Git/hello_world/build/hello_world/zephyr/bicr.hex

Does this mean that it's creating and flashing its own BICR files that are suitable for the custom board? Or do I need to manually create a custom BICR file and save it to the chip as detailed in the Getting Started guide?

If I need to manually create a custom BICR, is there a guide on how to do that?

  • Hello,

    You have to create and configure BICR JSON file for your custom board.

    The BICR configures how the nRF54H20 SoC interacts with board elements, such as power schemes, oscillators, GPIO drive, and more. You can follow the default nRF54H20 DK’s BICR JSON file as a template: 
    sdk-zephyr/boards/nordic/nrf54h20dk/bicr.json 

    to make custom board's bicr.

    you can change the parameter from the default to your custom board (

    • Place your custom bicr.json in your custom board’s directory.
    • Configure the required fields, such as power scheme, oscillator settings, GPIO drive, etc.)

    {
      "power": {
        "scheme": "VDDH_2V1_5V5"
      },
      "ioPortPower": {
        "p1Supply": "EXTERNAL_1V8",
        "p2Supply": "EXTERNAL_1V8",
        "p6Supply": "EXTERNAL_1V8",
        "p7Supply": "EXTERNAL_1V8",
        "p9Supply": "EXTERNAL_FULL"
      },
      "ioPortImpedance": {
        "p6ImpedanceOhms": 50,
        "p7ImpedanceOhms": 50
      },
      "lfosc": {
        "source": "LFXO",
        "lfxo": {
          "mode": "CRYSTAL",
          "accuracyPPM": 20,
          "startupTimeMs": 600,
          "builtInLoadCapacitancePf": 15,
          "builtInLoadCapacitors": true
        }
      },
      "hfxo": {
        "mode": "CRYSTAL",
        "startupTimeUs": 850,
        "builtInLoadCapacitors": true,
        "builtInLoadCapacitancePf": 14
      }
    }
    

    Next step is to set the Kconfig option CONFIG_SOC_NRF54H20_GENERATE_BICR=y in the prj.conf file.

    After building the application build system will generate bircr.hex file and after that you have to manually program the bicr.hex file on your device by the following command

    nrfutil device program --options chip_erase_mode=ERASE_NONE --firmware bicr.hex --core Application --serial-number <serial_number>
    

    You can look at the details information hereConfigure, generate, and program the BICR and Program the BICR binary.

    Thanks.

    BR

    Kazi

  • Thanks Kazi. Could you clarify though, in the original post I showed a log line where Zephyr is apparently generating a BICR file itself (and without me setting the `..._GENERATE_BICR` KConfig option you mention). Is this different than the BICR file that would be created following your directions?

  • Hello,

    The generated bicr.hex file you got is the hes file for your custom board. The explicit setting of CONFIG_SOC_NRFH20_GENERATE_BICR=y ensures BICR generation, but maybe for some boards it is enabled automatically. I will ask team to be sure about this.

    What you can do, you can check your build configuration (.config file in your build directory) to see if CONFIG_SOC_NRF54H20_GENERATE_BICR=y is set, even if it is not manually set by you in prj.conf file.

    The flashing of bicr.hex file manually with the nrfutil command ( what I mentioned in my previous reply) is must do thing. 

    My team also commented alike

    ''BICR must be flashed manually in bring-up, and does not need to be changed later, unless you change HW the configuration of the board (or found that you had a wrong BICR in the first place and need to fix it).

    BICR will not be erased when doing recover or eraseall, so in a lot of cases, you can just program it once and be done with it.''

    Thanks,

    BR

    Kazi

  • Hello,

    Regarding the config, I have feedback from team

    CONFIG_SOC_NRF54H20_GENERATE_BICR is set to y by default, so unless you actively set it to n, it will be generated.

  • So it will be generated automatically, but will it be flashed automatically?

    If not, is there any way to also automatically flash the BICR as part of the build (if it's changed)?

Related