Showing posts with label STM32. Show all posts
Showing posts with label STM32. Show all posts

STM32 + HAL + FreeRTOS Part VIII: PWM and complimentary PWM

I need to drive a Peltier element for thermal stabilization. Typically they are driven by a linear source and it's even recommended to do it that way. I did use MAX1968 as a bipolar driver, but that has a few drawbacks - hardware PID controller is fixed so there's very little room for thermal load variations; limited current/voltage. So I decided to try out driving an H-bridge with PWM and LC filter. While looking at PWM module in STM32F429 I noticed an interesting "complimentary" feature. I tested it out and here we go.

STM32 HAL DCMI gocha

 I've been slowly digging through the OV5640 configuration, trying to fit it to my needs. And it's difficult to do, if you have 3 sets of potential error sources:

  1. Your own code
  2. Target device (camera) driver code
  3. STM HAL!

 Every now and then I've been getting chopped up images, such as this:

 

Eventually they would go away (after 5-10 captures), but meanwhile it's unusable. Especially if you are dealing with an autonomous device, which needs proper imagery.

Of course, first I blame myself, then others. Except this time it's not me, it's ST Micro!