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.

AM3352: Resuming from Deepsleep0 using GPIO0_3, 16~31

Part Number: AM3352
Other Parts Discussed in Thread: SYSCONFIG,

Hi experts,

Please tell me about the "AM335x_DS0_PadConf_Tool_v2" that you obtained in the original thread.
/cfs-file/__key/communityserver-discussions-components-files/791/AM335x_5F00_DS0_5F00_PadConf_5F00_Tool_5F00_v2.xlsx

When I use "AM335x_DS0_PadConf_Tool_v2", the Q column of GPIO0[3, 16:31] is written as OUTPUT_LOW.
Does it mean that GPIO0[3, 16:31] cannot be used as an input signal?

In sprac74a, "2.2.3 Wakeup and Deep Sleep Connections" states "GPIO banks that can generate a wakeup interrupt, connect wakeup sources only to GPIO0[0:31]". I am confused because it reads as if GPIO0[0:31] can be used as an interrupt. I have multiple GPIIO0 input signals on my current board, and I am thinking of using them to recover from Deepsleep0.

Best regards,
O.H

  • Hello Sreenivasa,

    Thank you for your quick reply.

    As per my first post,  we confirm TRM and sprac74a.
    In "AM335x_DS0_PadConf_Tool_v2", GPIO0[3, 16:31] is listed as "OUTPUT_LOW", is it correct that we can actually use GPIO0[3, 16:31] ?

    I am sorry, but I have an additional question.

    We are trying to do a wakeup on GPIO0[16:31], but I cannot do it. Could you please let me know if there is anything wrong with the settings?

    1. CM_WKUP_GPIO0_CLKCTRL
      MODULEMODE : set 2
      OPTFCLKEN_GPIO0_GDBCLK : set 1.
    2. GPIO_IRQWAKEN0/1 : Set 0x00700000
    3. GPIO_RISINGDETECT
    4. GPIO_FALLINGDETECT
    5. GPIO_IRQSTATUS_SET0/1 :Set 0x00700000
    6. GPIO_IRQSTATUS0/1 : write 0xFFFFFFFFFF and clear
    7. GPIO_SYSCONFIG : set 0x1C

    After the above settings, after transitioning to DeepSleep0, the device does not wake up from DeepSleep0 even if the corresponding port changes. We assume that the reason it has not woken up is because CKE of DDR-SDRAM is kept Low and Self-Refresh is maintained.

    Best regards,
    O.H

  • Hello O.H, 

    Thank you for the inputs. Let me review and check internally.

    Can you confirm if any of the GPIO0 pins work as wakeup? other than the ones you are observing to not be working.

    Regards,

    Sreenivasa

  • In "AM335x_DS0_PadConf_Tool_v2", GPIO0[3, 16:31] is listed as "OUTPUT_LOW", is it correct that we can actually use GPIO0[3, 16:31] ?

    The setting shown in the xls is an example. You need to adjust the inputs to the spreadsheet per instructions to match your desired system status in DeepSleep0 and get the settings for the lowest LVCMOS I/O current from the tool.   

  • Hi kshin,

    In "AM335x_DS0_PadConf_Tool_v2", GPIO0[3, 16:31] is listed as "OUTPUT_LOW", is it correct that we can actually use GPIO0[3, 16:31] ?

    Sorry. So the answer to my question above is "Yes"?

    We have actually tried the following steps, but could you please check if I have left anything out?
    If there are no omissions, could you please tell me what I need to check?

    We are trying to do a wakeup on GPIO0[16:31], but I cannot do it. Could you please let me know if there is anything wrong with the settings?

    1. CM_WKUP_GPIO0_CLKCTRL
      MODULEMODE : set 2
      OPTFCLKEN_GPIO0_GDBCLK : set 1.
    2. GPIO_IRQWAKEN0/1 : Set 0x00700000
    3. GPIO_RISINGDETECT
    4. GPIO_FALLINGDETECT
    5. GPIO_IRQSTATUS_SET0/1 :Set 0x00700000
    6. GPIO_IRQSTATUS0/1 : write 0xFFFFFFFFFF and clear
    7. GPIO_SYSCONFIG : set 0x1C

    After the above settings, after transitioning to DeepSleep0, the device does not wake up from DeepSleep0 even if the corresponding port changes. We assume that the reason it has not woken up is because CKE of DDR-SDRAM is kept Low and Self-Refresh is maintained.

    Best regards,
    O.H

  • Hello O.H, 

    Thank you for the inputs.

    I will have to consult our expert to review the inputs.

    I had a question previously and asking the same here: are able to follow the same methodology and have any other GPIO0 pin wakeup the processor?

    Regards,

    Sreenivasa

  • Hello Sreenivasa,

    I had a question previously and asking the same here: are able to follow the same methodology and have any other GPIO0 pin wakeup the processor?

    Sorry for not being able to answer. The customer has created a board using AM3352, but they cannot confirm it because there are no signals that can be used for WakeUp in parts other than GPIO0[16:31].

    Best regards,
    O.H

  • Hello O.H, 

    Thank you.

    Let me check internally and update you.

    Regards,

    Sreenivasa

  • Hello Sreenivasa,

    Sorry for rush you. Is there any update? 

    GPIO[0:16] is not available on the current customer's board. So if GPIO[16:32] is not available then hardware changes have to be made so this is a high priority question.

    Best regards,
    O.H

  • Hello O.H, 

    Thank you for the note.

    The expert is out of office this week. 

    Regards,

    Sreenivasa

  • Sorry. So the answer to my question above is "Yes"?

    Yes, you can use a signal from GPIO0 [3, 16:31] as a wakeup event. The issue seems to be related to the SW. Please continue to work with our software expert. He'll respond after getting back from Spring break vacation.  

  • Sorry. So the answer to my question above is "Yes"?

    Yes, you can use a signal from GPIO0 [3, 16:31] as a wakeup event. The issue seems to be related to the SW. Please continue to work with our software expert. He'll respond after getting back from Spring break vacation.  

  • Hi kshin,

    Thanks for your reply and assignment to SW Expert. We look forward to reply from SW Expert. 
    Have a nice vacation.

    Best regards,
    O.H

  • Hello O.H, 

    Thank you for the note.

    As mentioned earlier, the expert is out of office this week. 

    Please expect some delay in response.

    Regards,

    Sreenivasa

  • Hi O.H,

    Do you use Linux on your AM335x board?

    You can define the gpio pin as a gpio_key then add "wakeup-srouce" property in your board device tree file. Then the kernel driver will handle the GPIO wakeup. Please see the following setting on AM335x GPEVM dts as a reference.

    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm/boot/dts/am335x-evm.dts?h=ti-linux-5.10.y#n95

  • Hi Bin Liu,

    Linux is not used.

    Is there any sample code information in the existing content that would be helpful for RTOS/NoOS?
    The content that includes specific register setting procedures for transitioning to Deepsleep0 would be most appropriate.

    Best regards,
    O.H

  • Hi O.H,

    I only support Linux, but as far as I know, Deepsleep is only supported in SDK Linux. I don't think we have sample code to reference for RTOS/NoOS.

  • Hi Bin Liu,

    Thank you for your reply. I understood...

    We are trying to do a wakeup on GPIO0[16:31], but I cannot do it. Could you please let me know if there is anything wrong with the settings?

    1. CM_WKUP_GPIO0_CLKCTRL
      MODULEMODE : set 2
      OPTFCLKEN_GPIO0_GDBCLK : set 1.
    2. GPIO_IRQWAKEN0/1 : Set 0x00700000
    3. GPIO_RISINGDETECT
    4. GPIO_FALLINGDETECT
    5. GPIO_IRQSTATUS_SET0/1 :Set 0x00700000
    6. GPIO_IRQSTATUS0/1 : write 0xFFFFFFFFFF and clear
    7. GPIO_SYSCONFIG : set 0x1C

    After the above settings, after transitioning to DeepSleep0, the device does not wake up from DeepSleep0 even if the corresponding port changes. We assume that the reason it has not woken up is because CKE of DDR-SDRAM is kept Low and Self-Refresh is maintained.

    Would it be possible for you to comment if there are any deficiencies in the above register settings and procedures?
    It would be helpful if you could give us your opinion to solve the problem, even if it seems to be a hint...

    By the way, although it is an old software, the "STARTERWARE-AM335X" project Demo was doing Wake from GPIO, so I would like to partially refer to it.
    If it have any critical issues with this project, please let me know.

    Best regards,
    O.H

  • Hi O.H,

    Would it be possible for you to comment if there are any deficiencies in the above register settings and procedures?

    I am afraid I cannot. You know Linux is complex and I don't every single detail to comment whether the sequence you listed is sufficient or not. We don't have any other documentation explaining the DeepSleep sequence.

    By the way, although it is an old software, the "STARTERWARE-AM335X" project Demo was doing Wake from GPIO, so I would like to partially refer to it.
    If it have any critical issues with this project, please let me know.

    STARTERWARE-AM335X is no longer maintained, but if you can compile it and validate its DeepSleep still works, I think you can use it as a reference to implement the DeepSleep function on your platform.