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

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 5d3a725d4c041d2e32e5f6a245f470d8a042b23f
Author: raiden00pl <[email protected]>
AuthorDate: Sat Oct 24 12:18:36 2026 +0200

    arch/arm/src/common/stm32: do not instrument LPTIM register accessors
    
    With -finstrument-functions (ARMV7M_STACKCHECK) each CNT read took longer
    than one count, so the getcounter() double read never matched and hung.
    
    Signed-off-by: raiden00pl <[email protected]>
    Assisted-by: Claude Code
---
 arch/arm/src/common/stm32/stm32_lptim.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/src/common/stm32/stm32_lptim.c 
b/arch/arm/src/common/stm32/stm32_lptim.c
index eada6d72a48..1c7fcfb4745 100644
--- a/arch/arm/src/common/stm32/stm32_lptim.c
+++ b/arch/arm/src/common/stm32/stm32_lptim.c
@@ -444,18 +444,21 @@ static struct stm32_lptim_priv_s * const g_lptim[] =
  * Name: stm32_getreg32 / stm32_putreg32 / stm32_modifyreg32
  ****************************************************************************/
 
+noinstrument_function
 static inline uint32_t stm32_getreg32(struct stm32_lptim_dev_s *dev,
                                       uint8_t offset)
 {
   return getreg32(((struct stm32_lptim_priv_s *)dev)->base + offset);
 }
 
+noinstrument_function
 static inline void stm32_putreg32(struct stm32_lptim_dev_s *dev,
                                   uint8_t offset, uint32_t value)
 {
   putreg32(value, ((struct stm32_lptim_priv_s *)dev)->base + offset);
 }
 
+noinstrument_function
 static inline void stm32_modifyreg32(struct stm32_lptim_dev_s *dev,
                                      uint8_t offset, uint32_t clearbits,
                                      uint32_t setbits)

Reply via email to