You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/08/05 01:43:41 UTC

[incubator-nuttx] branch master updated (f64677b8c9 -> 1421bc58db)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


    from f64677b8c9 Add Embedded Template Library (ETL) support
     new b9c6284750 imxrt:lowputc add extern "C"
     new 5e902861d9 imxrt:usdhc fix error when CONFIG_ARMV7M_DCACHE is off
     new 1421bc58db imxrt:Correct register usage in up_rtc_settime

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/arm/src/imxrt/hardware/imxrt_snvs.h |  4 ++++
 arch/arm/src/imxrt/imxrt_lowputc.h       | 16 +++++++++++++++-
 arch/arm/src/imxrt/imxrt_lpsrtc.c        |  8 ++++----
 arch/arm/src/imxrt/imxrt_usdhc.c         |  2 ++
 4 files changed, 25 insertions(+), 5 deletions(-)


[incubator-nuttx] 03/03: imxrt:Correct register usage in up_rtc_settime

Posted by xi...@apache.org.
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/incubator-nuttx.git

commit 1421bc58dbd8936fa5be8b1f53294666343e62c2
Author: David Sidrane <Da...@NscDg.com>
AuthorDate: Mon Jul 18 13:58:41 2022 -0700

    imxrt:Correct register usage in up_rtc_settime
---
 arch/arm/src/imxrt/hardware/imxrt_snvs.h | 4 ++++
 arch/arm/src/imxrt/imxrt_lpsrtc.c        | 8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/src/imxrt/hardware/imxrt_snvs.h b/arch/arm/src/imxrt/hardware/imxrt_snvs.h
index 791148a3d8..29105ebcc1 100644
--- a/arch/arm/src/imxrt/hardware/imxrt_snvs.h
+++ b/arch/arm/src/imxrt/hardware/imxrt_snvs.h
@@ -47,6 +47,8 @@
 #define IMXRT_SNVS_LPLR_OFFSET        0x0034  /* SNVS_LP Lock Register */
 #define IMXRT_SNVS_LPCR_OFFSET        0x0038  /* SNVS_LP Control Register */
 #define IMXRT_SNVS_LPSR_OFFSET        0x004c  /* SNVS_LP Status Register */
+#define IMXRT_SNVS_LPSRTCMR_OFFSET    0x0050  /* SNVS_LP Secure Real Time Counter MSB Register */
+#define IMXRT_SNVS_LPSRTCLR_OFFSET    0x0054  /* SNVS_LP Secure Real Time Counter LSB Register */
 #define IMXRT_SNVS_LPSMCMR_OFFSET     0x005c  /* SNVS_LP Secure Monotonic Counter MSB Register */
 #define IMXRT_SNVS_LPSMCLR_OFFSET     0x0060  /* SNVS_LP Secure Monotonic Counter LSB Register */
 
@@ -80,6 +82,8 @@
 #define IMXRT_SNVS_LPLR               (IMXRT_SNVSHP_BASE + IMXRT_SNVS_LPLR_OFFSET)
 #define IMXRT_SNVS_LPCR               (IMXRT_SNVSHP_BASE + IMXRT_SNVS_LPCR_OFFSET)
 #define IMXRT_SNVS_LPSR               (IMXRT_SNVSHP_BASE + IMXRT_SNVS_LPSR_OFFSET)
+#define IMXRT_SNVS_LPSRTCMR           (IMXRT_SNVSHP_BASE + IMXRT_SNVS_LPSRTCMR_OFFSET)
+#define IMXRT_SNVS_LPSRTCLR           (IMXRT_SNVSHP_BASE + IMXRT_SNVS_LPSRTCLR_OFFSET)
 #define IMXRT_SNVS_LPSMCMR            (IMXRT_SNVSHP_BASE + IMXRT_SNVS_LPSMCMR_OFFSET)
 #define IMXRT_SNVS_LPSMCLR            (IMXRT_SNVSHP_BASE + IMXRT_SNVS_LPSMCLR_OFFSET)
 
