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.

Moderator: RoccoMarco

Post Reply
nikiwaibel
Posts: 29
Joined: Sat Mar 17, 2018 2:51 pm
Has thanked: 8 times
Been thanked: 15 times

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

Post by nikiwaibel »

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: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

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

Post by Giovanni »

Hi,

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

Giovanni
nikiwaibel
Posts: 29
Joined: Sat Mar 17, 2018 2:51 pm
Has thanked: 8 times
Been thanked: 15 times

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

Post by nikiwaibel »

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 ([font=Courier New]svn diff -r13225:r13226[/font]) 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: 29
Joined: Sat Mar 17, 2018 2:51 pm
Has thanked: 8 times
Been thanked: 15 times

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

Post by nikiwaibel »

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 32741 times
since -r13226.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

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

Post by Giovanni »

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

Post by networkfusion »

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: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

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

Post by Giovanni »

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
Post Reply