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

How to add 5340 rtc to an empty project?

Hello,

As the question shows, how to add RTC function to a 5340 empty project?

condition

ncs:1.5.0

board: nrf5340dk

I have found a project,but it's 52840.

zephyr\tests\drivers\timer\nrf_rtc_timer

Can you give me some advice?

Thank you.

Parents
  • You can create an overlay file with the same name as your build target and place it in either the top folder of your project (along with prj.conf and CMakeLists.txt) or as shown in the nrf_rtc_timer application, in ../nrf_rtc_timer_/boards.

    The overlay file needs to have the same name as your build target. Considering you are compiling for nrf5340dk_nrf5340_cpuapp, the name of the overlay file would be: nrf5340dk_nrf5340_cpuapp.overlay.

    A good way to check if the compiler considers the overlay file is to check the build log:

    -- Found devicetree overlay: C:/Users/<user>/ncs/v1.5.1/zephyr/tests/drivers/timer/nrf_rtc_timer/boards/nrf5340dk_nrf5340_cpuapp.overlay

    Additionally, you can cross-check your ../<build-folder>/zephyr/zephyr.dts to confirm that the changes made in the overlay file are correct.

    I hope this will be help you!

    Cheers,

    Markus

Reply
  • You can create an overlay file with the same name as your build target and place it in either the top folder of your project (along with prj.conf and CMakeLists.txt) or as shown in the nrf_rtc_timer application, in ../nrf_rtc_timer_/boards.

    The overlay file needs to have the same name as your build target. Considering you are compiling for nrf5340dk_nrf5340_cpuapp, the name of the overlay file would be: nrf5340dk_nrf5340_cpuapp.overlay.

    A good way to check if the compiler considers the overlay file is to check the build log:

    -- Found devicetree overlay: C:/Users/<user>/ncs/v1.5.1/zephyr/tests/drivers/timer/nrf_rtc_timer/boards/nrf5340dk_nrf5340_cpuapp.overlay

    Additionally, you can cross-check your ../<build-folder>/zephyr/zephyr.dts to confirm that the changes made in the overlay file are correct.

    I hope this will be help you!

    Cheers,

    Markus

Children
Related