Author Topic: My MCU's GPIO (input) voltage cannot stay pulled up  (Read 2255 times)

0 Members and 1 Guest are viewing this topic.

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 550
  • Country: dk
Re: My MCU's GPIO (input) voltage cannot stay pulled up
« Reply #25 on: July 22, 2021, 12:26:06 pm »
Ok fair enough  :)

The pin I am using is A5.

And the full code (which I was using before I uploaded the dummy code an hour ago) has thousands of lines, and everything works as expected. Even the switch on that pin, as long as the pulled-up voltage stays above 1V'ish. Strangely today it does not seem to go any lower - so everything works. But I know a few days ago it was around 1V and that was too low for the MCU to detect as "1".

While I am there I tried desoldering the pin from the switch - it made no difference. Then I soldered an external 10k pullup. Here is the result (and again, just when I started the voltage was about 3.1V, then it gets worse and worse after 10-15min). I tested the 3.3V rail and it's perfectly clean at 3.27V.
 

Offline AaronLee

  • Regular Contributor
  • *
  • Posts: 229
  • Country: kr
Re: My MCU's GPIO (input) voltage cannot stay pulled up
« Reply #26 on: July 22, 2021, 12:41:48 pm »
Ok fair enough  :)

The pin I am using is A5.

And the full code (which I was using before I uploaded the dummy code an hour ago) has thousands of lines, and everything works as expected. Even the switch on that pin, as long as the pulled-up voltage stays above 1V'ish. Strangely today it does not seem to go any lower - so everything works. But I know a few days ago it was around 1V and that was too low for the MCU to detect as "1".

While I am there I tried desoldering the pin from the switch - it made no difference. Then I soldered an external 10k pullup. Here is the result (and again, just when I started the voltage was about 3.1V, then it gets worse and worse after 10-15min). I tested the 3.3V rail and it's perfectly clean at 3.27V.

To my eye, it's perfectly clear that there's a roughly 2.7s interval in that waveform where the level is fairly stable during the interval, then shifts to a different level in the next interval. For starters, look on the right side of the waveform, and you can definitely see there where the voltage is just a tad above 2.5V for that interval. In the interval previous, it's at about 2.7V, the previous interval to that just under 2.5V, then back to 2.7V for the previous one, and so on. Ignore the spikes in spotting the intervals. SOMETHING must be causing those 2.7s intervals. Unless it's something in your scope, or something external causing that phenomenon, I'd be looking at what in software could be causing that, or something in the hardware on your board.
 

Offline AaronLee

  • Regular Contributor
  • *
  • Posts: 229
  • Country: kr
Re: My MCU's GPIO (input) voltage cannot stay pulled up
« Reply #27 on: July 22, 2021, 12:44:07 pm »
Ah, in looking more carefully, maybe it's 2 seconds for those intervals, which then I guess means that's your pullup toggling on/off. If so, ignore my previous post.
 

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 550
  • Country: dk
Re: My MCU's GPIO (input) voltage cannot stay pulled up
« Reply #28 on: July 22, 2021, 12:54:15 pm »
Yes all correct - the internal pullup is about 37k, so with it on and off the pullup varies from 10k to about 7.9k

Just to be sure - this is after uploading a compltetly empty code - just a while(1) in the main.

The 0V at the beginning is with the power cable disconnected.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf