Default mbed pwm doesn't have enough resolution at high frequencies, thats why I implemented VNH5019 Motor carrier with FastPWM.
Fork of VNH5019 by
Diff: VNH5019.h
- Revision:
- 14:193c422498bf
- Parent:
- 13:414b463160ef
diff -r 414b463160ef -r 193c422498bf VNH5019.h --- a/VNH5019.h Thu Mar 15 20:51:20 2018 +0000 +++ b/VNH5019.h Tue Apr 10 21:30:47 2018 +0000 @@ -91,7 +91,7 @@ { // Scale is 210mV per A // Scale factor is 3.3 / 0.210 = 15.7142 - return CS.read();//*15.7142; + return CS.read()*15.7142; } inline