Skip to main content
Visitor II
October 8, 2024
Solved

STM32G071R8T6 GPIO - input issue on PA4

  • October 8, 2024
  • 5 replies
  • 2420 views

Hi,

We have a custom board with a STM32G071R8T6TR, PA4 is configured as input but it does not work.

All other inputs on the boards are working correct but PA4 is a problem.

If we configure PA4 as an output it works fine, we toggle hi/lo, we have checked IDR for PA4 and the IDR does not change which is a problem, it does that when we toggle PA5 and PA6 hi/lo the IDR for PA5 and PA6 change.

If PA4 is configured as input and we change input hi/lo there is no change in IDR either.

We have cheked MODER is correct.

What do we miss here or could this be a defect STM32 MCU ?

Kind regards

Morten

 

 

 

    This topic has been closed for replies.
    Best answer by MPF

    Hi,

    We found the problem, its a problem with the MCU, in other similar products we don't see the issue.

    We will replace the MCU.

    BR
    Morten

    5 replies

    Super User
    October 8, 2024

    Sounds much like hardware damage.

    Do you have a second board, perhaps a Nucleo?

    JW

    MPFAuthor
    Visitor II
    October 8, 2024

    Hi Jan,

    I think we should buy one, tested code and verified registers on STM32F411 nucleo, it works fine.

    BR
    Morten

    Super User
    October 8, 2024

    Hi,

    did you check real connection to pin exists ?

    Try re-solder pin, maybe has bad solder joint.

    (Funny is: if you check with DMM or scope, pressing on the pin is enough, to see: is ok.

    But is not - as soon, as you no more press on the pin ! )

    MPFAuthor
    Visitor II
    October 8, 2024

    Hi AScha.3,

    Please read my description, IDR does not change when we configure as output and toggle PA4 hi/lo, IDR does change when we do that on other pins PA5, PA6.

    Kind regards

    Morten

     

    Super User
    October 8, 2024

    Just to be sure:

    > If we configure PA4 as an output it works fine,

    this means, that you set PA4 as GPIO Output toggled it, and measured the output using logic analyzer/oscilloscope, correct?

    JW

    MPFAuthor
    Visitor II
    October 8, 2024

    Hi JAn,

    Yes this is correct.
    So when PA4 is configured to output  and is set to 0 we read IDR as 0 - this is ok.

    When we set PA4 to 1 we still read IDR as 0 even though we see 1 on the oscilloscope. 

    If we do the above on other pins like PA5 and PA6 this works perfect.

    Kind regards

    Morten

     

    Super User
    October 8, 2024

    Assuming this is a minimal code doing nothing else but toggling that pin (i.e. no analog features setup), all clues point to damaged mcu, then.

    Note, that PA4 and PA5 are not 5-volt tolerant.

    JW

    MPFAuthor
    Visitor II
    October 8, 2024

    Hi Jan,

    We went back to basics and we are running from a very basic program using no other features. :)

    Yes the pins work at 3.3V.

    MPF

    Graduate
    October 9, 2024

    Did you check GPIO_LCKR?

    MPFAuthorAnswer
    Visitor II
    October 16, 2024

    Hi,

    We found the problem, its a problem with the MCU, in other similar products we don't see the issue.

    We will replace the MCU.

    BR
    Morten