2017-06-29 02:58 AM
Hi,
Im trying to optimize LowPower current consumption of a custom board my hardware guys have made arround a 100pin LQFP STM32F446VET. Currently I fight to find the source of a faulty voltage at GPIO PA4 (Pin 29 with this housing). I desoldered the pin from the board that it is not connected to anything. The pin outputs a voltage of 2.5V after reset and in GPIO's reset state. When I configure the pin as a normal GPIO I can output a 0 (0 Volts). But as soon as I call HALs HAL_GPIO_DeInit() the 2.5 Volt output re-appears. When I measure the current from this 2.5 Volts to ground I see 240�A on my ampmeter. This is the equivalent of a 10 kOhm impendance. According to the datasheet this pin has alternate functions like DAC_OUT1 and USB_OTG_HS_SOF. But all GPIOx->AFR[] are set to 0. Same behavior on a second identical board.
Is it possible that I damaged the pin by a connected 8 Ohm @ 1 kHz loudspeaker (induced reverse or high voltage by the speakers high inductance)?
Any idea, what is going wrong with my device?
#errata #usb_otg_hs_sof #stm32 #stm32f4 #dac_out12017-06-29 03:32 AM
Not sure what's going on with your board.
Perhaps you can try to reconfig it as
GPIO_MODE_ANALOG and GPIO_NOPULL
2017-06-29 06:34 AM
Perhaps you can try to reconfig it as
GPIO_MODE_ANALOG and GPIO_NOPULL
Thats exactly what is done with
HAL_GPIO_DeInit() or when I cunfigure the pin to GPIO_Analog using CubeMX. So the voltage essentially stays the same. But I've got another idea: our board provides 2 different optional signals paths from DAC_OUT1-pin: directly tied to a small speaker (8Ohm@1 kHz) and to a PA's input. Now I suspect that driving the PA4 pin with a 0/1/0/1 signal to let the buzzer beep could have damaged the pins I/O cell due to high reversed inductive voltage caused by the speakers inductance. Could this be the case? Is it possible that the Clamp-Diode connectiong the PA4 pin to VDD has got conductive and those there is a output voltage of 2.5V at the output with 10kOhm impedance?
2017-06-29 06:53 AM
Neither works. Even when hold in reset-mode the pin gives out 2.6 volts. Only when PA4 is configured to GPIO output push/pull and set to '0' there is a 0 Volts output.
The pin is directly tied to a small
mailto:8Ohm@1kHz
buzzer. Can it be that the I/O-Cell of the pin got damaged during some tests when I toggled the pin between 0/1 to let the buzzer beep - maybe due to the inductance the buzzer produces reverse voltages to high for the I/O cell?2017-06-29 08:35 AM
What is the read back value of the relevant GPIO and DAC registers?
(DAC should not be connected to PA4 if it is not enabled, according to the note under the DAC block diagram in DAC chapter in RM0390).
JW
2017-06-29 10:15 AM
Is your PA4 connected to a driving transistor or mosfet? Or just connect to a buzzer?(no good)
You may also add a flyback diode parallel to the buzzer in the usual driving circuit (with a transistor or mos)
Guess your output current is over-spec or the inductive load's overshooting voltage kills your io.
(you may use oscilloscope to check those possibly damaged MCUs while they are driving Buzzers)
or just take off the buzzer first and re-test with a new MCU.
(I cannot reproduce your result on my F446 Nucleo board)