Other Parts Discussed in Thread: EK-TM4C1294XL
Tool/software: TI-RTOS
Dear all,
I am working on MCU deep sleep mode implementation with a custom board. Given below are the configuration details
- MOSC(25 MHz) is selected as clock source for deep sleep and PIOSC is shutdown in deep sleep. Run time clock configuration is 60 MHz.
- HAL timer 4 is configured with 10 seconds interrupt before going into deep sleep.
- The timer,USB,PWM and its associated GPIO port modules are enabled in deep sleep via SysCtlPeripheralDeepSleepEnable(). Peripheral clock gating is enabled via SysCtlPeripheralClockGating(true).
- Systick is also disabled before entering into deep sleep and re-enabled after waking up from deep sleep. If this step is not added, the MCU immediately wakes up from deep sleep.
- I am using __asm(" CPSID i") before disabling Systick and going into deep sleep. Also, _asm("CPSIE i") is used after waking up from deep sleep and re-enabling Systick. The use of these two assembly instructions makes sure the code between these instructions is executed first and then any other interrupts or further code is executed.
The problem that i am facing is that after instrument goes into deep sleep, it only wakes up on timer interrupt i.e. after 10 seconds. Connecting USB does not cause it to wake up from deep sleep. A message is displayed on PC stating USB device has malfunctioned. After this issue occurs, the cable is only detected after disconnecting and reconnecting it when MCU is not in deep sleep.
Another problem i am getting is that during the 10 seconds deep sleep time, LEDs are turned OFF. As soon as MCU wakes up from deep sleep, the LEDs are turned ON again.
Please let me know what am i missing here that could be causing these issues and how can i resolve them. Thanks in advance.
Muhammad Shuaib