This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 8943d528fd arch/nrf52: add an option to configure QSPI sampling delay for RX data 8943d528fd is described below commit 8943d528fd36f40f17b7a05234ebdfe86aabf760 Author: raiden00pl <raide...@railab.me> AuthorDate: Thu May 25 12:59:02 2023 +0200 arch/nrf52: add an option to configure QSPI sampling delay for RX data The default RX delay value may not be suitable for high QSPI frequencies --- arch/arm/src/nrf52/Kconfig | 15 +++++++++++++++ arch/arm/src/nrf52/nrf52_qspi.c | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/arch/arm/src/nrf52/Kconfig b/arch/arm/src/nrf52/Kconfig index 500e714c20..1fc661c883 100644 --- a/arch/arm/src/nrf52/Kconfig +++ b/arch/arm/src/nrf52/Kconfig @@ -661,6 +661,21 @@ config NRF52_I2C_MASTER_COPY_BUF_SIZE endmenu +menu "QSPI Configuration" + +if NRF52_QSPI + +config NRF52_QSPI_RXDELAY + int "QSPI RX delay" + default 2 + range 0 7 + ---help--- + The input serial data sampling delay. + +endif # NRF52_QSPI + +endmenu # QSPI Configuration + menu "USBDEV Configuration" endmenu # USBDEV Configuration diff --git a/arch/arm/src/nrf52/nrf52_qspi.c b/arch/arm/src/nrf52/nrf52_qspi.c index 4b52e24902..c95df57e26 100644 --- a/arch/arm/src/nrf52/nrf52_qspi.c +++ b/arch/arm/src/nrf52/nrf52_qspi.c @@ -835,6 +835,11 @@ static int nrf52_qspi_hw_initialize(struct nrf52_qspidev_s *priv) regval |= QSPI_IFCONFIG0_PPSIZE_512; nrf52_qspi_putreg(priv, NRF52_QSPI_IFCONFIG0_OFFSET, regval); + /* Configure RX delay */ + + nrf52_qspi_putreg(priv, NRF52_QSPI_IFTIMING_OFFSET, + QSPI_IFTIMING_RXDELAY(CONFIG_NRF52_QSPI_RXDELAY)); + /* Enable READY interrupt */ nrf52_qspi_putreg(priv, NRF52_QSPI_INTENSET_OFFSET, QSPI_INT_READY);