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.

[参考译文] TM4C129XNCZAD:深度睡眠模式问题

Guru**** 1810440 points
Other Parts Discussed in Thread: TM4C129XNCZAD, UNIFLASH, TM4C1292NCPDT
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/565411/tm4c129xnczad-deep-sleep-mode-issue

器件型号:TM4C129XNCZAD
主题中讨论的其他器件: UNIFLASHTM4C1292NCPDT

您好!

我们拥有带 TM4C129XNCZAD 微控制器的定制电路板、支持超级电容器。  

软件:TI-RTOS、TI-ARM 编译器5.2.5

每当断电时、我们都会将电路板的上下文保存到内部 EEPROM 中。  之后、我们 打算将微控制器置于深度睡眠模式、以便减少超级电容器放电。  我们将 PK6用作唤醒信号的 GPIO 引脚。 我们有5个任务正在运行

深度睡眠初始化代码如下所示

//
//启用自动时钟门控控制。
//
SysCtlPeripheralClockGating (真);

SysCtlPeripheralDeepSlepEnable (SYSCTL_Periph_GPIOK);

SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_ADC0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_ADC1);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_CAN0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_CAN1);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_COMP0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_EMAC0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_EPHY0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_EPI0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOA);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOB);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOC);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOD);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOE);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOF);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOG);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOH);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOJ);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_HIBERNATE);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_CCM0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_EEPROM0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_FAN0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_FAN1);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOL);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOM);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPION);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOP);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOQ);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOR);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIO);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_GPIOT);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_I2C0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_I2C1);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_I2C2);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_I2C3);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_I2C4);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_I2C5);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_I2C6);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_I2C7);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_I2C8);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_I2C9);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_LCD0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_ONEWIRE0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_PWM0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_PWM1);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_QEI0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_QEI1);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_SSI0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_SSI1);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_SSI2);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_SSI3);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_TIMER0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_Timer1);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_TIMER2);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_TIMER3);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_TIMER4);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_TIMER5);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_TIMER6);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_TIMER7);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_UART0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_UART1);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_UART2);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_UART3);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_UART4);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_UART5);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_UART6);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_UART7);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_UDMA);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_USB0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_WDOG0);
SysCtlPeripheralDeepSlepDisable (SYSCTL_Periph_WDOG1);

//
//设置深度睡眠的时钟。
//关闭 PIOSC 和 MOSC 以节省功耗并从运行
//内部30kHz 振荡器
//
SysCtlDeepSlepClockConfigSet (63、(SYSCTL_DSLP_OSC_INT30 |
SYSCTL_DSLP_PIOSC_PD | SYSCTL_DSLP_MOSC_PD);
//
//在睡眠模式中将 SRAM 设置为低功耗。
//
//
SysCtlDeepSleep PowerSet (SYSCTL_LDO_SLEEP|SYSCTL_TEMP_LOW_POWER|SYSCTL_FLASH_LOW_POWER|SYSCTL_SRAM_LOW_POWER);

//
//在睡眠模式下将 LDO 设置为0.90V。
//
//
SysCtlLDODeepSlepSet (SYSCTL_LDO_0_90V);

我们在发生电源故障时获得中断。 ISR 发布事件。 在保存上下文数据之后。

以下代码称为微控制器休眠

//
//进入睡眠模式。
//
//SysCtlDeepSleep ();

在微控制器上测量的电流消耗从120mA 降低到大约55mA。  数据表显示它应该远低于20mA。  我的所有初始化是否都正确?  我是否必须采取任何措施来降低电流消耗。 我还看到 微控制器被锁定。  两次我都必须使用 Uniflash 来解锁微控制器。

TIA

Narendra

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    对开机自检进行小幅校正。

    //
    //进入睡眠模式。
    //
    SysCtlDeepSleep ();
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好 Narendra

    55mA 过高。 我有一个 TM4C1292NCPDT 器件、其配置几乎相同、在 uA 范围内运行。 您能否确保器件的 VDD 电源与电路板上的任何其他组件分离。

    要使电路板成为基线、只需使用 TivaWare 即可在 TI RTOS 范围之外运行相同的器件。

    至于锁定问题、这种情况会发生、因为深度睡眠中的系统时钟为30kHz、而 JTAG 为 MHz。 对 JTAG 的要求是 JTAG 的 TCK 不需要超过系统时钟的1/10。 此时解锁序列正常。 我会始终在程序开始时通过开关将 GPIO 保持在 while (1)循环中、以便在按下开关的情况下进行简单复位时使器件不会进入深度睡眠模式并允许调试器进行连接。