cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-L412RB Pin stopped working as input

TShem.1
Associate II

Im not sure if i fried a pin or if i am missing something, but i a using a NUCLEO-L412RB

https://www.st.com/resource/en/user_manual/dm00387966-stm32-nucleo-64-p-boards-stmicroelectronics.pdf

and i can use in PA6 as an ouput pin fine, but for some reason using it as an input just does not work, it always reads 0. I have tried making a brand-new project and wiring up the pin straight to a resistor and to 3.3v, but it doesnt work. Not currently seeing this issue with any other pin. I don't recall ever doing anything to fry it, but anything's possible, I have had plenty of circuits not work right on the firs try so maybe somehow i broke it.

Does anyone have any thoughts or do you think im out a pin.

6 REPLIES 6

> for some reason using it as an input just does not work, it always reads 0

Read out and check/post the relevant GPIO registers content.

JW

TShem.1
Associate II

Hm can you confirm how to do that? i just called

GPIOA->IDR which gives me

Decimal:32780

Hex:0x800c

Binary:1000000000001100

doesnt seem to change when i connect the pin to power

I meant all GPIO registers. Normally you read them out using debugger.

JW

TShem.1
Associate II

Could you by any chance provide a link with more detail or an example on how to do that? I am using the STMCubeIDE in debug mode but unclear how I read all the GPIO registers.

Uwe Bonnes
Principal III

You should have a look at the reference manual, especially the GPIO chapter.

Could you clarify what you mean? Do you mean this reference manual?

https://www.st.com/resource/en/reference_manual/cd00171190-stm32f101xx-stm32f102xx-stm32f103xx-stm32f105xx-and-stm32f107xx-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf

If so I have taken a look at the GPIO chapter but unsure what I am supposed to be looking at.

In the Nucleo datasheet i can see "PA6 SMPS_PG / IO"

PA6 is marked as I/O, and every other PIN I set up to be input works fine for me so not sure why that pin would be different. What in the manual i am supposed to looking for.

Thanks for the help!