cancel
Showing results for 
Search instead for 
Did you mean: 

F334R8 and HRTIM1 issues, how to solve and how to properly debug...

LS. B.1
Associate II

I put the following question in the General forum of STM32, only today I saw the specific forum for questions related to Digital Power. Anyway..

I'm builing a photovoltaic power application using the F334R8, but i'm having issues with HRTIM1, TIMERA/TIMERB output. Attached are scope outputs.

CH1 the main power switch Drain-Source voltage, CH2 is the signal comming from the STM32F334R8 HRTIMA (or B) - which drives CH1; CH3 is the output of the high voltage side of the inverter (TIMC/TIMD) and CH4 is the current through an active clamp converter - synched with CH1...

The problem is: The output from TIMA/TIMB can sometimes randomly gets higher than 100%! (as shown on CH2).

HRTIMA/B configuration seems to be correct - also i'm enabling shadow registers - and the code to extract those waveforms are running an open-loop soft-start duty increase *** only ***....

It's very weird and very random, so the question is: what should I check on the STM32 side? code? hw? power-sources?

BTW:

Code to update the TIMA/TIMB registers:

    HRTIM1->sTimerxRegs[HRTIM_TIMERINDEX_TIMER_A].CMP3xR = DEF_TMRA_STATIC_MAX_PWM_CTE+i_CalcDutyA;

    HRTIM1->sTimerxRegs[HRTIM_TIMERINDEX_TIMER_A].CMP1xR = DEF_TMRA_STATIC_MAX_PWM_CTE-i_CalcDutyA;

    HRTIM1->sTimerxRegs[HRTIM_TIMERINDEX_TIMER_B].CMP3xR = DEF_TMRA_STATIC_MAX_PWM_CTE+i_CalcDutyB;

    HRTIM1->sTimerxRegs[HRTIM_TIMERINDEX_TIMER_B].CMP1xR = DEF_TMRA_STATIC_MAX_PWM_CTE-i_CalcDutyB;

Code for the soft-start:

#define      DEF_FIX_DUTY      3000

         // Timer 6 de 10ms

         t_TimerShort[s_timer6].habilita = 1;

         if (t_TimerShort[s_timer6].habilita && t_TimerShort[s_timer6].verifica)

         {   t_TimerShort[s_timer6].verifica = 0;

            if (stCC_CC_Params.i16_DutyA++ >DEF_FIX_DUTY) stCC_CC_Params.i16_DutyA=DEF_FIX_DUTY;

            stCC_CC_Params.i16_DutyB = stCC_CC_Params.i16_DutyA;

            updateCC_CC_Duty((int16_t)stCC_CC_Params.i16_DutyA,

                      (int16_t)stCC_CC_Params.i16_DutyB);

         }

1 ACCEPTED SOLUTION

Accepted Solutions
LS. B.1
Associate II

I did manage to solve this issue.

The +3.3V was picking some noise from inverter high frequency switching.

So, when the +3.3V had a tiny increase due to HF noise, somehow the HRTIM1 gives this weird output.

View solution in original post

1 REPLY 1
LS. B.1
Associate II

I did manage to solve this issue.

The +3.3V was picking some noise from inverter high frequency switching.

So, when the +3.3V had a tiny increase due to HF noise, somehow the HRTIM1 gives this weird output.