Hi! I have a project use Chibios19.1.3. I upgrade to the lastest Chibios_20.3.1. After that, the pal callback is not working.
I use "palEnableLineEvent" and "palSetLineCallback" the set the line and the callback function. the hardware is stm32f765zg, I set the chip define to "STM32F767xx" to "board.h" and I have checked the config file with "RT-STM32F767ZI-NUCLEO144", also I have used a scope to check the line signal. After switching to Chibios_20.3.x, the callback function is never called. any idea how to debug or fix this problem?
pal Callback is not called with ch version 20.3.1 Topic is solved
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: pal Callback is not called with ch version 20.3.1
Hi,
Moving in "bug reports", which EXTI is not working exactly?
Giovanni
Moving in "bug reports", which EXTI is not working exactly?
Giovanni
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: pal Callback is not called with ch version 20.3.1
Hi,
Could you check if the ISR is reached by placing a breakpoint? it is in stm32_exti2.inc, it is better if you compile with -O0 or the breakpoint could be skipped.
Giovanni
Could you check if the ISR is reached by placing a breakpoint? it is in stm32_exti2.inc, it is better if you compile with -O0 or the breakpoint could be skipped.
Giovanni
Re: pal Callback is not called with ch version 20.3.1
Hi!
the ISR is reached !
pr = 4
exti_serve_irq(pr, 0);
stm32_isr.c line 43:
#define exti_serve_irq(pr, channel) { \
\
if ((pr) & (1U << (channel))) { \
_pal_isr_code(channel); \
} \
}
so _pal_isr_code(channel) function is not called?
the ISR is reached !
pr = 4
exti_serve_irq(pr, 0);
stm32_isr.c line 43:
#define exti_serve_irq(pr, channel) { \
\
if ((pr) & (1U << (channel))) { \
_pal_isr_code(channel); \
} \
}
so _pal_isr_code(channel) function is not called?
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: pal Callback is not called with ch version 20.3.1
This is good, could you step into exti_serve_irq() and see which condition prevents the callback call? it is not far from there.
Edit: Nevermid, found the problem:
At line 84:
exti_serve_irq(pr, 0);
should be:
exti_serve_irq(pr, 2);
Giovanni
Edit: Nevermid, found the problem:
At line 84:
exti_serve_irq(pr, 0);
should be:
exti_serve_irq(pr, 2);
Giovanni
Re: pal Callback is not called with ch version 20.3.1
Hi! I edited the last post. It is exti_serve_irq(pr, 0); prevents the callback,
becaure pr = 4, and ((pr) & (1U << (0))) == 0.
I tempeory change exti_serve_irq(pr, 0); to exti_serve_irq(pr, 2); So that I can use the new Chibios_20.3.1
thanks for the help.
becaure pr = 4, and ((pr) & (1U << (0))) == 0.
I tempeory change exti_serve_irq(pr, 0); to exti_serve_irq(pr, 2); So that I can use the new Chibios_20.3.1
thanks for the help.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: pal Callback is not called with ch version 20.3.1
We posted at same time, anyway, it is a bug, it will be fixed in next release. EXTI4 contained the same error.
Your fix is correct.
Giovanni
Your fix is correct.
Giovanni
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Who is online
Users browsing this forum: No registered users and 64 guests