This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM437x reboot issue

Other Parts Discussed in Thread: TPS65218

We have a custom board based on AM437x GP EVM with Linux version 4.1.13-rt11-g2046db6. All drivers seem to work fine and I can boot up the board successfully with hardware switch 100% of the time. However "reboot" command in console doesn't work reliably (works ~25% of the time). When it doesn't work, it finishes the shutdown, but the u-boot never starts.

We use SD card and eMMC, and this happens to both.

I also noticed a similar problem with watchdog reset, it also doesn't reboot. When the timeout occurs, the system just hangs. I wonder if they are related.

As this point, I have no idea how to debug this problem. Could you offer some guidance?

Thank you so much!

Jan

  • What is the PMIC that you use? Can you post the schematics (PDF format)?
  • Janice,

    Do you have a capacitor connected to the WARMRSTn terminal?  If so, try removing this capacitor.

    The WARMRSTn terminal is connected to an IO cell that contains an output buffer and input buffer.  The software and watchdog reset sources will try to drive the WARMRSTn terminal low through the output buffer.  Since the output of the output buffer and input of the input buffer are connected to the WARMRSTn terminal, these reset sources are looped back into the device through this IO cell creating a warm reset.

    The software and watchdog reset sources are fairly short duration and may not provide enough time for the output buffer to drive the capacitor below the Vil max voltage required to trigger a warm reset.

    Regards,
    Paul

  • Hi Biser,

    We use TPS65218 similar to what is on EVM. Sorry I cannot post the schematics here. Can you explain how soft reset works with the PMIC? Does the processor send a i2c command to PMIC to reboot or through other ways? Is there a document/wiki describe the soft reset process?

    Thank you!

    Jan

  • Hi Paul, we don't have a capacitor connected to WARMRSTn. It is pulled to 3.3Vdc.
  • Janice, the PMIC really isn't involved in a soft reset. The kernel will gracefully shutdown drivers and complete filesystem actions and then issue a warm reset through a register bit.
    -Can you check the WARMRSTn signal? It should toggle low momentarily, then go back high when the reset is issued.
    -Can you connect though JTAG when the hang occurs?

    Regards,
    James
  • Hi James, we probed WARMRSTn and measured it to be a low pulse with duration ~300us. It looks the same for both working and non-working case.

    Our Jtag connector is not available yet. Please let me know what I should be looking for once I get the jtag hook up.

    Thanks,

    Jan

  • Hi James,

    I got my JTAG set up today. When warm reboot doesn't boot up and I see nothing on the uart port, my JTAG fails to connect to the target. Occasionally when warm reboot doesn't boot up and I see 1 line "U-Boot SPL 2015.07-xxxx (xxxxx)", my JTAG can connect, but the rest of the system such as ethernet is not up. Can you advice how to debug this further?

    Thank you!

    Jan

  • Hi Jan, it looks like you have 2 different failures.  Let's start with the one where you get the u-boot message. 

    Connect JTAG and see where the PC is.  I'm expecting it to be in internal memory 0x4030XXXX.  If you have your u-boot build, you should be able to get the SPL symbol file from that build (u-boot-spl) and perform a Load Symbols in CCS to overlay symbols (it will even do source code correlation if you can point to the source files).  This should give you much more visibility into where it is hanging.

    I think the instance where the JTAG cannot connect is a different issue, but let's see if debugging the first issue gives us some clues.

    Regards,

    James

  • Hi James, the case when I can get 1 line of u-boot message is very rare. I cannot seem to reproduce that today. 95% of the time I get the other case which has no u-boot.

  • Hi Jan, ok then let's try to narrow down where the hang is occurring, either in ROM (very rare) or somewhere in u-boot before the first print statement.  I'm assuming you made edits to SPL for your custom board, so I'm suspecting it is hanging there.

    First, see if you can recreate the issue by resetting from u-boot.  It will make the debug process easier.

    If you can do that, stop the boot process after power up in u-boot and connect with JTAG.  Here, you should be able to load symbols as described before.  You want to set a hardware breakpoint somewhere early in the boot process, preferably in SPL, and especially before any edits you made for your custom board (spl_board_init is usually a good place).  Ensure you can reset in u-boot and hit the breakpoint everytime. 


    Now you can step through and see where the hang occurs.  Let me know the progress.

    Regards,

    James 

  • It was determined that Jan had version 2015.07 of u-boot which did not properly allocate the static variable in this function:

    void gpi2c_init(void)
    {
        static bool init;

        if (!init) {
            enable_i2c0_pin_mux();
            i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);

            init = true;
        }
    }

    The static variable 'init' was getting allocated to .bss which was linked to DDR.  Thus on a reboot, the i2c module was not getting initialized properly every time because the boolean was being read from DDR which still needed to be configured.  However I2C communication is needed to the PMIC in order to ramp up voltage in order to support a higher OPP (in the customer's case, the device supported 1GHz).  The device was hanging because the MPU frequency was set to 1GHz, but the VDD_MPU voltage was still set to the default of 1.1V (which only supports max voltage 600MHz) 

    In the latest uboot 2016.05, this function changed:

    void gpi2c_init(void)
    {
        /* When needed to be invoked prior to BSS initialization */
        static bool first_time = true;

        if (first_time) {
            enable_i2c0_pin_mux();
            i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED,
                 CONFIG_SYS_OMAP24_I2C_SLAVE);
            first_time = false;
        }
    }

    The static variable is now initialized, which puts it in .data which gets linked in SRAM internal memory.  Upon a reboot/reset, the variable gets initialized to true, and the i2c module gets properly configured every time.  The the OPP, both voltage and frequency, get properly set for any device variant.

    Regards,

    James