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.

TMS320F28069: wake up the device through a GPIO from HALT mode

Part Number: TMS320F28069
Other Parts Discussed in Thread: C2000WARE

Hi,

my customer tries to wake up F28069 from HALT mode through a GPIO, and the pulse on the GPIO port is as below:

 low pulse is 60ms, and according to the datasheet HALT Mode Timing Requirements

tw(WAKE-GPIO) need to be at least: toscst + 2tc(OSCCLK), toscst=10ms(typical), external clock is 20MHz, which means tc(oscclk)=0.05ms.

So 60ms is way longer than needed.

But we find that we can not always wake up the device, the success rate is only 30%.

Could you please tell me what's wrong here?

  • Howard,

    Where does the wakeup signal come from? If it is coming from another board, are the two grounds connected together? Could you please try C:\ti\c2000\C2000Ware_3_03_00_00\device_support\f2806x\examples\c28\lpm_haltwake ?

  • Hareesh,

    yes it's from another board, the two grounds are connected together.

    I tried the example code by loading the code to RAM and click resume button on CCS.

    When I try to pull GPIO0 low, the program stopped and in CCS it says:

    Break at address "0x3ff4fa" with no debug information available, or outside of program code.

    And GPIO1 doesn't go high as expected. What may be wrong?

  • Howard,

    That is a tested code. Not sure why it is not working in your setup. I presume the scope waveform was captured at the GPIO pin of 28069. It is hard to debug issues like this without access to the hardware. Is the behavior the same no matter how many time you try?

  • Hareesh,

    sorry for interrupt. I test this code on our EVM.

    The problem is caused by the GPIO0 is not high-low-high, but high-low-floating.

    I tried GPIO0 high-low-high, and it works well.

    I'll let the customer test our code on their board to see if this code works.

  • Hareesh,

    after testing on the customer board, we find:

    If we disable EPWMINT(which is the main interrupt for control loop) before going into HALT mode, the device could be wake up correctly. And even with 30us low pulse, the device could be wake up 100%.

    If we don't disable EPWMINT before going into HALT mode, the device may or may not be wake up with the same wake up pulse on the configured GPIO.

    So the question is:

    1. We need to disable all interrupt except WAKEINT before going into HALT mode, otherwise the device may not be wake up correctly, right?

    2. Why 30us low pulse can wake up the device? In fact short duration is good, but we are not confident that short duration low pulse is 100% enough to wake up a device.

    3. After the device go into HALT mode, will the EPWM signal keep their high or low level the same as before they go into HALT mode? And the PWM counter is freezed? After the device wake up, the PWM counter will resume counting instead of reset to 0, right?

  • 1. We need to disable all interrupt except WAKEINT before going into HALT mode, otherwise the device may not be wake up correctly, right?

    Correct. This is clearly stated in the TRM. See Table 1-40, page 99 of SPRUH18H.

    "Disable all interrupts with the possible exception of the HALT mode wakeup interrupt. The interrupts can be reenabled after the device is brought out of HALT mode."

    2. Why 30us low pulse can wake up the device? In fact short duration is good, but we are not confident that short duration low pulse is 100% enough to wake up a device.

    The device is awakened asynchronously. However, to ensure reliable wakeup, please adhere to the datasheet limits

    3. After the device go into HALT mode, will the EPWM signal keep their high or low level the same as before they go into HALT mode?

    The I/O pins maintain the same level they had before entering HALT.

    And the PWM counter is freezed?

    Yes.

    After the device wake up, the PWM counter will resume counting instead of reset to 0, right?

    It will resume counting.

  • Hareesh,

    if we use external oscillator for clock, can we consider toscst=0?

    I guess toscst is the start-up time of the internal oscillator when we use crystal.

    But if we use external oscillator, the oscillator is always working even in halt mode, so no time is needed for the oscillator to start up, right?

  • That is correct. Note, however, that the external oscillator will continue to draw some current while the MCU is in HALT mode. This current could be several mA (you need to look at the datasheet of the specific oscillator you are interested in). In that sense, it may defeat the purpose of using HALT mode.