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.

LP-AM243: LP-AM243

Part Number: LP-AM243

Tool/software:

Hi,

I have AM243x-LP and modified sample code. "C:\ti\motor_control_sdk_am243x_09_02_00_09\examples\position_sense\bissc_diagnostic\single_channel\am243x-lp" for Biss-C encoder. I use one motor and debug r5fss0-0.

In "setting.h" there is the following definition

#define ISR_PRD_IN_SECONDS 0.00002 /* 50KHz @ 1x update is 20us */

and I think "ISR_PRD_IN_SECONDS" is also the update time of "pruEncoderIrqHandler" routine. 

If a change PWM frequency "#define APP_EPWM_OUTPUT_FREQ ( APP_EPWM_OUTPUT_FREQ_50K ) /* init freq */" to "#define APP_EPWM_OUTPUT_FREQ ( APP_EPWM_OUTPUT_FREQ_20K ) /* init freq */" should I change ISR_PRD_IN_SECONDS value to 0.00005 ?

Regards,

Vedat

  • If a change PWM frequency "#define APP_EPWM_OUTPUT_FREQ ( APP_EPWM_OUTPUT_FREQ_50K ) /* init freq */" to "#define APP_EPWM_OUTPUT_FREQ ( APP_EPWM_OUTPUT_FREQ_20K ) /* init freq */" should I change ISR_PRD_IN_SECONDS value to 0.00005 ?

    Yes,

    You need to update ISR_PRD_IN_SECONDS as well, based on the EPWM output frequency.

    Thanks & Regards,

    Achala Ram