STM32H743 PAL WAIT Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
JSStabl
Posts: 78
Joined: Tue Feb 25, 2020 4:06 pm
Has thanked: 3 times
Been thanked: 2 times

STM32H743 PAL WAIT  Topic is solved

Postby JSStabl » Wed Mar 11, 2020 10:10 am

The STM32H743 seems to have an issue with the PAL WAIT Drivers. To reproduce go to:

Code: Select all

chibios191/demos/STM32/RT-STM32H743I-NUCLEO144


set

Code: Select all

/**
 * @brief   Enables synchronous APIs.
 * @note    Disabling this option saves both code and data space.
 */
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
#define PAL_USE_CALLBACKS                   TRUE
#endif

/**
 * @brief   Enables synchronous APIs.
 * @note    Disabling this option saves both code and data space.
 */
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
#define PAL_USE_WAIT                       TRUE
#endif


compile. Result:

Code: Select all

...(truncated)
Compiling hal_pal_lld.c
In file included from ../../../os/rt/include/ch.h:107:0,
                 from ../../../os/hal/osal/rt/osal.h:32,
                 from ../../../os/hal/include/hal.h:28,
                 from ../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:25:
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c: In function '_pal_lld_enablepadevent':
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:167:23: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'RTSR'; did you mean 'RTSR1'?
   osalDbgAssert(((EXTI->RTSR & padmask) == 0U) &&
                       ^
../../../os/rt/include/chdebug.h:130:11: note: in definition of macro 'chDbgAssert'
     if (!(c)) {                                                             \
           ^
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:167:3: note: in expansion of macro 'osalDbgAssert'
   osalDbgAssert(((EXTI->RTSR & padmask) == 0U) &&
   ^~~~~~~~~~~~~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:168:23: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'FTSR'; did you mean 'FTSR1'?
                 ((EXTI->FTSR & padmask) == 0U), "channel already in use");
                       ^
../../../os/rt/include/chdebug.h:130:11: note: in definition of macro 'chDbgAssert'
     if (!(c)) {                                                             \
           ^
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:167:3: note: in expansion of macro 'osalDbgAssert'
   osalDbgAssert(((EXTI->RTSR & padmask) == 0U) &&
   ^~~~~~~~~~~~~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:199:9: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'RTSR'; did you mean 'RTSR1'?
     EXTI->RTSR |= padmask;
         ^~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:201:9: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'RTSR'; did you mean 'RTSR1'?
     EXTI->RTSR &= ~padmask;
         ^~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:203:9: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'FTSR'; did you mean 'FTSR1'?
     EXTI->FTSR |= padmask;
         ^~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:205:9: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'FTSR'; did you mean 'FTSR1'?
     EXTI->FTSR &= ~padmask;
         ^~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:208:7: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'IMR'
   EXTI->IMR |= padmask;
       ^~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:209:7: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'EMR'
   EXTI->EMR &= ~padmask;
       ^~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c: In function '_pal_lld_disablepadevent':
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:229:15: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'RTSR'; did you mean 'RTSR1'?
   rtsr1 = EXTI->RTSR;
               ^~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:230:15: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'FTSR'; did you mean 'FTSR1'?
   ftsr1 = EXTI->FTSR;
               ^~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:261:9: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'IMR'
     EXTI->IMR  &= ~padmask;
         ^~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:262:9: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'EMR'
     EXTI->EMR  &= ~padmask;
         ^~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:263:9: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'RTSR'; did you mean 'RTSR1'?
     EXTI->RTSR  = rtsr1 & ~padmask;
         ^~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:264:9: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'FTSR'; did you mean 'FTSR1'?
     EXTI->FTSR  = ftsr1 & ~padmask;
         ^~
../../../os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.c:265:9: error: 'EXTI_TypeDef {aka struct <anonymous>}' has no member named 'PR'
     EXTI->PR    = padmask;
         ^~
make: *** [../../../os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk:178: build/obj/hal_pal_lld.o] Error 1


Is that due to the WIP status of the H7 port?

JSStabl
Posts: 78
Joined: Tue Feb 25, 2020 4:06 pm
Has thanked: 3 times
Been thanked: 2 times

Re: STM32H743 PAL WAIT

Postby JSStabl » Wed Mar 11, 2020 10:46 am

After some digging:

Adding #define STM32_EXTI_ENHANCED to mcuconf.h fixes the issues. Unsure if thats the right place to go. ArduPilot does it the same way.
https://github.com/ArduPilot/ardupilot/ ... _mcuconf.h

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: STM32H743 PAL WAIT

Postby Giovanni » Wed Mar 11, 2020 11:52 am

Hi,

That definitions has to go in stm32_registry.h, note that it is already present in all active branches. Probably the version you are using is not up to date, which version are you using?

Giovanni

JSStabl
Posts: 78
Joined: Tue Feb 25, 2020 4:06 pm
Has thanked: 3 times
Been thanked: 2 times

Re: STM32H743 PAL WAIT

Postby JSStabl » Wed Mar 11, 2020 2:58 pm

I downloaded ChibiStudio around two weeks ago and I'm using the included ChibiOS 19.1.1 stable.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: STM32H743 PAL WAIT

Postby Giovanni » Wed Mar 11, 2020 3:20 pm

Just update the chibios dir to version 19.1.3.

Giovanni

JSStabl
Posts: 78
Joined: Tue Feb 25, 2020 4:06 pm
Has thanked: 3 times
Been thanked: 2 times

Re: STM32H743 PAL WAIT

Postby JSStabl » Wed Mar 11, 2020 3:47 pm

Seems to fix it thanks!


Return to “Bug Reports”

Who is online

Users browsing this forum: Bing [Bot] and 8 guests