ADC implementation inside TF-M

Hi, is there any reference to implement ADC sampling inside TF-M?

I see all the reference there are for implementing ADC in non-secure application. Please point to any documentation or sample application that runs ADC in TF-M instead of non-secure application.

Parents
  • Hi,

    There is TF-M secure peripheral partition sample which demonstrates how to use secure peripherals in TF-M partition.

    Best regards,
    Dejan

  • Thank you for the reference.

    I am getting fatal error after configuring a sample application to run ADC in secure, please see below:

    fatal error: soc.h: No such file or directory
       19 | #include <soc.h>

    When I try to add below include file, I see the fatal error.

    #include <zephyr/drivers/adc.h>
    Any idea on why the file is not fetched from TF-M?
    The same example if I run in non-secure application, it is working fine.
    How do I configure ADC to run in secure mode, as I do not see any CONFIG_NRF_ADC_SECURE flag to enable ADC in secure.
    Please let me know if I am missing anything.
  • Hi Dejans,

    --> Yes

    Which NCS version do you use?

    --> v2.2.0

    Could you provide information how you built the sample?

    --> Below are my observations.

    Case 1: If I build with the TF-M secure peripheral partition sample (github.com), I am getting so many undefined errors from zephyr library.

    Added below line to prf.conf file and no other changes made.

     

    CONFIG_ADC=y

    Please find the error logs in the attachment.

    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/toolchain/gcc.h:554:2: error: #error processor architecture not supported
      554 | #error processor architecture not supported
          |  ^~~~~
    In file included from D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel_includes.h:28:
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel_structs.h:159:26: error: 'CONFIG_MP_MAX_NUM_CPUS' undeclared here (not in a function)
      159 |         struct _cpu cpus[CONFIG_MP_MAX_NUM_CPUS];
          |                          ^~~~~~~~~~~~~~~~~~~~~~
    In file included from D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/arch_interface.h:1287,
                     from D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/arch/cpu.h:12,
                     from D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel_includes.h:33:
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/arch/arch_inlines.h:36:2: error: #error "Unknown Architecture"
       36 | #error "Unknown Architecture"
          |  ^~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/arch/cpu.h:35:2: error: #error "Unknown Architecture"
       35 | #error "Unknown Architecture"
          |  ^~~~~
    In file included from D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys_clock.h:25,
                     from D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel_includes.h:35:
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'sys_clock_hw_cycles_per_sec':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:64:16: error: 'CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC' undeclared (first use in this function)
       64 |         return CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC;
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:64:16: note: each undeclared identifier is reported only once for each function it appears in
    In file included from D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel/sched_priq.h:9,
                     from D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel_includes.h:23:
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'z_tmcvt':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:80:28: error: 'CONFIG_SYS_CLOCK_MAX_TIMEOUT_DAYS' undeclared (first use in this function)
       80 |         ((ceiling_fraction(CONFIG_SYS_CLOCK_MAX_TIMEOUT_DAYS * 24ULL * 3600ULL * from_hz, \
          |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/util.h:238:12: note: in definition of macro 'ceiling_fraction'
      238 |         (((numerator) + ((divider) - 1)) / (divider))
          |            ^~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:150:40: note: in expansion of macro 'Z_TMCVT_USE_FAST_ALGO'
      150 |                 } else if (const_hz && Z_TMCVT_USE_FAST_ALGO(from_hz, to_hz)) {
          |                                        ^~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ms_to_ticks_floor32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:336:36: note: in expansion of macro 'Z_HZ_ticks'
      336 |         return z_tmcvt(t, Z_HZ_ms, Z_HZ_ticks, true, true, false, false);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ms_to_ticks_floor64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:350:36: note: in expansion of macro 'Z_HZ_ticks'
      350 |         return z_tmcvt(t, Z_HZ_ms, Z_HZ_ticks, true, false, false, false);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ms_to_ticks_near32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:364:36: note: in expansion of macro 'Z_HZ_ticks'
      364 |         return z_tmcvt(t, Z_HZ_ms, Z_HZ_ticks, true, true, false, true);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ms_to_ticks_near64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:378:36: note: in expansion of macro 'Z_HZ_ticks'
      378 |         return z_tmcvt(t, Z_HZ_ms, Z_HZ_ticks, true, false, false, true);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ms_to_ticks_ceil32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:392:36: note: in expansion of macro 'Z_HZ_ticks'
      392 |         return z_tmcvt(t, Z_HZ_ms, Z_HZ_ticks, true, true, true, false);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ms_to_ticks_ceil64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:406:36: note: in expansion of macro 'Z_HZ_ticks'
      406 |         return z_tmcvt(t, Z_HZ_ms, Z_HZ_ticks, true, false, true, false);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_us_to_ticks_floor32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:504:36: note: in expansion of macro 'Z_HZ_ticks'
      504 |         return z_tmcvt(t, Z_HZ_us, Z_HZ_ticks, true, true, false, false);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_us_to_ticks_floor64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:518:36: note: in expansion of macro 'Z_HZ_ticks'
      518 |         return z_tmcvt(t, Z_HZ_us, Z_HZ_ticks, true, false, false, false);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_us_to_ticks_near32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:532:36: note: in expansion of macro 'Z_HZ_ticks'
      532 |         return z_tmcvt(t, Z_HZ_us, Z_HZ_ticks, true, true, false, true);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_us_to_ticks_near64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:546:36: note: in expansion of macro 'Z_HZ_ticks'
      546 |         return z_tmcvt(t, Z_HZ_us, Z_HZ_ticks, true, false, false, true);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_us_to_ticks_ceil32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:560:36: note: in expansion of macro 'Z_HZ_ticks'
      560 |         return z_tmcvt(t, Z_HZ_us, Z_HZ_ticks, true, true, true, false);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_us_to_ticks_ceil64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:574:36: note: in expansion of macro 'Z_HZ_ticks'
      574 |         return z_tmcvt(t, Z_HZ_us, Z_HZ_ticks, true, false, true, false);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ns_to_ticks_floor32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:672:36: note: in expansion of macro 'Z_HZ_ticks'
      672 |         return z_tmcvt(t, Z_HZ_ns, Z_HZ_ticks, true, true, false, false);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ns_to_ticks_floor64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:686:36: note: in expansion of macro 'Z_HZ_ticks'
      686 |         return z_tmcvt(t, Z_HZ_ns, Z_HZ_ticks, true, false, false, false);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ns_to_ticks_near32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:700:36: note: in expansion of macro 'Z_HZ_ticks'
      700 |         return z_tmcvt(t, Z_HZ_ns, Z_HZ_ticks, true, true, false, true);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ns_to_ticks_near64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:714:36: note: in expansion of macro 'Z_HZ_ticks'
      714 |         return z_tmcvt(t, Z_HZ_ns, Z_HZ_ticks, true, false, false, true);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ns_to_ticks_ceil32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:728:36: note: in expansion of macro 'Z_HZ_ticks'
      728 |         return z_tmcvt(t, Z_HZ_ns, Z_HZ_ticks, true, true, true, false);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ns_to_ticks_ceil64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:742:36: note: in expansion of macro 'Z_HZ_ticks'
      742 |         return z_tmcvt(t, Z_HZ_ns, Z_HZ_ticks, true, false, true, false);
          |                                    ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_cyc_to_ticks_floor32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1008:37: note: in expansion of macro 'Z_HZ_ticks'
     1008 |         return z_tmcvt(t, Z_HZ_cyc, Z_HZ_ticks, Z_CCYC, true, false, false);
          |                                     ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_cyc_to_ticks_floor64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1022:37: note: in expansion of macro 'Z_HZ_ticks'
     1022 |         return z_tmcvt(t, Z_HZ_cyc, Z_HZ_ticks, Z_CCYC, false, false, false);
          |                                     ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_cyc_to_ticks_near32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1036:37: note: in expansion of macro 'Z_HZ_ticks'
     1036 |         return z_tmcvt(t, Z_HZ_cyc, Z_HZ_ticks, Z_CCYC, true, false, true);
          |                                     ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_cyc_to_ticks_near64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1050:37: note: in expansion of macro 'Z_HZ_ticks'
     1050 |         return z_tmcvt(t, Z_HZ_cyc, Z_HZ_ticks, Z_CCYC, false, false, true);
          |                                     ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_cyc_to_ticks_ceil32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1064:37: note: in expansion of macro 'Z_HZ_ticks'
     1064 |         return z_tmcvt(t, Z_HZ_cyc, Z_HZ_ticks, Z_CCYC, true, true, false);
          |                                     ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_cyc_to_ticks_ceil64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1078:37: note: in expansion of macro 'Z_HZ_ticks'
     1078 |         return z_tmcvt(t, Z_HZ_cyc, Z_HZ_ticks, Z_CCYC, false, true, false);
          |                                     ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_ms_floor32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1092:27: note: in expansion of macro 'Z_HZ_ticks'
     1092 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_ms, true, true, false, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_ms_floor64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1106:27: note: in expansion of macro 'Z_HZ_ticks'
     1106 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_ms, true, false, false, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_ms_near32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1120:27: note: in expansion of macro 'Z_HZ_ticks'
     1120 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_ms, true, true, false, true);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_ms_near64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1134:27: note: in expansion of macro 'Z_HZ_ticks'
     1134 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_ms, true, false, false, true);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_ms_ceil32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1148:27: note: in expansion of macro 'Z_HZ_ticks'
     1148 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_ms, true, true, true, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_ms_ceil64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1162:27: note: in expansion of macro 'Z_HZ_ticks'
     1162 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_ms, true, false, true, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_us_floor32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1176:27: note: in expansion of macro 'Z_HZ_ticks'
     1176 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_us, true, true, false, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_us_floor64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1190:27: note: in expansion of macro 'Z_HZ_ticks'
     1190 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_us, true, false, false, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_us_near32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1204:27: note: in expansion of macro 'Z_HZ_ticks'
     1204 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_us, true, true, false, true);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_us_near64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1218:27: note: in expansion of macro 'Z_HZ_ticks'
     1218 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_us, true, false, false, true);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_us_ceil32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1232:27: note: in expansion of macro 'Z_HZ_ticks'
     1232 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_us, true, true, true, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_us_ceil64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1246:27: note: in expansion of macro 'Z_HZ_ticks'
     1246 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_us, true, false, true, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_ns_floor32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1260:27: note: in expansion of macro 'Z_HZ_ticks'
     1260 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_ns, true, true, false, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_ns_floor64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1274:27: note: in expansion of macro 'Z_HZ_ticks'
     1274 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_ns, true, false, false, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_ns_near32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1288:27: note: in expansion of macro 'Z_HZ_ticks'
     1288 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_ns, true, true, false, true);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_ns_near64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1302:27: note: in expansion of macro 'Z_HZ_ticks'
     1302 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_ns, true, false, false, true);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_ns_ceil32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1316:27: note: in expansion of macro 'Z_HZ_ticks'
     1316 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_ns, true, true, true, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_ns_ceil64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1330:27: note: in expansion of macro 'Z_HZ_ticks'
     1330 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_ns, true, false, true, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_cyc_floor32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1344:27: note: in expansion of macro 'Z_HZ_ticks'
     1344 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_cyc, Z_CCYC, true, false, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_cyc_floor64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1358:27: note: in expansion of macro 'Z_HZ_ticks'
     1358 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_cyc, Z_CCYC, false, false, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_cyc_near32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1372:27: note: in expansion of macro 'Z_HZ_ticks'
     1372 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_cyc, Z_CCYC, true, false, true);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_cyc_near64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1386:27: note: in expansion of macro 'Z_HZ_ticks'
     1386 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_cyc, Z_CCYC, false, false, true);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_cyc_ceil32':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1400:27: note: in expansion of macro 'Z_HZ_ticks'
     1400 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_cyc, Z_CCYC, true, true, false);
          |                           ^~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h: In function 'k_ticks_to_cyc_ceil64':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:238:20: error: 'CONFIG_SYS_CLOCK_TICKS_PER_SEC' undeclared (first use in this function)
      238 | #define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/time_units.h:1414:27: note: in expansion of macro 'Z_HZ_ticks'
     1414 |         return z_tmcvt(t, Z_HZ_ticks, Z_HZ_cyc, Z_CCYC, false, true, false);
          |                           ^~~~~~~~~~
    In file included from D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel_includes.h:37:
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/fatal.h: At top level:
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/fatal.h:87:59: error: unknown type name 'z_arch_esf_t'
       87 | void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *esf);
          |                                                           ^~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/fatal.h:103:47: error: unknown type name 'z_arch_esf_t'
      103 | void z_fatal_error(unsigned int reason, const z_arch_esf_t *esf);
          |                                               ^~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel/thread_stack.h: In function 'z_stack_ptr_align':
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel/thread_stack.h:71:40: error: 'ARCH_STACK_PTR_ALIGN' undeclared (first use in this function)
       71 |         return (char *)ROUND_DOWN(ptr, ARCH_STACK_PTR_ALIGN);
          |                                        ^~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/util.h:226:49: note: in definition of macro 'ROUND_DOWN'
      226 |         ((unsigned long)(x) & ~((unsigned long)(align) - 1))
          |                                                 ^~~~~
    In file included from D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/app_memory/mem_domain.h:15,
                     from D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel_includes.h:40:
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel/thread.h: At top level:
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel/thread.h:250:30: error: field 'callee_saved' has incomplete type
      250 |         struct _callee_saved callee_saved;
          |                              ^~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel/thread.h:343:29: error: field 'arch' has incomplete type
      343 |         struct _thread_arch arch;
          |                             ^~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/kernel.h:48:2: error: #error Zero available thread priorities defined!
       48 | #error Zero available thread priorities defined!
          |  ^~~~~
    In file included from D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/toolchain/gcc.h:88:
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/device.h:83:41: error: '__device_dts_ord_73' undeclared here (not in a function)
       83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                         ^~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
      132 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/device.h:83:33: note: in expansion of macro '_CONCAT'
       83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                 ^~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/device.h:209:37: note: in expansion of macro 'DEVICE_NAME_GET'
      209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
          |                                     ^~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/device.h:226:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
      226 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
          |                                  ^~~~~~~~~~~~~~~~~~
    D:/work/nrf/app/tfm_secure_peripheral/secure_peripheral_partition/app_adc.c:33:39: note: in expansion of macro 'DEVICE_DT_GET'
       33 | static const struct device *adc_dev = DEVICE_DT_GET(ADC_NODE);
          |                                       ^~~~~~~~~~~~~
    D:/work/nrf/app/tfm_secure_peripheral/secure_peripheral_partition/app_adc.c:40:10: error: 'struct adc_channel_cfg' has no member named 'input_positive'
       40 |         .input_positive   = SAADC_CH_PSELP_PSELP_AnalogInput1,
          |          ^~~~~~~~~~~~~~
    In file included from D:/work/nrf/sdk/v2.2.0/v2.2.0/modules/hal/nordic/nrfx/mdk/nrf.h:171,
                     from D:/work/nrf/sdk/v2.2.0/v2.2.0/modules/hal/nordic/nrfx/drivers/nrfx_common.h:41,
                     from D:/work/nrf/sdk/v2.2.0/v2.2.0/modules/hal/nordic/nrfx/nrfx.h:38,
                     from D:/work/nrf/sdk/v2.2.0/v2.2.0/modules/hal/nordic/nrfx/hal/nrf_gpio.h:37,
                     from D:/work/nrf/app/tfm_secure_peripheral/secure_peripheral_partition/app_adc.c:17:
    D:/work/nrf/sdk/v2.2.0/v2.2.0/modules/hal/nordic/nrfx/mdk/nrf5340_application_bitfields.h:12077:43: warning: conversion from 'long unsigned int' to 'unsigned char:1' changes value from '2' to '0' [-Woverflow]
    12077 | #define SAADC_CH_PSELP_PSELP_AnalogInput1 (2UL) /*!< AIN1 */
          |                                           ^
    D:/work/nrf/app/tfm_secure_peripheral/secure_peripheral_partition/app_adc.c:40:29: note: in expansion of macro 'SAADC_CH_PSELP_PSELP_AnalogInput1'
       40 |         .input_positive   = SAADC_CH_PSELP_PSELP_AnalogInput1,
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    D:/work/nrf/app/tfm_secure_peripheral/secure_peripheral_partition/app_adc.c: In function 'app_adc_enable':
    D:/work/nrf/app/tfm_secure_peripheral/secure_peripheral_partition/app_adc.c:64:29: error: 'GPIO_BAT_ADC_VDD' undeclared (first use in this function)
       64 |         nrf_gpio_cfg_output(GPIO_BAT_ADC_VDD);
          |                             ^~~~~~~~~~~~~~~~
    D:/work/nrf/app/tfm_secure_peripheral/secure_peripheral_partition/app_adc.c: In function 'app_adc_disable':
    D:/work/nrf/app/tfm_secure_peripheral/secure_peripheral_partition/app_adc.c:76:28: error: 'GPIO_BAT_ADC_VDD' undeclared (first use in this function)
       76 |         nrf_gpio_pin_clear(GPIO_BAT_ADC_VDD);
          |                            ^~~~~~~~~~~~~~~~
    D:/work/nrf/app/tfm_secure_peripheral/secure_peripheral_partition/app_adc.c:77:28: error: 'GPIO_BAT_ADC' undeclared (first use in this function)
       77 |         nrf_gpio_cfg_input(GPIO_BAT_ADC, NRF_GPIO_PIN_NOPULL);
          |                            ^~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/arch_interface.h: At top level:
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/arch_interface.h:59:24: warning: 'arch_k_cycle_get_32' used but never defined
       59 | static inline uint32_t arch_k_cycle_get_32(void);
          |                        ^~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/arch_interface.h:66:24: warning: 'arch_k_cycle_get_64' used but never defined
       66 | static inline uint64_t arch_k_cycle_get_64(void);
          |                        ^~~~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/arch_interface.h:247:28: warning: 'arch_irq_lock' used but never defined
      247 | static inline unsigned int arch_irq_lock(void);
          |                            ^~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/arch_interface.h:254:20: warning: 'arch_irq_unlock' used but never defined
      254 | static inline void arch_irq_unlock(unsigned int key);
          |                    ^~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/arch_interface.h:263:20: warning: 'arch_irq_unlocked' declared 'static' but never defined [-Wunused-function]
      263 | static inline bool arch_irq_unlocked(unsigned int key);
          |                    ^~~~~~~~~~~~~~~~~
    D:/work/nrf/sdk/v2.2.0/v2.2.0/zephyr/include/zephyr/sys/arch_interface.h:473:28: warning: 'arch_num_cpus' declared 'static' but never defined [-Wunused-function]
      473 | static inline unsigned int arch_num_cpus(void);
    

    Case 2: If I try to integrate to our project, I get below error.

    fatal error: soc.h: No such file or directory
       19 | #include <soc.h>

    Please let me know where I am doing wrong.

    Thank you.

  • Could you test TF-M secure peripheral partition using NCS v2.5.0?

    --> Same error.

    I heard device tree or zephyr libraries are not supported by TF-M, I am not sure on this. If so, is there any example application which uses NRF/NRFX library instead to config and read from ADC channels?

  • Hi,

    I have tested secure_peripheral sample in NCS v2.5.0 and I did not observe any errors regardless of CONFIG_ADC being added (and enabled) or not. I built the sample for nrf5340dk_nrf5340_cpuapp_ns build target.

    Best regards,
    Dejan

  • Hi Dejans,

    I can build the secure_peripheral sample in NCS v2.5.0 with no errors

    I am getting error only after integrating ADC example into the TF-M.

Reply Children
Related