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.

TMS570LC4357: Read in PWM by N2HET

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Hi,

I want to read in 2 PWM Signals and give out 2 PWM singals by N2HET1 and read in 4 PWM signals by N2HET2.

By using HALCoGen I was able to give out 2 PWM Signals. Now i am trying to read in PWM signals by considering the input capture of the N2HET1 modul. At the moment it works fine on the N2HET1[4] and N2HET1[6] channel, but it doesn`t work with other channels of NHET1 or channels of N2HET2 using the same configuration. On these "bad" channels i only get 4294967296 as dutycycle and 0 as period.

I didn`t find an answer in the specification of the NHET modul. Anyone know this problem?

thanks for answers

  • Hello Tim,

    I have forwarded your question to one of our NHET experts. They should get back to you shortly.
  • Hello,

    i could solve my problem by myself. It seems that there is a bug in the capGetSignal() function. If i read out the period by

    uint32 pwmPeriod = (hetRAM->Instruction[(cap << 1U) + 24U].Data) >> 7U;

    instead of

    uint32 pwmPeriod = (hetRAM->Instruction[(cap << 1U) + 26U].Data) >> 7U;

    i get the correct period and dutycycle. Since this register belongs to a lower cap, i need to configure this too. So let's say i want to read in a Pwm on NHET1[10] on cap 1, i have to configure NHET1[9] on cap 0. Then i can only read in a Pwm on NHET[10], not on NHET[9].

    Best regards,

    Tim Martin