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.

TMS320F280049: ASysCtl_selectCMPHPMux and ASysCtl_selectCMPLPMux Functions in DriverLib

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Hi, Champs,

My customer is using F28004x and driveilib in C2000Ware (v1_00_04_00).

One problem they found is the operation in ASysCtl_selectCMPHPMux and ASysCtl_selectCMPLPMux functions seems to be incorrect.

Since the register to be operated in those 2 functions are 32bits, while the MACRO defined there is not default to 32bit, then when the shift operation makes the results exceeds 65535, there will have an error, so the code below:

(ASYSCTL_CMPLPMXSEL_CMP1LPMXSEL_M << (uint32_t)select)

should be revised to be:

((uint32_t)ASYSCTL_CMPLPMXSEL_CMP1LPMXSEL_M << (uint32_t)select)

Could you please check if it's true or if we will have a correction in future release?

Best Regards,

Ricky Zhang

  • hi Ricky ,

    Have they seen an error when the shift operation makes the results exceeds 65535?

    When tried with the below parameters the result is seen in the resp registers.

    ASysCtl_selectCMPLPMux(ASYSCTL_CMPLPMUX_SELECT_7, 4);  -> result  -> 200000
    ASysCtl_selectCMPLPMux(ASYSCTL_CMPLPMUX_SELECT_7, 2); -> result ->  100000

    Similar for ASysCtl_selectCMPHPMux .

    Regards.

  • Meghana,

    I asked customer for this but they didn't get it tested and give me a feedback yet.

    I guess there's no error reported but they simple doubt the result will be overflow and then it will be incorrect.

    Best Regards,

    Ricky Zhang

  • Hi Ricky ,

    Even when the shift operation makes the results exceeds 65535 being a Logical Shift Left the result would be correct.
    The issue is they remove previously configured data.
    We will fix this in the future release.

    Regards.