nRF5340 internal RC oscillator

Hello everyone,

I am working on a project that uses the nRF5340 microcontroller and Zephyr.

Initially I took an EVK-NORA-B106 development board that mounts the NORA-B1 module.

I developed a firmware to make a central BLE device with the nRF5340 microcontroller and everything works correctly.

Then I switched to a custom electronic board in which I forgot to insert the low frequency quartz.

After loading the firmware the microcontroller did not start.

Then I realized that I forgot to insert the low frequency quartz and so I inserted the following configuration in the prj.conf file to activate the internal RC oscillator:

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y

Now the core application starts but the core network has problems and does not work properly. I have the following errors:

[00:00:01.001,220] <err> bt_hci_driver: Endpoint binding failed with -11
[00:00:01.001,251] <err> bt_hci_core: HCI driver open failed (-11)

Searching the forums I understood that I also had to set the core network to use the internal RC oscillator and so I inserted the same configurations in the file C:\ncs\v2.6.0\zephyr\samples\bluetooth\hci_ipc\prj.conf

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y

Now there is still something wrong, I have the following error:

00> [00:00:00.021,484] <wrn> bt_hci_core: opcode 0x0c33 status 0x11
00> [00:00:00.021,514] <inf> BLE: Bluetooth init failed (err -5)

I would like to ask the following questions:

1) Is there a way to enable internal RC oscillator also for core network without modifying the file C:\ncs\v2.6.0\zephyr\samples\bluetooth\hci_ipc\prj.conf?

2) how do I solve the error BLE: Bluetooth init failed (err -5)?

Thanks a lot

Parents
  • Hi,

    I use central hids example to verify nRF5340 internal RC oscillator.

    I add your config in prj.conf and nrf5340dk_nrf5340_cpunet_defconfig which is in nrf5340dk zephyr board folder.

    And check the file : \central_hids\build\hci_ipc\zephyr\include\generated\autoconf.h.

    The file shows that #define CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC 1

    This make sure the network core use internal RC oscillator.

    I program hex files to nRF5340 dk and the log shows it work normally.

    I think you can use the same step to check the problem.

Reply
  • Hi,

    I use central hids example to verify nRF5340 internal RC oscillator.

    I add your config in prj.conf and nrf5340dk_nrf5340_cpunet_defconfig which is in nrf5340dk zephyr board folder.

    And check the file : \central_hids\build\hci_ipc\zephyr\include\generated\autoconf.h.

    The file shows that #define CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC 1

    This make sure the network core use internal RC oscillator.

    I program hex files to nRF5340 dk and the log shows it work normally.

    I think you can use the same step to check the problem.

Children
No Data
Related