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.

TDA4VM: semHandle for function level or task level?

Part Number: TDA4VM


Dear export,

I have one task with 5ms period:

void period_10ms_task()

{

Global_var_a++;

get_adc_data_function();

}

I have one function to get adc value:

void get_adc_data_function(void)
{
    SemaphoreP_pend(semHandle_adc0, SemaphoreP_WAIT_FOREVER);

    fifoWordCnt = ADCGetFIFOWordCount(APP_ADC_MODULE, ADC_FIFO_NUM_0);

    for (loopcnt = 0U; loopcnt < fifoWordCnt; loopcnt++)
    {
        fifoData = ADCGetFIFOData(APP_ADC_MODULE, ADC_FIFO_NUM_0);
        adcSampleData[sampleCount] = fifoData;
        if (sampleCount < (ADC_TEST_SAMPLE_COUNT - 1))
            sampleCount++;
        else
        {
            exitLoop = 1;
            break;
        }
    }
}

I have one ISR:

void AppADC0_IntrISR(void *handle)
{

uint32_t status;

    //AppADCPrint("\nIn ISR...\n");
    status = ADCGetIntrStatus(CSL_MCU_ADC1_BASE);
    ADCClearIntrStatus(CSL_MCU_ADC1_BASE, status);
    if (ADC_INTR_SRC_END_OF_SEQUENCE == (status & ADC_INTR_SRC_END_OF_SEQUENCE))
    {
        adc1_IntStatus[0]++;
        SemaphoreP_post(semHandle_adc0);
    }

}

My question is:

If the ISR has not triggerd the semHandle_adc0 post, Will the function go to pend and the task can running?