主题中讨论的其他器件:CC2652RB
大家好、
关断功能有问题。
控制器进入关断模式、但仅通过硬复位唤醒。
他忽略了评估板上的 WAKE 引脚 BTN 1
我也添加了此代码 Project Zero 示例项目"project_zero_lp_CC2652Rb_tirtos_ccs":
/* Wake-up Button pin table */
PIN_Config ButtonTableWakeUp[] = {
CONFIG_PIN_BTN1 | PIN_INPUT_EN | PIN_PULLUP | PINCC26XX_WAKEUP_NEGEDGE,
PIN_TERMINATE /* Terminate list */
};
/*
* @brief Handle a debounced button press or release in Task context.
* Invoked by the taskFxn based on a message received from a callback.
*
* @see buttonDebounceSwiFxn
* @see buttonCallbackFxn
*
* @param pState pointer to pzButtonState_t message sent from debounce Swi.
*
* @return None.
*/
static void ProjectZero_handleButtonPress(pzButtonState_t *pState)
{
Log_info2("%s %s",
(uintptr_t)(pState->pinId ==
CONFIG_PIN_BTN1 ? "Button 0" : "Button 1"),
(uintptr_t)(pState->state ?
ANSI_COLOR(FG_GREEN)"pressed"ANSI_COLOR(ATTR_RESET) :
ANSI_COLOR(FG_YELLOW)"released"ANSI_COLOR(ATTR_RESET)
));
PINCC26XX_setWakeup(ButtonTableWakeUp);
Log_info0("go to sleep");
PIN_setOutputValue(ledPinHandle, CONFIG_PIN_RLED, true);
Power_releaseConstraint(PowerCC26XX_SD_DISALLOW);
Power_shutdown(0, 0);
while (1){
PIN_setOutputValue(ledPinHandle, CONFIG_PIN_RLED, false);
}
SDK 版本5.10
我使用 bim_offchip_CC26X2R1_LAUNCHXL_nortos_ccs 作为引导加载程序。
请说明。 谢谢你。