nuttx/boards/arm/samv7/common/Kconfig
Michal Lenc 4fa5e294ac boards/samv7/common: add support for UART RX DMA polling
This adds the support for RX DMA polling. The board initializes
timer channel SAMV7_UART_RXDMA_POLL_TIMER with frequency
SAMV7_UART_RXDMA_POLL_FREQUENCY that triggers DMA polling function.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-01-30 13:55:13 +08:00

162 lines
4.2 KiB
Text

#
# For a description of the syntax of this configuration file,
# see the file kconfiglanguage.txt in the NuttX tools repository.
#
config SAMV7_GPIO_ENC
bool "GPIO driver based encoder"
default n
depends on SENSORS_QENCODER
---help---
This options allows the usage of an encoder based on a GPIO driver.
The encoder is initialized by sam_gpio_enc_init() function call
from board specific bringup code.
config SAMV7_HSMCI0_AUTOMOUNT
bool "HSMCI0 automounter"
default n
depends on FS_AUTOMOUNTER && SAMV7_HSMCI0
if SAMV7_HSMCI0_AUTOMOUNT
config SAMV7_HSMCI0_AUTOMOUNT_FSTYPE
string "HSMCI0 file system type"
default "vfat"
config SAMV7_HSMCI0_AUTOMOUNT_BLKDEV
string "HSMCI0 block device"
default "/dev/mmcsd0"
config SAMV7_HSMCI0_AUTOMOUNT_MOUNTPOINT
string "HSMCI0 mount point"
default "/mnt/sdcard0"
config SAMV7_HSMCI0_AUTOMOUNT_DDELAY
int "HSMCI0 debounce delay (milliseconds)"
default 1000
config SAMV7_HSMCI0_AUTOMOUNT_UDELAY
int "HSMCI0 unmount retry delay (milliseconds)"
default 2000
endif # SAMV7_HSMCI0_AUTOMOUNT
config SAMV7_HSMCI0_MOUNT
bool "HSMCI0 boot mount"
default n
depends on !DISABLE_MOUNTPOINT && SAMV7_HSMCI0 && !SAMV7_HSMCI0_AUTOMOUNT
if SAMV7_HSMCI0_MOUNT
config SAMV7_HSMCI0_MOUNT_FSTYPE
string "HSMCI0 file system type"
default "vfat"
config SAMV7_HSMCI0_MOUNT_BLKDEV
string "HSMCI0 block device"
default "/dev/mmcsd0"
config SAMV7_HSMCI0_MOUNT_MOUNTPOINT
string "HSMCI0 mount point"
default "/bin"
endif # SAMV7_HSMCI0_MOUNT
config SAMV7_UART_RXDMA_POLL
bool "Enable U(S)ART RX DMA Polling"
default n
depends on UART0_RXDMA || UART1_RXDMA || UART2_RXDMA || UART3_RXDMA || \
UART4_RXDMA || USART0_RXDMA || USART1_RXDMA || USART2_RXDMA
---help---
UART peripheral with RX DMA need periodic polling that checks the received
DMA buffers for received bytes that have not accumulated to the point
where the DMA interrupt has triggered.
if SAMV7_UART_RXDMA_POLL
config SAMV7_UART_RXDMA_POLL_TIMER
int "Timer channel to trigger polling"
default 0
range 0 11
---help---
The number of timer channel to trigger the polling. Values from 0 to 11
are available. Be careful not to assign the same channel that is
already configured to other peripheral (ADC trigger for example).
config SAMV7_UART_RXDMA_POLL_FREQUENCY
int "Timer frequency"
default 1000
---help---
Frequency of the timer to trigger the polling. You might want to keep
this reasonably low to avoid unnecessary overhead and negate
DMA benefit.
endif # SAMV7_UART_RXDMA_POLL
config SAMV7_PROGMEM_OTA_PARTITION
bool
default n
select ARCH_RAMFUNCS
select BCH
select MTD
select MTD_BYTE_WRITE
select MTD_PARTITION
select MTD_PROGMEM
select SAMV7_PROGMEM
config SAMV7_MCUBOOT_HEADER_SIZE
hex
default 0x200
depends on SAMV7_FORMAT_MCUBOOT
menuconfig SAMV7_FORMAT_MCUBOOT
bool "MCUboot bootable format"
default n
select SAMV7_PROGMEM_OTA_PARTITION
---help---
The MCUboot support of loading the firmware images.
if SAMV7_FORMAT_MCUBOOT
comment "MCUboot Application Image OTA Update support"
config SAMV7_OTA_PRIMARY_SLOT_OFFSET
hex "MCUboot application image primary slot offset"
default 0x20000
config SAMV7_OTA_PRIMARY_SLOT_DEVPATH
string "Application image primary slot device path"
default "/dev/ota0"
config SAMV7_OTA_SECONDARY_SLOT_OFFSET
hex "MCUboot application image secondary slot offset"
default 0x48000 if SAMV7_MEM_FLASH_512
default 0x80000 if SAMV7_MEM_FLASH_1024
default 0x100000 if SAMV7_MEM_FLASH_2048
config SAMV7_OTA_SECONDARY_SLOT_DEVPATH
string "Application image secondary slot device path"
default "/dev/ota1"
config SAMV7_OTA_SLOT_SIZE
hex "MCUboot application image slot size (in bytes)"
default 0x28000 if SAMV7_MEM_FLASH_512
default 0x60000 if SAMV7_MEM_FLASH_1024
default 0xe0000 if SAMV7_MEM_FLASH_2048
config SAMV7_OTA_SCRATCH_OFFSET
hex "MCUboot scratch partition offset"
default 0x70000 if SAMV7_MEM_FLASH_512
default 0xe0000 if SAMV7_MEM_FLASH_1024
default 0x1e0000 if SAMV7_MEM_FLASH_2048
config SAMV7_OTA_SCRATCH_DEVPATH
string "Scratch partition device path"
default "/dev/otascratch"
config SAMV7_OTA_SCRATCH_SIZE
hex "MCUboot scratch partition size (in bytes)"
default 0x10000 if SAMV7_MEM_FLASH_512
default 0x20000
endif # SAMV7_FORMAT_MCUBOOT