cancel
Showing results for 
Search instead for 
Did you mean: 

(SOLVED)Why Nucleo-F103RB acting weird with GPIO Input?

PPatl.1
Associate

Solution: Just like TDK said, PC13 pin is active high (can be seen below).

0693W000006GNamQAG.pngOriginal q:

Hello everyone,

I and a few other friends of mine all ordered Nucleo 64-F103RB board, it comes with 32F103RBTx MCU. We did worked before ST MCU's (like 4-DISCO boards 407VG and such) and we know how GPIO Input works.

This time when we wrote a basic input command something was off. System works completely opposite of it is supposed to work.0693W000006GNEMQA4.png0693W000006GNEHQA4.pngCode and settings are this. Normally led on the board isn't supposed to blink on it's own but it is doing that on all boards. We have changed the input pin but it didn't worked. (it somehow started to work with PC3 but still fails to work with PC13). Schematics of the board also reveal that it is a normally open button.

0693W000006GNEgQAO.pngI'm not sure why all boards are doing this weird thing. Same code (when uploaded to 407VG) doesn't do this but wait for an input (in that case also the blue user button). What is wrong with the system ?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

PC13 is idle high. You need to check for a low voltage when the button is pressed. Probably also shouldn't have a pulldown enabled but it's not affecting the circuit much due to the external 4.7K pullup.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

PC13 is idle high. You need to check for a low voltage when the button is pressed. Probably also shouldn't have a pulldown enabled but it's not affecting the circuit much due to the external 4.7K pullup.

If you feel a post has answered your question, please click "Accept as Solution".

Oh wait that is my bad sorry, should have checked buttons connections :( Thank you!