您好!
我希望 能够将 CC1352R 置于最低功耗模式、并通过 GPIO 或经过特定时间后将其唤醒。
我的独立之处在于 、CC1352R 中的 Power_shutdown ()调用不支持 shutdownTime 参数。 是这样吗?
所以我离开了 ClockP_SLEEP (),它会将器件置于待机模式,并在设定的时间后将其唤醒。
我无法找到一种方法来使其在调用 ClockP_SLEEP ()时从 GPIO 唤醒。
感谢有关如何解决此问题的任何指导。
谢谢!
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.
您好!
我希望 能够将 CC1352R 置于最低功耗模式、并通过 GPIO 或经过特定时间后将其唤醒。
我的独立之处在于 、CC1352R 中的 Power_shutdown ()调用不支持 shutdownTime 参数。 是这样吗?
所以我离开了 ClockP_SLEEP (),它会将器件置于待机模式,并在设定的时间后将其唤醒。
我无法找到一种方法来使其在调用 ClockP_SLEEP ()时从 GPIO 唤醒。
感谢有关如何解决此问题的任何指导。
谢谢!
你(们)好
从关断模式只能在引脚中断时唤醒、从待机模式唤醒您可以从引脚中断或在 RTC 上唤醒。
pinShutdown 示例将向您展示如何通过按下按钮进入和退出关机:
https://dev.ti.com/tirex/explore/node?node=AD2UPG41d.YP16c6cZd5Fg__pTTHBmu__LATEST
pinStandby 示例将使用 SLEEP ()在活动状态和待机状态之间循环器件:
https://dev.ti.com/tirex/explore/node?node=ACsTMQ2l6HH1BzJte74tJg__pTTHBmu__LATEST
BR
Siri
您好、Siri、
感谢您列举这些示例。
我正是遵循这一点。
正如我提到过的:
-按下按钮后,我可以使用关机和唤醒功能。
-我可以使用 Go to standby 并在 N 秒后唤醒。
尝试通过在 ClockP_SLEEP ()之前调用 PINCC26XX_setWakeake()来扩展待机采样来"混合"这两种情况。 运气差。 我可以多次按下按钮、但它不会被唤醒。 仅在经过的时间之后。
您能让我知道我的错误或遗漏了什么吗?
谢谢、
无需使用 PINCC26XX_setWakeake()或 ClockP_SLEEP()。
如果您希望器件进入待机状态、然后想要在特定时间后唤醒、或者当您收到引脚中断时、只需使用信标即可。 下面的代码是 pinStandby 示例、修改后每3秒或按下按钮时唤醒。
* ==== pinStandby。c ====== */ #include /* BIOS 头文件*/ #include #include /*驱动程序头文件*/ #include /* TI-Drivers Configuration */ #include "ti_drivers_config.h" #include #include DeviceFamily_constructPath (driverlib/cpu.h) 静态信号量_StructureSemaphore; 静态信号量_handle buttonSemaphoreHandle; /* led 引脚表*/ PIN_Config LedPinTable[]= { CONFIG_PIN_LED_0 | PIN_GPIO_OUTP_EN | PIN_GPIO_LOW | PIN_PushPull | PIN_DRVSTR_MAX、/* LED 最初关闭*/ CONFIG_PIN_LED_1 | PIN_GPIO_OUTP_EN | PIN_GPIO_LOW | PIN_PushPull | PIN_DRVSTR_MAX、/* LED 最初关闭*/ PIN_TERMINATE /*终止列表*/ };/* 应用按钮引脚配置表: *-按钮中断配置为在下降沿触发。 */ PIN_Config buttonPinTable[]={ CONFIG_PIN_0 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_NEGEDGE、 PIN_TERMINATE }; /*引脚中断引脚表中配置的回调功能板按钮。 */ void buttonCallbackFunction (PIN_Handle handle、PIN_ID pinId){ CPUdelay ((uint32_t)((48000000/3)*0.050f)); if (!PIN_getInputValue (pinId)){ Semaphore_post (buttonSemaphoreHandle); } } /* === mainThread ==== // void * mainThread (void * arg0) { PIN_STATE 引脚状态; PIN_Handle hPin; PIN_Handle 按钮 PinHandle; PIN_STATE 按钮 PinState; uint32_t currentOutputVal; /*初始化按钮信号量*/ Semaphore_construction (&buttonSemaphore、0、NULL); buttonSemaphoreHandle = Semaphore_handle (&buttonSemaphore); buttonPinHandle = PIN_OPEN (buttonPinState、buttonPinTable); /*设置按钮引脚的回调*/ PIN_registerIntCb (buttonPinHandle、&buttonCallbackFunction); /*分配 LED 引脚*/ hPin = PIN_OPEN (&pinState、LedPinTable); while (1){ Semaphore_pend (buttonSemaphoreHandle、300000); /*切换 LED,一次性配置所有 LED */ PIN_setPortOutputValue (hPin、1); CPUdelay ((uint32_t)((48000000/3)*0.1f)); PIN_setPortOutputValue (hPin、0); } }
Siri