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.

MSP432P401R: GPIO INTERRUPTION: "GPIO_CFG_IN_INT_BOTH_EDGES"

Part Number: MSP432P401R

Hi,

I have configured one input like "GPIO_CFG_IN_INT_BOTH_EDGES" to capture how long is a input pulse (echo from HCSR04).

I have noticed with this configuration only I can detect falling edged but not the rising edge. If I configure line "GPIO_CFG_IN_INT_RISING" my code capture rising edge without problem and if I configure "GPIO_CFG_IN_INT_FALLING" my callback function capture the falling edge. Any clue about this issue?

Best regards,

My callback function code:

void hcsr04IntCallBack(uint_least8_t index){


    //Detect  rising
    if (GPIO_read(Board_GPIO_ECHO)==1){
        queueDebugSendFromISR("[HC-SR04] Echo start ++");
        startTime=xTaskGetTickCountFromISR();

    }
    // Detect failing
    else if (GPIO_read(Board_GPIO_ECHO)==0){
        queueDebugSendFromISR("[HC-SR04] Echo end --");
        GPIO_disableInt(Board_GPIO_ECHO);
        endTime=xTaskGetTickCountFromISR();
        }

    }

**Attention** This is a public forum