cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot access >=3,3V at GPIOA - STM32F411

timbo2023
Associate III

Dear Ladies and Gentlemen,

 

for you it is your daily business - for me as customer a contemporary challenge:

 

Something went wrong with my pin-configuration.

I measure ~1,7 V as GPIO-output of Port A instead of wished >=3.3 V.

My power supply is a USB.

Could you give a sample pin configuration for (3.3 V output) of Port A in discussion?

 

As additional comment:

Round about 5 V are present at the 5 V-Pin(s).

 

Thank you in advance.

TIMBO

 

46 REPLIES 46

Basically yes, is possible. But a bad idea - opamp is slow, compared to the digital switching pins.

And bringing in now 9V level...risk to damage even the 5V circuit.

I have the impression, it would shorten the guessing game, if you just show, what you have, what you want to do and which chips/driver is to connect.

Geht doch um nen Schrittmotortreiber - oder ?

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

Vdd + 4 V --> risk after data sheet ...

 

I will switch into my broken German, too:

 

Schrittmotor, "Spannungsangleichung" 0..3.3 V auf 0..~4.5 V

Externer Kreis oder am/in der Karte ist die Frage -

 

Kann ich die knapp 5V vom USB nutzen, die ja anliegen oder der Weg zu Schottky über dann die letzte Möglichkeit eines externen Verstärkerkreises...

NO

The 5V tolerance is to INPUT.

If you power the MCU at 3.6V the HIGH outputs will approach that.

If you need 5V, use buffers capable of outputting that. Or use Open-Drain, with pull-up to 5V

Make sure you have a common ground between the STM32 board, and the one you're connecting the 4 GPIO's too.

Your problem is PA0 or PA3? You keep changing your responses.

What voltages do you measure if not wired to your other board?

What else is connected to the GPIO's on the board?

Going to be hard to run a debugger if you blindly reprogram the entire GPIOA bank

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

The word "hard" we do not like to hear in this context...

 

BUT:

"configure the pin in open drain and connect a pull-up resistor between the pin and 5V. The pin must be five volt tolerant: FT). But here you need to take care about the slopes of your signal you need to output on the pin and the load to connect to it."

 

Could you detail this solution in more detail in look to a code snippet?

 

"What voltages do you measure if not wired to your other board?"

~1.7 V on PA0 - That is my wonder...the other pins shows normal ~3.3 V

 

But I will wait on the response frome AScha...

 


@timbo2023 wrote:

"What voltages do you measure if not wired to your other board?"

~1.7 V on PA0 - That is my wonder...the other pins shows normal ~3.3 V


Please confirm that is with nothing external connected to the Black Pill?

If you are only getting ~ 1.7V when there is nothing else at all connected to PA0, then you have a fault on PA0.

As already suggested, do you have a separate board to try?

Check what PA0 is connected to on your board. Review a schematic, check the board.

Isn't it connected to the KEY BUTTON on the BLACK PILL BOARD? Make sure that isn't pressed.

>>Could you detail this solution in more detail in look to a code snippet?

Change OTYPER pin bits to OD rather than PP output, use 10K pull-ups to 5V externally.

>>The word "hard" we do not like to hear in this context...

Then don't break PA13/PA14 operation for the sake of PA[0..3]

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

:)

I just checked it - attached you can see the situation ...

~now - "-3.3 V" (?!) - - thank you - but is there a possiblity to get a small "kick" to a little bit higher voltage ...

Numerous posts have all asked  you to measure this with nothing connected.

I asked you, "Please confirm that is with nothing external connected to the Black Pill?" - and you show this:

 

AndrewNeil_0-1708019389330.jpeg

So you do have external stuff connected!! :face_with_rolling_eyes: :face_with_rolling_eyes: :face_with_rolling_eyes:

I'm out.

timbo2023
Associate III

Now with the usual calm:

 

(1) code

 

 

GPIOA->MODER = 0x55555555;
	GPIOC->MODER = 0x55555555;

	GPIOA->OSPEEDR |= 0x00000000;
	GPIOA->PUPDR |= 0x00000000;

	GPIOA->ODR |= (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4);

	GPIOA->BSRR = 0xFFFF0000;

	GPIOA->ODR|= (1 << 0);

 

 

see attachment 1

 

(2) code

 

 

	RCC->AHB1ENR |= (1 << 0) | (1 << 2);

	TM_DELAY2_Init();

	GPIOA->MODER = 0x55555555;
	GPIOC->MODER = 0x55555555;

	GPIOA->OSPEEDR |= 0x00000000;
	GPIOA->PUPDR |= 0x00000000;

	GPIOA->BSRR = 0xFFFF0000;

	GPIOA->BSRR = (1U << 0);

 

 

 

see attachment 2

 

 

Now I need a small rise to the USB-voltage-level...

 

Is that basically possible?

 

 

timbo2023
Associate III

That's my situation - 1,64 V - on load - measured to card -

 

But I need at least round about 3.6 V ... USB Voltage tap per software possible?