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.

LAUNCHXL-F28379D: HWREG or HWREGH not working inside the CLA

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE

Hi,

My CLA task 1 looks like follows -

__interrupt void Cla1Task1 ( void )
{
    float sigma;

    HWREGH(GPIODATA_BASE + GPIO_O_GPADAT) |= GPIO_GPADAT_GPIO10;
    __mdebugstop();

    vg_sense = (float)HWREGH(ADCARESULT_BASE + ADC_O_RESULT0 + 0U);
    iL_sense = (float)HWREGH(ADCBRESULT_BASE + ADC_O_RESULT0 + 0U);

    // Calculation of Sliding Surface Equation
    sigma = K*(vg_Ref - vg_sense) + (iL_sense - iL_Ref);

    if(sigma > HighL)
    {
        // Do something
    }
    else if (sigma < LowL)
    {
        // Do something else
    }

    // GPIO for profiling
    HWREGH(GPIODATA_BASE + GPIO_O_GPADAT) |= GPIO_GPADAT_GPIO10;
}

The HWREGH instruction don't work inside the CLA even though they do work in the C28x (if place  in any ISR). I'm not sure why this is happening. Can someone advise me on this.

Update :

I imported the asin_cla project from c2000ware for the F28379D and used the same HWREG function for GPIO toggle and it works there. This is really inconsistent behavior.