palEnablePadEvent

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

Moderators: RoccoMarco, barthess

omcdr
Posts: 89
Joined: Wed Aug 17, 2016 3:25 pm
Has thanked: 7 times
Been thanked: 7 times

palEnablePadEvent

Postby omcdr » Fri Mar 16, 2018 8:42 pm

I want to enable IRQ on GPIOA 0, there is my simple code:

Code: Select all

   palSetPadMode(GPIOA, 0,PAL_MODE_INPUT_PULLUP | PAL_STM32_OSPEED_HIGHEST);
   palSetPadCallback(GPIOA, 0, cbIrqA0, NULL);
   palEnablePadEvent(GPIOA, 0, PAL_EVENT_MODE_FALLING_EDGE);


but I got Assert in this line

Code: Select all

  osalDbgAssert(((EXTI->RTSR & padmask) == 0U) &&
                ((EXTI->FTSR & padmask) == 0U), "channel already in use");


Why ?
how to properly activate ext IRQ ?

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

Re: palEnablePadEvent

Postby Giovanni » Fri Mar 16, 2018 8:59 pm

Hi,

Do you have other channels enabled? you cannot activate an IRQ on the same bit of different ports.

Giovanni


Return to “STM32 Support”

Who is online

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