Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions arch/arm/src/kinetis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,8 @@ if(CONFIG_ANALOG)
endif()
endif()

if(CONFIG_KINETIS_PIT)
list(APPEND SRCS kinetis_oneshot_pit.c)
endif()

target_sources(arch PRIVATE ${SRCS})
51 changes: 45 additions & 6 deletions arch/arm/src/kinetis/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,51 @@ config KINETIS_TPM2
---help---
Support TPM module 2


config KINETIS_PIT
bool "Periodic Interrupt Timer (PIT)"
default n
select ONESHOT
select ONESHOT_COUNT
---help---
Support for Periodic Interrupt Timer (PIT).

From the Reference Manual:

The PIT module is an array of timers that can be
used to raise interrupts and trigger DMA channels.

Currently, PIT is used for oneshot lower half driver.

config KINETIS_PIT_CH0
bool "Channel 0"
default n
depends on KINETIS_PIT
---help---
Enable Channel 0 of the Periodic Interrupt Timer (PIT).

config KINETIS_PIT_CH1
bool "Channel 1"
default n
depends on KINETIS_PIT
---help---
Enable Channel 1 of the Periodic Interrupt Timer (PIT).

config KINETIS_PIT_CH2
bool "Channel 2"
default n
depends on KINETIS_PIT
---help---
Enable Channel 2 of the Periodic Interrupt Timer (PIT).

config KINETIS_PIT_CH3
bool "Channel 3"
default n
depends on KINETIS_PIT
---help---
Enable Channel 3 of the Periodic Interrupt Timer (PIT).


config KINETIS_LPTMR0
bool "Low power timer 0 (LPTMR0)"
default n
Expand Down Expand Up @@ -783,12 +828,6 @@ config KINETIS_PDB
---help---
Support the Programmable Delay Block

config KINETIS_PIT
bool "Programmable interval timer (PIT)"
default n
---help---
Support Programmable Interval Timers

endmenu

menu "Kinetis FTM PWM Configuration"
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/src/kinetis/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ ifneq ($(CONFIG_SCHED_TICKLESS),y)
CHIP_CSRCS += kinetis_timerisr.c
endif

ifeq ($(CONFIG_KINETIS_PIT),y)
CHIP_CSRCS += kinetis_oneshot_pit.c
endif

ifeq ($(CONFIG_BUILD_PROTECTED),y)
CHIP_CSRCS += kinetis_userspace.c
endif
Expand Down
Loading
Loading