TMS320F28P650SH: llc hrpwm sysconfig

Part Number: TMS320F28P650SH
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

i use TMS320F28P650SH,

i want to use sysconfig to doing llc ,but can't use HRPWM Period Control

see the P65_TPE0XX_buck_boost_master.syscfg than EPWM ->PWM_test

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "F28P65x" --part "F28P65x_176PTP" --package "176PTP" --context "CPU1" --product "C2000WARE@5.02.00.00"
* @v2CliArgs --device "TMS320F28P650SH" --package "176PTP" --variant "TMS320F28P650SH6" --context "CPU1" --product "C2000WARE@5.02.00.00"
* @versions {"tool":"1.21.0+3721"}
*/
/**
* Import the modules used in this configuration.
*/
const adc = scripting.addModule("/driverlib/adc.js", {}, false);
const adc1 = adc.addInstance();
const adc2 = adc.addInstance();
const adc3 = adc.addInstance();
const analog = scripting.addModule("/driverlib/analog.js", {}, false);
const analog1 = analog.addInstance();
const cmpss = scripting.addModule("/driverlib/cmpss.js", {}, false);
const cmpss1 = cmpss.addInstance();
const cmpss2 = cmpss.addInstance();
const cmpss3 = cmpss.addInstance();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

do you have p65 than llc sysconfig exsample?

or have any reference sample

i try anain modify sysconfig

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "F28P65x" --part "F28P65x_176PTP" --package "176PTP" --context "CPU1" --product "C2000WARE@5.02.00.00"
* @v2CliArgs --device "TMS320F28P650SH" --package "176PTP" --variant "TMS320F28P650SH6" --context "CPU1" --product "C2000WARE@5.02.00.00"
* @versions {"tool":"1.21.0+3721"}
*/
/**
* Import the modules used in this configuration.
*/
const adc = scripting.addModule("/driverlib/adc.js", {}, false);
const adc1 = adc.addInstance();
const adc2 = adc.addInstance();
const adc3 = adc.addInstance();
const analog = scripting.addModule("/driverlib/analog.js", {}, false);
const analog1 = analog.addInstance();
const cmpss = scripting.addModule("/driverlib/cmpss.js", {}, false);
const cmpss1 = cmpss.addInstance();
const cmpss2 = cmpss.addInstance();
const cmpss3 = cmpss.addInstance();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

the HiResTimeBasePeriodOnly work

EPWM_setTimeBasePeriod(PWM_test_BASE, (uint16_t)frequency_duty);
HRPWM_setHiResTimeBasePeriodOnly(PWM_test_BASE,(uint16_t) frequencyMEP_duty);

my xx.cla code

at xx.cla:

float read_duty;
float frequency_step;
float frequencyMEP_step;
uint16_t frequency_duty;
uint16_t frequencyMEP_duty;
float test_duty;
float MEP_step;
uint32_t HRpwmA;
frequency_step =(test_duty*2.0f+1.0f);
frequencyMEP_step=(__mfracf32(frequency_step) * (float32_t)MEP_ScaleFactor) + 0.5f;
MEP_step=(__mfracf32(test_duty) * (float32_t)MEP_ScaleFactor) + 0.5f;
read_duty = (((test_duty / frequency_step) - 0.075f) * 100.0f);
HRpwmA=((uint32_t)(test_duty * 256.0f)) + (((uint32_t)MEP_step));
frequency_duty =(uint16_t)frequency_step;
frequencyMEP_duty =(uint16_t)frequencyMEP_step;
EPWM_setTimeBasePeriod(PWM_test_BASE, (uint16_t)frequency_duty);
HRPWM_setHiResTimeBasePeriodOnly(PWM_test_BASE,(uint16_t) frequencyMEP_duty);
HRPWM_setCounterCompareValue(PWM_test_BASE, HRPWM_COUNTER_COMPARE_A, (uint32_t)HRpwmA);
HRPWM_setCounterCompareValue(PWM_test_BASE, HRPWM_COUNTER_COMPARE_B, (uint32_t)HRpwmA);

if the test_duty set 99 work was passed

but if change "test_duty" to 150.3

the frequency not stable output.

i use lib 5.2 &SFO_v8_fpu_lib_build_c28_driverlib.lib

  • Hi, 

    Could you give me a cutdown and simpified version of your sysconfig which I can use to reproduce the issue, remove all other peripherals only have the pwm instance where you think the issue is.

    To close this faster can you help me with an expected waveform and the pwm config which briefly describe your PWM config - 
    Like what is the
    1) deadband config,
    2) action qualifiers and so forth.

    If you are using DB then the output above makes sense to me. Why do you think the "frequency" is not stable ?

    the frequency not stable output

    Thanks

  • i resolved this issue

    disable sync in pluse source

    and i use sysconfig 1.21 or 1.22

    my question why can't sync in pluse source PWM2?

  • Hi,

    It is possible to sync to any pwm as shown below in the dropdown , what is your question here ?

    Thanks

  • pwm2 is my cla compensator 50khz,pwm8 us my helf llc output ,i want to pwm8  sync in pwm2.

    this my question ,

    or the llc compensator not needs sync the pwm8  pri pwm output?

    if normal llc  compensator not needs sync llc pwm output let me know

  • Hi,

    I didn't understand your question, maybe the translation is bad.

    Its possible to sync any pwm's with any pwm if that is your question

    if normal llc  compensator not needs sync llc pwm output let me know

    If you are asking how LLC works, I cant answer that for you. I will reassign or Please make another thread for LLC specific questions.

    Thanks