2018-04-04 10:31 PM
Hello there,
Is there any set state of the GPIO's when the MCU (STM32L4 in my example) is unprogrammed? Or more likelly, when the MCU is in the system bootloader (I believe thats where the program counter is before I flash the MCU with anything). It seems to me that the GPIO are set as outputs HIGH or have pull-ups set.
I would appreciate all help.
#gpio2018-04-05 03:13 AM
But this behavior would violate the intended functionality. Because if EN will be pulled high at startup (lets say no code in flash or MCU powered off), then the converter will be turned off. The goal is to have everything turned off at startup and turn it on eventually with MCU code. Thats why I wanted to pull down the EN line and turn off the Q1.
2018-04-05 03:21 AM
Its a P-Channel FET, pull down to turn on.
:(
2018-04-05 03:36 AM
does the converter power the MCU ?
are you using a push button to power ON ?
stabbing in the dark here...
2018-04-05 03:40 AM
No, the converter powers some additional peripheral the MCU is interfacing with. Its the MCU who is turning the converter ON and OFF. When MCU turns the converter off, the device would still be on for couple seconds because of the high capacitance of 3V8 node. Thats why Q1 was introduced to discharge that voltage on 3V8 node when turning off the converter. It doesnt serve for anything when the converter is turned ON.
2018-04-05 03:44 AM
Also, the EN line is 0 V after disconnecting PB8.
The floating PB8 on the other hand is 3.3 V.
PB8 pulled with 10k resistor to ground is 0.7V. So it seems like there is a pull-up resistance on PB8 pin around 37 kR...?
120k pull-down gives 2.5V, so the pull-up resistance equals around 38 kR. This seems to be a pattern.
2018-04-05 04:48 AM
I checked the STM32L472 datasheet, PB8 has no obvious special interest, like JTAG/SWD. it should be floating,
note: After reset, these pins are configured as JTAG/SW debug alternate functions, and the internal pull-up on PA15, PA13, PB4 pins and the internal pull-down on PA14 pin are activated. ( not PB8)
does the bootloader use PB8 ?
alternate functions are nothing special:
TIM4_CH3,
I2C1_SCL,DFSDM1_DATIN6,CAN1_RX,LCD_SEG16,SDMMC1_D4,SAI1_MCLK_A,TIM16_CH1,EVENTOUT38K sounds like a processor pull up , yes..
I see this note in the Reference manual, RM0351
8.4.4 GPIO port pull-up/pull-down register (GPIOx_PUPDR)
(x = A..I)Address offset: 0x0CReset values:• 0x6400 0000 for port A• 0x0000 0100 for port B• 0x0000 0000 for other portsindicating PB4(jtag/swd) is pulled up at reset, not PB8
you may want to consider using a transistor to stop it coming ON at startup, or try another pin..
there may be some errata on that chip.
2018-04-05 04:54 AM
Hello,
You will find the reset state of each pin given in the pinout description of the datasheet of your device.
Typically, all pins are in analog mode except for a few pins described in the notes (JTAG/SWD pins for example)
If you want to know the pin state during the bootloader execution, I recommend looking up your device inside
.You should be able to find what communication peripherals are enabled and on what pins.
It is wise to check these are not conflicting with your application.
Note that some conflicts may also prevent the bootloader from operating correctly.
This is not so uncommon to have application/bootloader conflict see:
https://community.st.com/message/146941-stm32l4-bootloader-wishlist-item
regards
2018-04-05 04:56 AM
you should check it.. this is the wrong reference manual for that chip.
2018-04-05 05:08 AM
I think in your example PB1 has pull-up nor PB4, if I read the datasheet correctly. For my MCU:
It would seem that:
PB15 is pulled up
PB 14 is pulled down
PB 13 is pulled up.
2018-04-05 05:18 AM
That's how I read it too, (it was PB4 pulled, up, hard to read,)
check the errata on the chip, maybe someone from ST can answer you ???
if you have any product volume, the FAE will respond, did you try him ?