Commit graph

4 commits

Author SHA1 Message Date
Cong Nguyen Huu e02c27aeb8 drivers: counter_nxp_s32_sys_timer: update to RTD 1.0.0
Rename function Stm_Ip_GetInterruptFlag to Stm_Ip_GetInterruptStatusFlag.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-11-16 09:28:16 +01:00
Manuel Argüelles 595a9c11c8 counter: nxp_s32_sys_timer: use instance-based DT macros
At present, many of the NXP S32 shim drivers do not make use of
devicetree instance-based macros because the NXP S32 HAL relies on an
index-based approach, requiring knowledge of the peripheral instance
index during both compilation and runtime, and this index might not
align with the devicetree instance index.

The proposed solution in this patch eliminates this limitation by
determining the peripheral instance index during compilation
through macrobatics and defining the driver's ISR within the shim
driver itself.

Note that for some peripheral instances is needed to redefine the
HAL macros of the peripheral base address, since the naming is not
uniform for all instances.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-09 18:21:19 +01:00
Manuel Argüelles b38dab48c6 counter: nxp_s32_sys_timer: use clock control APIs
Use clock control API to retrieve the counter module's frequency and
update the boards using it to provide the source clocks.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-29 16:29:31 +02:00
Manuel Arguelles 4fbf940019 drivers: counter: support NXP S32 System Timer Module
NXP S32 System Timer module includes a 32-bit count-up timer and four
32-bit compare channels with a separate interrupt source for each
channel. The timer is driven by the module clock divided by an 8-bit
prescale value.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-11-30 11:29:39 +01:00