1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/qn908x/Kconfig
iosabi dfdd076125 cpu/qn908x: Implement blocking SPI support.
This patch implements the basic support the last of the FLEXCOMM modes,
Serial Peripheral Interface, in a simple blocking mode with busy wait,
which is enough to test all the SPI functionality end-to-end.

Tested reading and writing registers on a SPI peripheral, and checked
with the oscilloscope that the frequencies were as expected.

Results from `tests/periph_spi`:

```
> init 0 0 2 -1 0
SPI_DEV(0) initialized: mode: 0, clk: 2, cs_port: -1, cs_pin: 0
> bench

 1 - write 1000 times 1 byte:			16002	16009
 2 - write 1000 times 2 byte:			18001	18008
 3 - write 1000 times 100 byte:		802000	802007
 4 - write 1000 times 1 byte to register:	24003	24010
 5 - write 1000 times 2 byte to register:	26001	26008
 6 - write 1000 times 100 byte to register:	810001	810008
 7 - read 1000 times 2 byte:			23003	23009
 8 - read 1000 times 100 byte:		807002	807009
 9 - read 1000 times 2 byte from register:	32002	32009
10 - read 1000 times 100 byte from register:	816002	816009
11 - transfer 1000 times 2 byte:		23003	23009
12 - transfer 1000 times 100 byte:		807003	807010
13 - transfer 1000 times 2 byte to register:	32003	32009
14 - transfer 1000 times 100 byte to register:816002	816009
15 - acquire/release 1000 times:		7222	7228
-- - SUM:					5059250	5059351

```
2021-01-31 16:27:20 +00:00

55 lines
1.3 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_I2C_RECONFIGURE
select HAS_PERIPH_RTC
select HAS_PERIPH_SPI_RECONFIGURE
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"