SDAA116 October 2025 CC2340R5
In this BDC motor application, overcurrent protection (OCP) works by continuously monitoring current through ADC sampling of the VSENSE pin of the DRV8251A. The VSENSE pin outputs a voltage signal directly proportional to the current draw of the motor, providing real-time feedback on the electrical load of the motor. The CC2340R5's ADC periodically samples this voltage at one-millisecond intervals during motor operation, converting the analog VSENSE reading to a digital value that represents actual motor current. When this measured current exceeds the predefined ocpThreshold value, the protection mechanism immediately disables both PWM channels, stopping the motor before damage occurs. Possible causes of an overcurrent condition include a stalled motor, mechanical obstruction, or electrical fault. This implementation leverages the integrated current sensing capability of the DRV8251A, eliminating the need for external current sense resistors while providing accurate, responsive protection that safeguards both the motor and the mechanical system during operation in either direction. The implementation features a dedicated callback function that processes ADC samples and triggers the OCP functionality when necessary, which additionally logs the fault condition and increments a fault counter for diagnostic purposes.