2021-04-11 03:20 PM
Im not sure if i fried a pin or if i am missing something, but i a using a NUCLEO-L412RB
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.
2021-04-11 03:32 PM
> 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
2021-04-11 03:43 PM
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
2021-04-11 05:57 PM
I meant all GPIO registers. Normally you read them out using debugger.
JW
2021-04-12 05:24 AM
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.
2021-04-12 06:38 AM
You should have a look at the reference manual, especially the GPIO chapter.
2021-04-12 06:46 AM
Could you clarify what you mean? Do you mean this reference manual?
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!