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: pin register configure for port event

Part Number: CC2640R2F

Hi, 

I want to set pin 15 as port event pin so I need to change port id part in register. 

I already saw the pin example provided by ti but it does not change pin register but set pin configure structure. 

According to the document, I need to set port id 17h to use pin as port event 0.

Which function should I use?

  • You can do something like this:

    #include <ti/drivers/pin/PINCC26XX.h>
    .
    .
    PIN_State testPinState;
    .
    .
    void *mainThread(void *arg0)
    {
        .
        .
        .
        PIN_Config testTable[] =
        {
            IOID_15 | PIN_GPIO_? | PIN_GPIO_?, // Depends on how you want to configure the port
            PIN_TERMINATE
        };
    
        PIN_Handle testPinHandle = PIN_open(&testPinState, testTable);
    
        PINCC26XX_setMux(testPinHandle, IOID_15, PINCC26XX_MUX_MCU_PORT_EV_0);
        .
        .
    
    
    
    Siri