cancel
Showing results for 
Search instead for 
Did you mean: 

Very strange GPIO behaviour

Nickelgrass
Senior
Posted on September 27, 2016 at 21:06

Hi!

Edit: figured it out. How does one delete a post? Sorry for inconveniences.
2 REPLIES 2
slimen
Senior
Posted on September 28, 2016 at 09:56

Hello,

Please avoid removing the content of the post describing your issue.

It will be more interesting to keep the initial description, then let us know how you resolved the case. It may be helpful for forum users.

'' Hi!

I am working with a Nucleo F411 and TrueStudio. All was fine, then suddenly I encountered a very strange GPIO problem. I configured the PC13 to be an input to utilize the user button of the Nucleo and that worked fine at first. 

Now suddenly the button seems to be pressed, that means low, all the time. Debuging the GPIO I found that it has 3,3V (through the Pullup) while the processor is paused. As soon as the processor runs, even if just doing one step in debug mode, the pin goes low as long as the processor runs and then goes back high when halted. When questioning the pin in an IF() it is seen as low all the time when free running. Strangly, when stepping through code the pin is shown 0, until the point questioning the pin. Then for one instruction it goes High and then back low in the next instruction.

I checked the mode and config of the pin, it surely is configured as input and stays that way. 

Has anyone got any clue on why this pin may be forced low by the processor? It seems a very odd thing happening here.

''

Regards

Nickelgrass
Senior
Posted on September 28, 2016 at 17:36

Hi, ok, sorry. I didnt want to burden anyone with it.

Turned out I cowardly set the Alarmoutput bit 21 in the RTC CR at some point for testing. As it is write protected, clearing it didnt work until I saw it was falsely set and cleared it with write enabled.