Skip to main content
Explorer
December 7, 2023
Question

One particular pin (PA8) not working properly as GPIO or as PWM using timers?

  • December 7, 2023
  • 4 replies
  • 1666 views

I am using G431RB board. I can connect and use PA9 and PA10 as GPIO correctly and use them to blink LEDs but for some reason PA8 does not work correctly. It does not work either as GPIO or timer. 

 

I don't know what the issue is because just two days ago it was working correctly. I don't understand if this is a hardware issue or a software issue.

 

Please please help.

    This topic has been closed for replies.

    4 replies

    Super User
    December 7, 2023

    Could be a damaged pin or bad software. If it was working before, and you're using the same program, it probably got damaged somehow, perhaps due to an overvoltage condition.

    Program it as a GPIO output and look at the IDR and ODR registers. If ODR is flipping but IDR is not, either the board is damaged, or it's not configured as an output, or the pin is shorted to something.

    maqAuthor
    Explorer
    December 7, 2023

    "Program it as a GPIO output and look at the IDR and ODR registers. If ODR is flipping but IDR is not, either the board is damaged, or it's not configured as an output, or the pin is shorted to something."

     

    I am very new to STM32. In fact I am using matlab tools to operate the board. Can you link me to a tutorial or a youtube video that explains how to do this?

     

    Graduate II
    December 7, 2023

    If this is a NUCLEO-G431RB board, go to the "CAD Resources" tab and pull a schematic and review connectivity and potential contention on the pin.

    https://www.st.com/en/evaluation-tools/nucleo-g431rb.html

    Super User
    December 7, 2023

    If you are debugging in STM32CubeIDE, you can use the SFRs window to view registers. (Window-> Show View -> SFRs)

    Not sure what insight into the chip you have in Matlab. I recommend a proper IDE for debugging.

    Super User
    December 7, 2023

    We here are not good at suggesting tutorials for beginners, sorry. You may want to search on the web, or perhaps seek a course online or maybe event "in real world" somewhere where you live.

    JW

    Graduate II
    December 7, 2023

    Usually best to dig around on YouTube, level and presentation style can be a big part of "getting it", or not. Also use triangulation, a method where you view from multiple perspectives and presentations, to see how others understand and explain the topic.

    A lot of us grew up in an era of books and manuals, schooling that focused on "learning how to learn". And colleges where the professors understood the topic with some depth, not just reading some other's text book to the class.