STM32L562CET6 won't enter EXTI callback function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 4:42 AM
I am quiet new to STM32 programming and can't get the external interrupt to work.
I started with the NUCLEO-L011K4 and wrote my programm without any issues. I switched to my own board (pdf included) and weren't able to get extrenal interrupts to work.
I use the STM32CubeIDE 1.5.1 and the ST-Link/V2 to programm.
The goal of the code is to change the PWM outputs frequency and duty cycle with incoming 5V high signals on pin "Change" and pin "Laser_On". The Controller itself gets 3,3V.
I can see in debug mode that the Callback function isn't entered when i provide the high signals.
Am I missing some crucial code? Help is appreciated.
Solved! Go to Solution.
- Labels:
-
GPIO-EXTI
-
Interrupt
-
STM32L5 Series
-
TIM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 6:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 5:34 AM
Code seems okay to me. Should get an interrupt when PB6 goes from low to high.
If the code works on a Nucleo but not on your custom board, check to see if there are wiring issues. Make sure the PB6 pin itself is actually seeing the levels you expect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 5:42 AM
Check linkage of routines via .MAP and listing files.
Confirm EXTI peripheral registers in debugger, or via telemetry data. Check event flagging
Confirm GPIO registers, reflect reporting in GPIOx->IDR for pin state.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 5:45 AM
I can messure the 5V directly at PB6. They are connected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 6:14 AM
I am not quiet sure how to check the linkage of the routines and listing files.
I screenshoted for the other two ideas the Live Expressions before running, while running and while running with 5V connected.
There was no difference between 5V connected or disconnected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 6:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 6:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 6:41 AM
> I screenshoted for the other two ideas the Live Expressions before running, while running and while running with 5V connected.
Look like PB6 is high "before running" as well, so no transition, so no interrupt. What is pulling it down to 0V when the phototransistor is off?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 6:59 AM
I already tried it with the GPIO_InitStruct.Pull = GPIO_PULLDOWN; and without but it didnt make any difference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 7:11 AM
If IDR reports it as high, and the voltage is 0V, there is a hardware issue. Note that pins are not 5V tolerant if VDD is not present.
