default IRQ handlers removed for GPT 9/11/12/14 in r13226 Topic is solved

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: RoccoMarco, barthess

nikiwaibel
Posts: 22
Joined: Sat Mar 17, 2018 2:51 pm
Has thanked: 4 times
Been thanked: 12 times

default IRQ handlers removed for GPT 9/11/12/14 in r13226

Postby nikiwaibel » Mon Feb 10, 2020 4:53 pm

any reason why the default IRQ handlers (gpt_lld_serve_interrupt()) for GPT 9/11/12/14 were removed by r13226 ("Added support for timers 10 and 13 to STM32 GPT driver")?

if the removal is intended, what would be the right way to add an IRQ handler for one of the timers? it seems the defines in os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.c

Code: Select all

#if STM32_GPT_USE_TIM9 || defined(__DOXYGEN__)
#if !defined(STM32_TIM9_SUPPRESS_ISR)
#error "TIM9 ISR not defined by platform"
#endif /* !defined(STM32_TIM9_SUPPRESS_ISR) */
#endif /* STM32_GPT_USE_TIM9 */

do not allow custom handlers anymore (since r13226) …

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: default IRQ handlers removed for GPT 9/11/12/14 in r13226

Postby Giovanni » Mon Feb 10, 2020 6:58 pm

Hi,

Which STM32? those handlers (and all missing ones) have been added to stm32_isr.c for all new ones.

Giovanni

nikiwaibel
Posts: 22
Joined: Sat Mar 17, 2018 2:51 pm
Has thanked: 4 times
Been thanked: 12 times

Re: default IRQ handlers removed for GPT 9/11/12/14 in r13226

Postby nikiwaibel » Mon Feb 10, 2020 11:19 pm

TIM1/2/3/4/5/6/7/8up/21/22 in os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.c have:

Code: Select all

OSAL_IRQ_HANDLER(STM32_TIMx_HANDLER) {
  OSAL_IRQ_PROLOGUE();
  gpt_lld_serve_interrupt(&GPTDx);
  OSAL_IRQ_EPILOGUE();
}

defined, TIM9/10/11/12/13/14/15/16/17 not.

os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.c is used by all STM32, as far as i can see. STM32F4

r13226 (svn diff -r13225:r13226) removed the default handler for 9/11/12/14.
Selection_999(3509).png
https://drive.google.com/open?id=1YXVZh ... j_vZhW_RtM

nikiwaibel
Posts: 22
Joined: Sat Mar 17, 2018 2:51 pm
Has thanked: 4 times
Been thanked: 12 times

Re: default IRQ handlers removed for GPT 9/11/12/14 in r13226

Postby nikiwaibel » Tue Feb 11, 2020 1:55 am

if i try to enalbe TIM9/11 as GPT (STM32_GPT_USE_TIMx) — which should be available across the whole F4xx family — i get:
Selection_999(3511).png
Selection_999(3511).png (4.21 KiB) Viewed 20382 times
since -r13226.

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: default IRQ handlers removed for GPT 9/11/12/14 in r13226  Topic is solved

Postby Giovanni » Tue Feb 11, 2020 5:38 am

Hi,

If you want to define an ISR for those timers you need to:

1) Define STM32_TIMx_SUPPRESS_ISR in order to suppress the message for a specific timer.
2) Include stm32_timX.inc in some .c module, that includes the ISR.

This is done already for all newer devices in stm32_isr.c, it is left to the application on older devices. Note that you also need to add definitions in mcuconf.h (STM32_IRQ_TIMx_PRIORITY).

Look into stm32:isr.c of an updated platform, the STM32G4 for example, you can do the same for missing devices. This will eventually be done also for the F4 but after next release.

Giovanni

networkfusion
Posts: 18
Joined: Thu May 18, 2017 11:57 am
Has thanked: 1 time
Been thanked: 6 times

Re: default IRQ handlers removed for GPT 9/11/12/14 in r13226

Postby networkfusion » Tue Apr 07, 2020 1:56 am

I am guessing that not all of the demos have been updated to account for this?! e.g. I am getting the same error with the config for RT-STM32F429-DISCOVERY ...

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: default IRQ handlers removed for GPT 9/11/12/14 in r13226

Postby Giovanni » Tue Apr 07, 2020 7:38 am

This is not done for each demo, it is a change for a whole platform, F4 has not been updated yet, there is no support timers above TIM8.

After the update all demos would be able to use high timers.

Updated platforms are L0, L4, L4+, F7, G0, G4, H7.

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 17 guests