Skip to main content
Visitor II
October 24, 2021
Solved

Fail to reset from linux

  • October 24, 2021
  • 2 replies
  • 1414 views

I'm having trouble resetting the board from linux.

Not using a PMIC but discrete power supplies.

I followed the app notes and errata, connecting the NRST and CORE_NRST pins with a cap then later a 0R resistor.

I'm using a single 100nF cap on NRST.

I can see the reset pin going down when rebooting from linux, unfortunately the MPU just freezes.

It looks like it gets stuck in BootROM after reset.

So far only a very long pull down (250ms+) on NRST works.

This or cycling power on VDDCORE which I can't do on my current prototype... (PWR_ON wired directly to VDDCORE supply enable pin)

Reset works fine from u-boot. (booting from SDMMC1, so already enabled)

I remember reset working a while ago, so I'll try to reproduce it and see what is blocking.

Any ideas?

NRST + CORE_NRST signals: (connected together)

0693W00000FDZNVQA5.png

    This topic has been closed for replies.
    Best answer by fpoussin

    I found the issue, it's caused by a circuit on my board: I use VBUS to control a transistor that pulls down some boot pins in order to upload firmware when plugged as a usb device.

    There is a capacitor on VBUS that prevents this transistor to turn off fast enough until it reaches BootRom on reset.

    2 replies

    fpoussinAuthor
    Visitor II
    October 24, 2021

    Beginning of answer, reset works when I remove some of the regulators I use for peripherals from the DTS files.

    These are simple "fixed-regulator" nodes that use a GPIO connected to a standard power switch ic.

    Very strange issue... maybe current injection?

    	reg_vbus: reg_vbus {
    		compatible = "regulator-fixed";
    		regulator-name = "vbus";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		vin-supply = <&vin>;
    		gpio = <&gpiog 7 GPIO_ACTIVE_HIGH>;
    		enable-active-high;
    		regulator-always-on;
    		startup-delay-us = <1000000>;
    	};
     
    	reg_canbus: reg_canbus {
    		compatible = "regulator-fixed";
    		regulator-name = "canbus";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		vin-supply = <&vin>;
    		gpio = <&gpiob 10 GPIO_ACTIVE_HIGH>;
    		enable-active-high;
    		regulator-always-on;
    	};

    Technical Moderator
    October 25, 2021

    Hi,

    NRST+NRST_CORE wired together should work fine if your platform is using VDD>2.7V (i.e. 3.0 or 3.3V typ.).

    Did you ensure your boot Flash memory is correctly reset (or power-cycled) ?

    As an example, SD-Card setup in UHS-I mode (i.e. I/O 1.8V) cannot go back to standard boot mode until a power cycle is applied.

    If Boot is stuck in BootROM, please use https://wiki.st.com/stm32mpu/wiki/STM32MP15_ROM_trace_analyzer and provide the traces.

    Regards.

    fpoussinAuthorAnswer
    Visitor II
    October 25, 2021

    I found the issue, it's caused by a circuit on my board: I use VBUS to control a transistor that pulls down some boot pins in order to upload firmware when plugged as a usb device.

    There is a capacitor on VBUS that prevents this transistor to turn off fast enough until it reaches BootRom on reset.