2024-02-15 04:53 AM - last edited on 2024-02-15 08:52 AM by SofLit
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
2024-02-15 09:16 AM
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 ?
2024-02-15 09:20 AM
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...
2024-02-15 09:22 AM - edited 2024-02-15 09:31 AM
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
2024-02-15 09:28 AM
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...
2024-02-15 09:33 AM
@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?
2024-02-15 09:41 AM
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]
2024-02-15 09:43 AM - edited 2024-02-15 09:45 AM
2024-02-15 09:52 AM
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:
So you do have external stuff connected!! :face_with_rolling_eyes: :face_with_rolling_eyes: :face_with_rolling_eyes:
I'm out.
2024-02-15 10:04 AM - edited 2024-02-15 10:05 AM
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?
2024-02-15 10:15 AM