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.

EK-TM4C1294XL: PWM Full Bridge

Guru 56143 points
Part Number: EK-TM4C1294XL


How can any version Tivaware PWMGenConfigure() properly configure any two PWM generators (COMP-A/B) for asymmetric phase shifted outputs? That requirement is needed to produce Full H bridge asymmetric complementary drives for PWM-A' PWM-B' signal pairs. Many designers know how to but Tivaware has seemingly restricted datasheet analysis of PWM module functionality to one particular comparator drive condition.

Examples of asymmetric PWM drive signals often used in DC inverters and such. 

https://www.google.com/search?rlz=1C1AFAB_enUS550US550&q=asymmetric+phase+shifted+pwm&tbm=isch&source=univ&sa=X&ved=2ahUKEwik4LrJiffoAhXBVs0KHaxSBO4QsAR6BAgLEAE&biw=1267&bih=759

If we must at all times use Tivaware to configure peripherals, why does PWMGenConfigure() force comparators to produce overlapping signal pairs and no others? Such mandates are contrary to datasheet expressed statements of PWM module flexibility and functionality, are they not?

The datasheet is the explanation of why HWREG macro exists as to make complicated code flow easier to follow along (troubleshoot) via datasheet register mapping. Seemingly stack manipulations SRAM calls to Tivaware driverlib invites mayhem to invade common sense SW configurations by direct HWREG macro calls for register R/W. The only added benefit of Tivaware being ASSERTS, should be switched off anyway in release SW is initially faster to develop test code modules and for areas of non-application related code marked X, don't care.  

 

  • TI strongly recommends the use of the TivaWare Peripheral Driver Library whenever possible for multiple reasons that have been listed throughout this forum. However, we acknowledge that this library cannot anticipate all use cases. Sometimes the user may need to use direct register writes (HWREG()) to write their own custom driver. This is a task suited for experienced engineers who understand the peripherals well. A task not recommended for beginning students or hobbyists. If you feel confident in your understanding of the PWM module, go for it. However, supporting your endeavor is beyond the scope of our help here on the forum.

  • Point was HWREG macro makes it much much easier to follow what the datasheet register/s are doing, driverlib calls not nearly as much. It would seem in some cases necessary to do HWREG over writes to get the peripheral to function as datasheet implies can be accomplished, otherwise not at all.

    That was second point, TI stopped short with driverlib capability limiting TM4C1294 marketable possibilities in the process.  There must be an obvious reason that was done. Oddly the PWM module seems to work better for Full Bridge DC conversion driver opposite what PWMGenConfigure() forces and produces. It would not have taken to much more effort to pass COMP-A/B datasheet register defined actions into this same call with limited explanations.