HW peripherals used by Zephyr / portable Zephyr HW APIs

Windows 11, VSCode, NCS v2.3.0

A few questions about HW peripherals being used outside of my application - by Zephyr OS or Zephyr libs/modules.

How can I find out which HW peripherals are used by the Zephyr OS, as well as any additional features of Zephyr (eg BLE, ESB, etc)?

eg the Zephyr OS is probably using some kind of RTC to drive its scheduling, etc.  Radio applications will use the radio, but also maybe timers, PPI, etc?

I am developing software that wants to use some HW features and it's not clear how I can tell what is in use already.

I believe there is no SoftDevice in use with a Zephyr application, correct?

So I don't need to worry about SoftDevice HW utilization also?

Can you help me understand which Zephyr API to use for timer/counter?

I'm not clear which API to use with Zephyr to be portable across devices.

I'm on nRF52840, but looking at building on RP2040 also.

The nRF52840 device has a rich set of features presented by its Timer/Counter peripheral. 

I found this Zephyr API link for HW/Peripherals/Counter - https://docs.zephyrproject.org/latest/hardware/peripherals/counter.html

Is that the Zephyr API I would use to be portable across devices when building with Zephyr?  Or maybe for RTC?

The API I linked to is very limited.  I'm not sure I can accomplish what I want with it. What do people typically do when underlying device interfaces aren't accessible via Zephyr APIs?

What API would I use for a Timer/Counter peripheral?  And is there an example?

Thanks.

Related