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.

AM3358 GPIO pins initialization during boot process

Other Parts Discussed in Thread: AM3358, TMS320F28335

              I use AM3358 GPIO1[27] pin (ball: V17)  as output to other peripheral's enable input (active low). There is a 10K resistor on it to pull up to 3V3. From AM335x TRM, all GPIO pins are input after reset, so when reset goes high,  I have a high level on the pin as intended after about 50 ms. But after 3 more SECONDS, this pin goes low for some tens of ms and then back to high, and keeps high.

             It seems that  this low pulse on the GPIO1[27]  pin  is during AM3358 booting from its own "hard code" to find valid boot image followed by the boot configuration pins, because this low pulse happens during AM3358 dumping "CCC...CCC" to uart terrminal.  Also I'm pretty sure my code doesn't drive this pin low whatsoever.

This is quite an issue because the peripheral will be out of AM3358's control and malfunction.

            Is this low pulse on the GPIO1[27] pin really driven by the hard code inside AM3358, or I miss something ? Also, is there any way to remove this low pulse after reset .

ps: I check other GPIO pins , and they all have the same behavior.

Thanks !

Eric

     

  • Hi Eric,

    Please check Table 4-1 in the AM335X Datasheet Rev. H. Pin V17 default state during reset and at reset release time is L: High-impedance with an active pulldown resistor. The typical value of the internal pulldown is ~18kOhm. So one thing is that you will need a stronger pullup to overcome this.

    Another issue is that this pin may be initialized by the ROM code, depending on your SYSBOOT settings. Can you post what these are?

  • Hi, Biser:

    Thanks for your reply. Turn out I did miss something. But quted from TRM 25.4.1.16:  "The GPIO_OE register is used to enable the pins output capabilities. At reset, all the GPIO related pins are configured as input and output capabilities are disabled." Isn't it confusing ?

    Anyway I tried to change the external pullup from 10K to 1K, but it doesn't help because the pin is output low, and not related to the pullup/pulldown resistor.


    Waveform of AM3358 Resetn vs GPIO1[27] as below,

    zoom in at GPIO1[27] after Resetn goes high

    zoom in at GPIO1[27] after Resetn goes high for 3 seconds

    My SYSBOOT[15:0] setting is : 0100_0000_0010_0100, bott sequence is UART0 -> XIP -> MMC0 -> NAND, and the actual boot device is NAND Flash. I can modify the boot sequence, but I think it's matter of 3 seconds or 1 second, maybe I am wrong.

    Thanks !

    Eric

  • Eric Chen22 said:
    My SYSBOOT[15:0] setting is : 0100_0000_0010_0100, bott sequence is UART0 -> XIP -> MMC0 -> NAND, and the actual boot device is NAND Flash

    The XIP device in the boot order is what causes the issue. GPIO1_27 is also GPMC_A11, and this signal is used in XIP with WAIT (MUX1). XIP is before NAND in your boot order, therefore ROM code initializes this pin and tries to boot from XIP. See tables 26-9 and 26-11 from the AM335X TRM Rev. L.

  • I changed SYSBOOT[15:0] setting to : 0100_0000_0011_0011, (boot sequence is NAND -> NANDI2C->MMC0->UART0) right after my post, and the low on the GPIO1[27] is gone. Your reply just verify my experiment. Appreciated.

    But one issue still remains,you mentioned a 18K ohm pull down on the GPIO pin, so I changed my pull up from 10K to 1K, but the voltage on the pin measured around 1.2V, not close to 3.3V as expected. After about 14 seconds, it goes up to 3.3V. I believe this is where my code starts to run. I then changed to 500 ohm (though not a normal value for a pull up) , the voltage is 2.0V and then rise to 3.3V after 14 seconds again.

    From the divider rule, the typical pull down is around 1.8K not 18K, but I never have the experience and don't think AM335x will use 1.8K as pull down. So what do I miss and how to set the GPIO1[27] to 3.3V right after reset ?

    Thanks in advance.
    Eric
  • Eric Chen22 said:
    But one issue still remains,you mentioned a 18K ohm pull down on the GPIO pin, so I changed my pull up from 10K to 1K, but the voltage on the pin measured around 1.2V, not close to 3.3V as expected. After about 14 seconds, it goes up to 3.3V. I believe this is where my code starts to run. I then changed to 500 ohm (though not a normal value for a pull up) , the voltage is 2.0V and then rise to 3.3V after 14 seconds again.

    I actually said 18kOhm, but this was based on 1.8V rail. In fact the input current with receiver disabled and pulldown enabled is typically 110uA (min/max range is from 51uA to 210uA). Still this sounds strange. What is connected to this pin? What you could do from the SW side is disable the pulldown early in the SPL stage of the bootloader.

  •           This pin is connected to GPIO66 of  TMS320F28335 as enable function.

    I tried to set this pin output high in the SPL stage, and test it on 3 boards. 2 of them work just fine, but the other one fial to output high as intended. But strange enough, after failing to set high in SPL stage, I can set to high later after SPL completes with my own command line utility which has exactly the same codes as in SPL. Am I missing something or what do I need to look into  ? I'm pretty sure that all 3 boards under test are the same and believe the board differences should not be the cause.

    Regards and appreciate your feedback.  Eric

  • Well, you should check what happens on the  TMS320F28335 side too. I don't know these processors, so can't comment, but it could be that the  TMS320F28335 is pulling the line low.

  • I wish it's TMS320F28335 is pulling the line too, but unfortunately it's not because I cut the trace to do the test. I did more tests to clarify this issue by erasing all the boot codes resides in NAND so AM3358 will just boot from ROM code without further booting progress. The GPIO1[27] pin behaves as the same befoer ( 2 of 3 boards output high as expected while 1 output low) , so my guess is nothing to do with my code, it's just AM3358 itself that behaves differently.

    Also I'm sure the problematic board is not damaged because it works just as the other two after booting completely.

    Any idea ?

    Thanks

    Eric

  • I see that the  TMS320F28335 is at 3.3V I/O voltage. What is the I/O voltage for the AM335X pin? Are you sure the two processors 3.3V power supplies ramp up simultaneously? Two boards working, one bad - this sounds like a hardware problem.