STM32F746 doesn't start up
A STM32F746 on a custom board powered by the step-down regulator TPS62082 by TI doesn't start in about 90% of cases.
I flashed (which always works fine) a simple test program, which flashes two LEDs alternately:
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
while (1) {
LED1; // LED1 on, GPIOx->BSRR = ...;
LED20; // LED2 off, GPIOx->BSRR = ...;
HAL_Delay(1000);
LED10; // LED1 off
LED2; // LED2 on
HAL_Delay(1000);
}
}The STM32 runs at 200 MHz, using HSI and LSI. In about 10% of cases after power on, the LEDs light up. The other 90%, both LEDs remain dark. If the LEDs remain dark, a manual reset by pulling NRST low always starts the STM32.
The first idea was that there is a power issue, but I set the Brown Out Reset level in the option bytes to around 3V. Looking at Vin (3) and Vout (1) of the regulator, voltage seems to be fine. (2) is the output of a GPIO output which was initialized to HIGH in MX_GPIO_Init() -- but it remains LOW, which means the program is not executed.
The duration until the voltage has risen to 3.3V is more than 1ms, but according to the datasheet the rise time doesn't matter (if it's not too short).
Looking at the NRST pin (with only a 10K pullup attached, but no flasher device), this is curve (3) while (1) is Vout, i.e., Vdd of the STM32.
The increased BOD level seems to work; the STM32 starts working after the voltage is stable.
Thus, the voltage doesn't seem to play a role in the STM32 not starting up. What else could prevent a startup?