mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cde8ac6093
The NXP QN908x CPU family is a Cortex-M4F CPU with integrated USB, Bluetooth Low Energy and in some variants NFC. This patch implements the first steps for having support for this CPU. While the QN908x can be considered the successor of similar chips from NXP like the KW41Z when looking at the feature set, the internal architecture, boot image format and CPU peripherals don't match those in the Kinetis line. Therefore, this patch creates a new directory for just the QN908x chip under cpu/qn908x. The minimal set of peripherals are implemented in this patch to allow the device to boot and enable a GPIO: the gpio and wdt peripheral modules only. The wdt driver is required to boot and disable the wdt. On reset, the wdt is disabled by the chip, however the QN908x bootloader stored in the internal ROM enables the wdt and sets a timer to reboot after 10 seconds, therefore it is needed to disable the wdt in RIOT OS soon after booting. This patch sets it up such that when no periph_wdt module is used the Watchdog is disabled, but if the periph_wdt is used it must be configured (initialized) within the first 10 seconds. Tests performed: Defined a custom board for this CPU and compiled a simple application that blinks some LEDs. Manually tested with periph_wdt and with periph_wdt_cb as well.
52 lines
1.2 KiB
Plaintext
52 lines
1.2 KiB
Plaintext
# Copyright (c) 2020 iosabi
|
|
#
|
|
# This file is subject to the terms and conditions of the GNU Lesser
|
|
# General Public License v2.1. See the file LICENSE in the top level
|
|
# directory for more details.
|
|
#
|
|
|
|
config CPU_FAM_QN908X
|
|
bool
|
|
select CPU_CORE_CORTEX_M4F
|
|
select HAS_CORTEXM_MPU
|
|
select HAS_CPU_QN908X
|
|
select HAS_PERIPH_CPUID
|
|
select HAS_PERIPH_GPIO
|
|
select HAS_PERIPH_GPIO_IRQ
|
|
select HAS_PERIPH_WDT
|
|
select HAS_PERIPH_WDT_CB
|
|
|
|
## CPU Models
|
|
# For cpus QN9080CHN (revision C) and QN9080DHN (revision D)
|
|
config CPU_MODEL_QN9080XHN
|
|
bool
|
|
select CPU_FAM_QN908X
|
|
|
|
# For the smaller package for the same die, with 28 GPIOs instead of 35.
|
|
# cpus QN9083CUK (revision C) and QN9083DUK (revision D)
|
|
config CPU_MODEL_QN9083XUK
|
|
bool
|
|
select CPU_FAM_QN908X
|
|
|
|
## CPU common symbols
|
|
config CPU_FAM
|
|
default "qn908x" if CPU_FAM_QN908X
|
|
|
|
config CPU_MODEL
|
|
default "qn9080xhn" if CPU_MODEL_QN9080XHN
|
|
default "qn9083xhk" if CPU_MODEL_QN9083XUK
|
|
|
|
config CPU
|
|
default "qn908x" if CPU_FAM_QN908X
|
|
|
|
## Definition of specific features
|
|
config HAS_CPU_QN908X
|
|
bool
|
|
help
|
|
Indicates that the current cpu is 'qn908x'.
|
|
|
|
# Other cpu configuration
|
|
rsource "Kconfig.clk"
|
|
|
|
source "$(RIOTCPU)/cortexm_common/Kconfig"
|