Generating a PWM Signal with High Speed PWM Module Fails on dsPIC33EP Family

Why does generating a PWM signal with high-speed PWM module fail on the dsPIC33EP family? PWMxH pin is always zero, indicating that PWMx generator provides no output.

One of the reasons that this may happen is incorrect values in FCLCONx register and IOCONx registers. Incorrect or incomplete register initialization commonly occurs when the registers are write-protected MCUs that implement a form of write protection on the said registers. An unlock sequence is required before the registers can be updated.

Writing to FCLCON1 Register Required Unlock Sequence

Writing to IOCON1 Register Required Unlock Sequence

For more information on the unlock sequence, read "Section 14. High-Speed PWM" reference manual.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.