• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

README.mdD18-Mar-20251.8 KiB3730

nrf_54_aar.cD18-Mar-20253.3 KiB10483

nrf_54_ccm.cD18-Mar-20253.1 KiB10382

nrf_54_ecb.cD18-Mar-20252.4 KiB8465

nrf_aar.cD18-Mar-20252.2 KiB7658

nrf_ccm.cD18-Mar-20252.5 KiB8364

nrf_clock.cD18-Mar-20254.2 KiB156126

nrf_common.cD18-Mar-2025348 177

nrf_cracen.cD18-Mar-20251.1 KiB4028

nrf_cracen_cm.cD18-Mar-20251.6 KiB5741

nrf_cracen_rng.cD18-Mar-20251.3 KiB3826

nrf_dppi.cD18-Mar-20254.4 KiB141103

nrf_ecb.cD18-Mar-20252.2 KiB7658

nrf_egu.cD18-Mar-20252.2 KiB8055

nrf_gpio.cD18-Mar-202510.1 KiB277188

nrf_gpiote.cD18-Mar-202511.4 KiB325257

nrf_grtc.cD18-Mar-20257.4 KiB215176

nrf_hack.cD18-Mar-202513 KiB400251

nrf_hal_originals.cD18-Mar-20254.1 KiB265189

nrf_ipc.cD18-Mar-20252.1 KiB7754

nrf_mutex.cD18-Mar-2025533 2313

nrf_nvmc.cD18-Mar-20253 KiB12185

nrf_ppi.cD18-Mar-20252.3 KiB8264

nrf_ppib.cD18-Mar-20251.3 KiB4527

nrf_radio.cD18-Mar-20254.1 KiB145120

nrf_rng.cD18-Mar-20252.2 KiB8061

nrf_rramc.cD18-Mar-20251.3 KiB6140

nrf_rtc.cD18-Mar-20253.9 KiB135108

nrf_temp.cD18-Mar-20252.2 KiB7860

nrf_timer.cD18-Mar-20254.1 KiB126102

nrf_uart.cD18-Mar-20254 KiB150121

nrf_uarte.cD18-Mar-20255.8 KiB160133

README.md

1## nRFx HAL
2
3The HAL source files provided with these models implement
4some modifications to [the real nRFx HAL](https://github.com/NordicSemiconductor/nrfx/)
5needed due to the HW models peculiarities.
6Its main purpose is to allow unmodified embedded code to run directly
7using this repository HW models.
8
9There is two main differences in this HAL compared to the real one:
10
11* The peripherals base addresses point to the HW models register IF
12  instead of to hardcoded HW addresses.<br>
13  For example `NRF_PPI_BASE` is defined as `(&NRF_PPI_regs)`, where
14  `NRF_PPI_regs` is the HW models structure containing the PPI model
15  registers
16
17* When a HW register with sideeffects is written, the appropriate
18  HW model function is called to trigger that sideeffect.<br>
19  A sideeffect should be understood as some activity beyond the modification
20  of the register itself. For example, in real HW, writting a `1` to
21  `NRF_RNG->TASKS_START` will start the random number generation.
22  When using the HW models, doing this write in itself would only change
23  that memory location content. To trigger the actual sideeffect the
24  function `nrf_rng_regw_sideeffects_TASK_START()` needs to be called.
25  This replacement HAL functions take care of that.
26
27The original implementation of the HAL APIs from the real nrfx is included in
28`nrf_hal_originals.c`.
29All these functions are labelled as weak, so they can be replaced as needed with content
30of `src/nrfx/hal/`. This removes the need for duplicating code.
31
32Note that this replacement HAL only provides the necessary replacements for the subset of the
33nRFx API corresponding to the peripherals included in these models.
34Note also that for these, not necessarily all nRFx functions which could need replacing are
35included. Though those used by Zephyr should be included.
36It is certainly possible to expand it to cover the whole API.
37