techielew
DIIDevHeads IoT Integration Server
•Created by techielew on 9/9/2024 in #firmware-and-baremetal
Need Help with NVIC Pending Register Not Reflecting Button Press on STM32L476RG
@Umesh Lokhande @Edison_ngunjiri @ZacckOsiemo just saw this question in another forum and thought you might be able to troubleshoot for the dev:
Subject: Need Help with NVIC Pending Register Not Reflecting Button Press on STM32L476RG
Message:
I'm currently working on a project where I'm writing a driver for my STM32 Nucleo L476RG board. I’m trying to test an interrupt using the user button on the board. Here's what I’ve done so far:
* Button Configuration:
* Configured the user button to trigger on the falling edge.
* Verified the GPIO pin is set as an input with the correct pull-up/pull-down configuration.
* EXTI Configuration:
* Mapped the EXTI line to the correct GPIO pin for the button.
* Set the trigger condition to the falling edge.
* NVIC Configuration:
* Enabled the NVIC interrupt line associated with the EXTI.
* Verified the interrupt priority is set correctly.
* Clock Setup:
* Enabled the clock for all required peripherals, including GPIO and SYSCFG.
* Issue:
* Despite all the configurations being correct, the NVIC pending register doesn’t reflect the button press when I check it. All other relevant registers seem to be correctly configured.
* Debugging Attempts:
* Cross checked every register.
* Physically checked the button’s connection and signal output. And also tried with internal button and internal led
* I’ve been stuck on this for days now and would really appreciate any insights or suggestions on what else I should check or do to resolve this issue.
17 replies