I'm using one of the PWM outputs on the HAT to drive a small DC fan. The fan takes it's 12Vdc (red) from the HAT (HAT is powered by 12Vdc) and obviously the fans common (black) goes back to the HAT's GND. The fan has a separate control wire (yellow) which requires 25kHz and controls buy 0-100% duty cycle. But the output polarity seems to be the reverse to what I need. See a (very bad) wiring diagram attached.
How can I reverse the output, so it goes from 0-100% duty and not 100-0%? I have had to change the settings in the LIN block I'm using to get it to work, see image of LIN block settings.
using the LIN block is the only possibility at the moment. Is it causing some problems in your project?
No, not causing an issue as such. Setting the LIN block in such a way fixes the problem and allows the fan to operate correctly.