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.

CCS/TMS570LS0432: TMS570LS0432 HET PWM module configuration

Part Number: TMS570LS0432
Other Parts Discussed in Thread: HALCOGEN,

Tool/software: Code Composer Studio

Hello, everyone, I'm glad you answer to my question, thank you very much!

I recently in the use of TI TMS570LS0432 security chip, the company intends to use this one do a car controller chips, used in automotive electronic power steering control, need to use PWM module, I use compile environment is CCS6.1, using the code generator HALCOGEN04.05.01.The controller without PWM module, however, need to PWM waveform is generated by HET module configuration, after the configuration has been able to generate PWM waveform, but the problem is the precision of the PWM waveform is too low, I am using HALCOGEN generated interface function, as shown in figure:

The parameter uint32 pwmDuty can only input the number 0 to 100, using the oscilloscope to measure PWM waveform of the output duty cycle of 0 to 100%, the input value represents the duty ratio of output waveform, such precision is too low.I need to output a PWM waveform cycle of 20 KHZ, the bus clock is 80 MHZ, the cycle time of 12.5 ns, so a cycle number 4000, excuse me, I need to work, how to make the input number is 0 to 4000, on behalf of the output waveform of duty ratio of 0 to 100%, below is an image I configuration:

Ask everybody to help me see what need to do, need to do to modify the interface function can satisfy my needs, be obliged!

  • Yes that's a limitation of the HET program that uses the PWCNT and DJZ instructions to generate the PWM (The HalCoGen program).

    You can implement a different type of PWM program by coding the PWM yourself, testing and assembling w. the HET IDE, and then linking your custom program into the HalCoGen code by checking the 'Enable Advanced Config Mode / Disable Black Box Driver' box and selecting the .C and .H files that come out of the HET IDE's assembler.

    just FYI, you take HET Assembly (.HET) --- HET ASSEMBLER ---> output is a .C, .H file pair.
    this seems odd because .C and .H are usually sources. But the .C contains an array of the machine code for the HET
    ready to compile into a data area in flash so the application [hetInit()] can copy it to the HET at runtime.
    And the .h contains structures to let you talk to your HET program from the ARM CPU...

    Now, there is an appnote that shows how to implement a different type of PWM
    www.ti.com/.../getliterature.tsp
    And you should get higher resolution out of this.
  • TO Anthony F. Seely,

    Thank you very much for your answer, I first according to the document I try to written in assembly language, there is a problem to reply you, thank you very much!

  • Hello, thank you very much for your answer, according to the document, and your advice, I have successfully configured out of the need of waveform, thank you!