cancel
Showing results for 
Search instead for 
Did you mean: 

Internal Pull up STM32G4 series

STUser34
Associate III

Hello,

I am using the internal pull up for the input pins, but when read the port status using the program, it always reads 0 instead of 1. I expected it to read 1 and if make that pin grounded it shall read 0. 

 

 

12 REPLIES 12

Yes I think the problem should be solved if you remove that 4K resistor

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

I can see 5 problems with the "existing" version and 3 with the new one. In the schematic they are labeled as R and C. Remove all of them and you circuit will work.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

I would say, check the datasheet of your MCU for the value range of the internal pull-ups, and check it through.

I see nothing wrong with reading a 0-value for an unactuated switch. You could just drop the pull-up configuration, as it is most probably pointless in this situation.

I think the aim of the whole exercise is to differ between actuated switch state (1) and unactuated switch state (0).
And that does most probably work.