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.

TMS320F280039C: How to measure the ISR loading using our universal motorcontrol lab ?

Part Number: TMS320F280039C
Other Parts Discussed in Thread: BOOSTXL-3PHGANINV

Tool/software:

Hi experts, 

I ask this for my customer.

My customer is evaluate our universal motorcontrol lab based on LP-280039 and BOOSTXL-3PHGANINV and can rotate the motor successfully.

Now they want to know the ISR loading and they want to use GPIO to measure it. They try below two method:

1.Modify the GPIO21 configuration in hal.c

2. Define the GPIO4 configuration in main.c

And try to set GPIO high at the beginning of the ISR and set GPIO low at the end of ISR, but the GPIO output is not change, could you help to check what is wrong?

  • Hi,


    Please try the following codes in hal.c:
    GPIO_setPinConfig(GPIO_4_GPIO4);
    GPIO_setDirectionMode(4, GPIO_DIR_MODE_OUT);
    GPIO_setPadConfig(4, GPIO_PIN_TYPE_STD);
    GPIO_setQualificationMode(4, GPIO_QUAL_3SAMPLE);
    GPIO_setQualificationPeriod(4, 1);


    and the following codes in motor1_drive.c:
    HAL_setGPIOHigh(halHandle, HAL_GPIO_ISR_M1); at the beginning of the ISR;
    HAL_setGPIOLow(halHandle, HAL_GPIO_ISR_M1); at the end of the ISR.
    Also, please make sure your GPIO4 is only used for the ISR loading.


    Thanks,
    Jiaxin