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.

TM4C1231E6PZ: Problems with Sleep Modes

Part Number: TM4C1231E6PZ

Hello,

currently we want to use the sleep and deep sleep mode on TM4C1231E6PZ. 

We tried to wake up from these modes with the RTC -> This works very well.

But wake up from these modes with the #WAKE (Pin 50) pin doesn't work. -> No interrupt is generated.

In the datasheet the wake pin (pin 50) is a possible wake up source for the sleep modes.

Do you have an idea what the problem coud be?

Thanks

chris

  • Hello Chris,

    When talking about Sleep & Deep Sleep modes, I don't see any mention of using /WAKE as a wake source. Hibernate mode is different from Sleep & Deep Sleep which are Cortex-M4 specific. The Hibernate module is a device-specific peripheral. The RTC only wakes it because it triggers an interrupt.

    I am not sure how you are configuring the /WAKE pin as an interrupt but my guess is that you are configuring without understanding that the RTC is only waking because it is causing a general interrupt that triggers the system to wake and it is not explicitly tied into Sleep or Deep Sleep.

    Best Regards,

    Ralph

  • Hi Chris,

    I jump in here for my customer Christoph. Basically they want to use the sleep mode/deep sleep mode of the controller.

    To wake up the controller from these modes we would like to use the #Wake pin (50) from the Hibernation module. According to the datasheet this should work -> but unfortunately it doesn't.

    They compiled this summary:

    In the same way as RTC triggers an interrupt, the /wake pin should if configured accordingly.
    The only differences are the bit positions in the hibernation interrupt registers.

    The TM4C1231EPZ manual (June12, 2014, page 487) describes the EXTW bit in the Hibernation Raw Interrupt Status (HIBRIS), offset 0x018 as follows:


    We also can read, that this bit works also in the run and sleep modes!
    Unfortunately I can’t see this!!

    Bit 0 of the same Register is for the RTC match interrupt which wakes-up my system from (deep) sleep by the hibernation interrupt as expected:


    Interrupts will be forwarded to the interrupt controller if the corresponding mask bits in the Hibernation Interrupt Mask (HIBIM), offset 0x014 are set. The manual describes the bit for /WAKE as follows:


    This is in accordance with e.g. the mask bit for the RTC alert which works well:
      

    All hibernation interrupts are routed via the NVIC to the same interrupt vector. The fact that the RTC pulls my system out of (deep) sleep and calls my hibernation interrupt service, proves that the interrupt system is configured correct.
    What I find suspicious is, that I never found the EXTW bit set in the HIBRIS register. To me, this explains why no hibernation interrupt occurs and the controller doesn’t wake-up.
    On the other hand, if I hibernate the system, the /WAKE works well and the hibernation interrupt service is called. So I assume that the /WAKE signal is routed correctly. Which is also checked with the scope.

    It seems to me, that in run an sleep modes a ‘link’ between the signal on the /WAKE pin and the EXTW bit in the HIBRIS register is missing.
    Is there a condition not fulfilled, to forward the /WAKE signal to the EXTW bit in HIBRIS?

    That this should work is e.g. mentioned on page 474, chapter 7.3.12 Interrupts and status:


    Or simply is the silicon faulty at his point? If so, a errata clarifying this would be enormous helpful!

    Regards Bernd

  • Hello Bernd,

    Thank you for the further details here. I can look into this further on my LaunchPad. Can I get the code provided that is being used to configure the hibernation module and the /WAKE interrupt so I am starting with the code that is currently not working?

    One thing I recall from a prior E2E post is that while the datasheet implied that /WAKE will trigger an interrupt in Run mode, it did not do so. If this also applies to Sleep and Deep Sleep we will certainly need to look into if this is an errata issue then or something lacking in the configuration. https://e2e.ti.com/support/microcontrollers/other-microcontrollers-group/other/f/other-microcontrollers-forum/841293/tm4c123gh6pm-wake-pin-status-in-run-sleep-deepsleep/3114944#3114944

    I was trying to investigate on my end briefly earlier, but I didn't have the time today to get it running, so getting the current code that is not providing the desired results will speed up my efforts tomorrow.

  • Hi Ralph,

    the responsible sw engineer is a few days on vacation but will come back asap with the code example.

    Regards Bernd

  • Hi Ralph,

    I sent you the example offline.

    Regards Bernd

  • Hello Bernd,

    Thank you, I will review their project and what I had done on my own later this week. I will try and provide some initial feedback Friday, but full investigation may need to come next week due to shorten work week.

    Best Regards,

    Ralph Jacobi

  • Hello Bernd and Chris,

    I attempted to work with the provided software today but I had various issues:

    1. Could not get projects to build
    2. Not sure where the RTC code is located
    3. No FreeRTOS experience

    Given that this is FreeRTOS based and we have no experience there, I think I will need to work off my own code but it would be very helpful to see how the sleep and wake is being configured in the FreeRTOS so I use similar settings in bare metal.

    Best Regards,

    Ralph Jacobi