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.

LP-AM261: launchpad IO Expanders not resetting on POR

Part Number: LP-AM261

Tool/software:

Hello There

The onboard IO expanders do not reset the on POR which leads to unexpected behaviour after POR. I am trying to reset the flash but after por tghe Flash stays in reset state. Please suggest a solution

  • Hi Dheeraj,

    Yes, the IO expander reset is not connected to the PORz. But for the OSPI Flash to Reset, the U27 and U50 AND gates are driven through the OSPIx_RESET_OUT0 nets and also PORz. So, the OSPI flash should reset for every PORz irrespective of IO Expander.

    Also, the reset line of IO Expanders are intentionally NOT connected to PORz, so as to maintain the same state of the Muxes when Boosterpack are connected to the LaunchPad. The user would have to intentionally change the state of Muxes by setting new GPIO values of the IO Expander.

    Thanks,
    Tejas Kulakarni

  • Hi Tejas 


    After doing POR, My Custom SBL was not running. I checked the OSPI0_RSTn net and it was at 0V. On back tracing I found that OSPI0_RESET_OUT0 net was set to 1V(which is logic 0). On Further backtracing I found that the U25 Level trasnlater was enabled (as BP_BO_MUX_EN were high due IoExpander not resetting) and AM261_OSPI0_RESET_OUT0 was 0V which kept the flash in reset at POR.
    I am not sure why this pin is 0 after POR. 


  • Hi Dheeraj,

    Sorry for the delay in the response.

    Can you check once in your code or custom SBL if the pin AM261_OSPI0_RESET_OUT0(K5-GPIO61) is being made low by any part of your code?

    Thanks,

    Tejas Kulakarni

  • No, we are not accessing this pin anywhere else other then Flash reset sequence in custom SBL. The following code is taken from SDK 

    void flashFixUpOspiBoot(OSPI_Handle oHandle)
    {
        gpio_flash_reset();
        OSPI_enableSDR(oHandle);
        OSPI_clearDualOpCodeMode(oHandle);
        OSPI_setProtocol(oHandle, OSPI_NOR_PROTOCOL(1,1,1,0));
    }
    
    void gpio_flash_reset(void)
    {
        uint32_t    gpioBaseAddr, pinNum;
        enableLevelTranslator();
    
        /* Get address after translation translate */
        gpioBaseAddr = (uint32_t) AddrTranslateP_getLocalAddr(GPIO_OSPI_RST_BASE_ADDR);
        pinNum       = GPIO_OSPI_RST_PIN;
        GPIO_setDirMode(gpioBaseAddr, pinNum, GPIO_OSPI_RST_DIR);
        GPIO_pinWriteLow(gpioBaseAddr, pinNum);
        GPIO_pinWriteHigh(gpioBaseAddr, pinNum);
    
    }

    I checked by erasing the flash and then checking the status of the pin AM261_OSPI0_RESET_OUT0. It is low. Following are the waveforms captured when flash is erased and POR is pressed


    Below is another view when the button is released

  • Hi Dheeraj,

    Sorry I am not sure if I understand correctly, please correct me if any of the below is wrong. As per your observations the "AM261_OSPI0_RESET_OUT0" net is always low, as seen in the first image, the pin is always low whenever the PORz is released. But the first image is a very zoomed out(in time) view.

    As seen in the second image, after the PORz is released, the "AM261_OSPI0_RESET_OUT0" net goes low after about 4ms. So, is there anything else connected on the board(or may be a wire/probe shorted by mistake to another pin?) that is driving this net low? Can you please check once?

    Also, if the "AM261_OSPI0_RESET_OUT0" net goes low after about 4ms, I don't think it would be AM261 device driving it low, since it would not have completely booted in 4ms. Another case being, if the level translator U25 is enabled, all U25 would do is translate the voltage, it would never drive it to a particular voltage.

    Thanks,
    Tejas Kulakarni