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.

CC2640R2F 的IOD24能作为shutdown 唤醒开光么?



PIN_Config PressBtnTableWakeUp[] = {
    IOID_24  | PIN_INPUT_EN | PIN_NOPULL | PINCC26XX_WAKEUP_NEGEDGE,
    PIN_TERMINATE                                 /* Terminate list */
};


static void Init_Led()
{
     PIN_setOutputEnable(m_ledPinHandle, LED_RUN, 1);
    
    LED_RUN_OFF;
}



static void Init_CS()
{
	PIN_setOutputEnable(m_cs1PinHandle, MCP_SPI0_CS, 1);

}

static void Init_Rst()
{
	PIN_setOutputEnable(m_rstPinHandle, MCP_SPI0_RST, 1);
}


static void Init_MUX()
{

	for (unsigned char i = 0; i < 4; i++)
	{
		PIN_setOutputEnable(m_enPinHandle[i], m_enPort[i], 1);
		PIN_setOutputValue(m_enPinHandle[i], m_enPort[i], 0);
	}
}


//LD_EN  低电平使能
void switchMux(unsigned char code)
{
	unsigned char value = 0;

	if (code >= 4) return;

	for (unsigned char i = 0; i < 4; i++)
	{
		value = (code &(1 << i)) ? 1: 0;
		PIN_setOutputValue(m_enPinHandle[i], m_enPort[i], value);
	}
}



void DiableIOs()
{

    SPI_close(0);
    
    closeUart();
    
    
 

    PIN_setConfig(m_cs1PinHandle,       PIN_BM_DRVSTR,  MCP_SPI0_CS      | PIN_INPUT_EN | PIN_NOPULL );
    PIN_setConfig(m_cs1PinHandle,       PIN_BM_DRVSTR,  MCP_SPI0_MOSI      | PIN_INPUT_EN | PIN_NOPULL );
    PIN_setConfig(m_cs1PinHandle,       PIN_BM_DRVSTR,  MCP_SPI0_MISO      | PIN_INPUT_EN | PIN_NOPULL );
    PIN_setConfig(m_cs1PinHandle,       PIN_BM_DRVSTR,  MCP_SPI0_CLK      | PIN_INPUT_EN | PIN_NOPULL );
    PIN_setConfig(m_cs1PinHandle,       PIN_BM_DRVSTR,  MCP_SPI0_DR      | PIN_INPUT_EN | PIN_NOPULL );
    PIN_setConfig(m_cs1PinHandle,       PIN_BM_DRVSTR,  MCP_SPI0_RST      | PIN_INPUT_EN | PIN_NOPULL );
    
    
    PIN_setConfig(m_enPinHandle[0],       PIN_BM_DRVSTR,  MUX_S0      | PIN_INPUT_EN | PIN_NOPULL );
    PIN_setConfig(m_enPinHandle[1],       PIN_BM_DRVSTR,  MUX_S1      | PIN_INPUT_EN | PIN_NOPULL );
    PIN_setConfig(m_enPinHandle[2],       PIN_BM_DRVSTR,  MUX_S2      | PIN_INPUT_EN | PIN_NOPULL );
    PIN_setConfig(m_enPinHandle[3],       PIN_BM_DRVSTR,  MUX_S3      | PIN_INPUT_EN | PIN_NOPULL );
    
    
    PIN_setConfig(m_ledPinHandle,       PIN_BM_DRVSTR,  LED_RUN      | PIN_INPUT_EN | PIN_NOPULL );
    
    PIN_setConfig(m_ledPinHandle,       PIN_BM_DRVSTR,  DEBUG_RX   | PIN_INPUT_EN | PIN_NOPULL );
    PIN_setConfig(m_ledPinHandle,       PIN_BM_DRVSTR,  DEBUG_TX   | PIN_INPUT_EN | PIN_NOPULL );
    
     
    PINCC26XX_setWakeup(PressBtnTableWakeUp);

    Power_shutdown(NULL, 0);

}

我是这样关机的,关机后,按开关没反应,开不了机,之前这样在2650下是好的。

IOID_24好像是ADC的通道,不太确定能否作为开机使用