diff --git a/arch/arm/src/imxrt/imxrt_lpsrtc.c b/arch/arm/src/imxrt/imxrt_lpsrtc.c
index 04429bf1b7..f39cd6949c 100644
--- a/arch/arm/src/imxrt/imxrt_lpsrtc.c
+++ b/arch/arm/src/imxrt/imxrt_lpsrtc.c
@@ -193,10 +193,10 @@ int up_rtc_settime(const struct timespec *ts)
   /* Disable the LPSRTC */
 
   regval  = getreg32(IMXRT_SNVS_LPCR);
-  regval &= ~SNVS_LPCR_MCENV;
+  regval &= ~SVNS_LPCR_SRTCENV;
   putreg32(regval, IMXRT_SNVS_LPCR);
 
-  while ((getreg32(IMXRT_SNVS_LPCR) & SNVS_LPCR_MCENV) != 0)
+  while ((getreg32(IMXRT_SNVS_LPCR) & SVNS_LPCR_SRTCENV) != 0)
     {
     }
 
@@ -207,8 +207,8 @@ int up_rtc_settime(const struct timespec *ts)
    * IMXRT_SNVS_LPSMCLR 32-bit LSB of alarm setting.
    */
 
-  putreg32((uint32_t)ts->tv_sec >> 17, IMXRT_SNVS_LPSMCMR);
-  putreg32((uint32_t)ts->tv_sec << 15, IMXRT_SNVS_LPSMCLR);
+  putreg32((uint32_t)ts->tv_sec >> 17, IMXRT_SNVS_LPSRTCMR);
+  putreg32((uint32_t)ts->tv_sec << 15, IMXRT_SNVS_LPSRTCLR);
 
   /* The time has been set */
 


[incubator-nuttx] 01/03: imxrt:lowputc add extern "C"

Posted by xi...@apache.org.
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/incubator-nuttx.git

commit b9c6284750d367b3ad9d2bfbcefc710fda2cf135
Author: David Sidrane <Da...@NscDg.com>
AuthorDate: Wed Mar 16 13:21:44 2022 -0700

    imxrt:lowputc add extern "C"
---
 arch/arm/src/imxrt/imxrt_lowputc.h | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/imxrt/imxrt_lowputc.h b/arch/arm/src/imxrt/imxrt_lowputc.h
index d38012aa8d..9db3f769be 100644
--- a/arch/arm/src/imxrt/imxrt_lowputc.h
+++ b/arch/arm/src/imxrt/imxrt_lowputc.h
@@ -40,6 +40,15 @@
  * Public Types
  ****************************************************************************/
 
+#undef EXTERN
+#if defined(__cplusplus)
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
 #ifdef HAVE_LPUART_DEVICE
 /* This structure describes the configuration of an UART */
 
@@ -102,4 +111,9 @@ void imxrt_lowputc(int ch);
 #  define imxrt_lowputc(ch)
 #endif
 
-#endif /* __ARCH_ARM_SRC_IMXRT_IMXRT_LOWPUTC_H */
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ARCH_ARM_SRC_IMXRT_LOWPUTC_H */


[incubator-nuttx] 02/03: imxrt:usdhc fix error when CONFIG_ARMV7M_DCACHE is off

Posted by xi...@apache.org.
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/incubator-nuttx.git

commit 5e902861d9a19f2d20ccf8ebea171f46dac89391
Author: David Sidrane <Da...@NscDg.com>
AuthorDate: Mon Jun 6 15:35:41 2022 -0700

    imxrt:usdhc fix error when CONFIG_ARMV7M_DCACHE is off
---
 arch/arm/src/imxrt/imxrt_usdhc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/src/imxrt/imxrt_usdhc.c b/arch/arm/src/imxrt/imxrt_usdhc.c
index 558cfd3b54..3f39b06af3 100644
--- a/arch/arm/src/imxrt/imxrt_usdhc.c
+++ b/arch/arm/src/imxrt/imxrt_usdhc.c
@@ -2217,7 +2217,9 @@ static void imxrt_blocksetup(struct sdio_dev_s *dev,
 
   /* Configure block size for next transfer */
 
+#if defined(CONFIG_ARMV7M_DCACHE)
   priv->blocksize = blocklen;
+#endif
 
   putreg32(USDHC_BLKATTR_SIZE(blocklen) | USDHC_BLKATTR_CNT(nblocks),
            priv->addr + IMXRT_USDHC_BLKATTR_OFFSET);