How to use internal capacitors on nrf5340?

Hi, 

I wonder how to use the internal capacitor of the nrf5340.

The nRF5340-DK operates at 32M=8pf 32.768k=9pf without any special settings.

If i use 10pf products for both crystals,

How can I set it up in NCS 1.9.1?

I added it to prj.conf as below, but it seems not to be applied.

CONFIG_SOC_ENABLE_LFXO=y
CONFIG_SOC_LFXO_CAP_INT_7PF=y
CONFIG_SOC_HFXO_CAP_INTERNAL=y
CONFIG_SOC_HFXO_CAP_INT_VALUE_X2=20
thank you

Parents
  • I did some testing.

    • I programmed the hello world sample (NCS v1.9.1) to the nRF5340 DK using the board name nrf5340dk_nrf5340_cpuapp with the following prj.conf

    CONFIG_SOC_ENABLE_LFXO=y
    CONFIG_SOC_LFXO_CAP_INT_7PF=y
    CONFIG_SOC_HFXO_CAP_INTERNAL=y
    CONFIG_SOC_HFXO_CAP_INT_VALUE_X2=20

    @$ nrfjprog --memrd 0x500046D0
    0x500046D0: 00000002 |....|

    According to the documentation, it is correct. A value of 2 means the 7 pF internal load capacitance is selected

    • Then I put a break point in the function nordicsemi_nrf53_init() to see what the calculated cap value was, which was 7
      • I don't have much knowledge about this topic, so I'm not sure if a value of 7 makes sense. If it doesn't please let me know and I will take a closer look at it/ask internally
    • Then I read the XOSC32MCAPS register:

    @$ nrfjprog --memrd 0x500045C4
    0x500045C4: 00000107 |....|

    As you can see, this will enable the capacitor and set the cap value to 7

    Best regards,

    Simon

Reply
  • I did some testing.

    • I programmed the hello world sample (NCS v1.9.1) to the nRF5340 DK using the board name nrf5340dk_nrf5340_cpuapp with the following prj.conf

    CONFIG_SOC_ENABLE_LFXO=y
    CONFIG_SOC_LFXO_CAP_INT_7PF=y
    CONFIG_SOC_HFXO_CAP_INTERNAL=y
    CONFIG_SOC_HFXO_CAP_INT_VALUE_X2=20

    @$ nrfjprog --memrd 0x500046D0
    0x500046D0: 00000002 |....|

    According to the documentation, it is correct. A value of 2 means the 7 pF internal load capacitance is selected

    • Then I put a break point in the function nordicsemi_nrf53_init() to see what the calculated cap value was, which was 7
      • I don't have much knowledge about this topic, so I'm not sure if a value of 7 makes sense. If it doesn't please let me know and I will take a closer look at it/ask internally
    • Then I read the XOSC32MCAPS register:

    @$ nrfjprog --memrd 0x500045C4
    0x500045C4: 00000107 |....|

    As you can see, this will enable the capacitor and set the cap value to 7

    Best regards,

    Simon

Children
Related