Skip to main content
Graduate
July 10, 2024
Question

dead time generation of 24 micro seconds

  • July 10, 2024
  • 2 replies
  • 4215 views

hi I'm using NUCLEOG4 series controller. configuring TIM1 in both normal and complimentary PWM. PWM is generating, no problem in that. but i want 24 micro seconds of dead time between top and bottom pwm. but i can able to achieve maximum of 6 micro seconds only. As per the datasheet and calculation, dead time insertion value for 24 micro seconds is 244, but output dead time is maximum 6 micro seconds.

can anyone suggest how to achieve 24 us deadtime in nucleog4 and I'm running at 170MHZ.

    This topic has been closed for replies.

    2 replies

    Graduate II
    July 10, 2024

    @Srinath_03 wrote:

    I'm using NUCLEOG4 series controller


    Which one. Please provide exact product name or a link.

     


    @Srinath_03 wrote:

    dead time insertion value for 24 micro seconds is 244, but output dead time is maximum 6 micro seconds.


    Please upload your ioc file and user code.

    Graduate
    July 10, 2024

    nucleog4 stm32g474ret6 controller at 170MHZ

    I'm just directly keeping the calculated 244 value in deadtime configuration section in IOC file. 

    Graduate II
    July 10, 2024

    That's not the full ioc file, just a screenshot of a single value.

    From what I read in RM0440 the dead time value is a 10 bits value, so it should work from 0 to 1023. So 244 ticks should work.

    DTG is 3 bits and has 4 possible values: 1,2,8,16 * DTS

    Can you post the register values?
    Can you post an oscilloscope/logic analyzer capture? Pick a sane duty cycle. Use several values for dead time.

    Graduate II
    July 19, 2024

    I think I figured it out. I didn't know anything about this particular MCU or how these timers worked, but after reading the reference manual (RM0440) I think I found it:

     

    /*
    from RM0440 Rev 8:
    "Bits 9:8 CKD[1:0]: Clock division
    This bitfield indicates the division ratio between the timer clock (tim_ker_ck) frequency and
    the dead-time and sampling clock (tDTS )used by the dead-time generators and the digital
    filters (tim_etr_in, tim_tix)"
    */

     

    looking at the block diagram you will see tim_ker_ck, tim_psc_ck and tim_cnt_ck
    The prescaler divides tim_psc_ck and outputs tim_cnt_ck, but the dead time uses tim_ker_ck.
    You generally want tiny dead time values, even with high prescaler values, so it makes sense the dead time block is clocked separately. So set Internal Clock Division in STM32CubeMX.