STM32F302R8 with Konrad's inverter boards for senior design.
Fork of Blue_Board_Ticker by
Revision 23:cb38086e8695, committed 2016-04-15
- Comitter:
- vicyap
- Date:
- Fri Apr 15 22:44:53 2016 +0000
- Parent:
- 22:72905102b50d
- Commit message:
- Added note about implementing on a high-side/low-side topology (Konrad's board)
Changed in this revision
MotorLib.cpp | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 72905102b50d -r cb38086e8695 MotorLib.cpp
diff -r 72905102b50d -r cb38086e8695 main.cpp --- a/main.cpp Fri Apr 15 22:23:37 2016 +0000 +++ b/main.cpp Fri Apr 15 22:44:53 2016 +0000 @@ -79,6 +79,21 @@ rpmPrintFlag = 1; } +/* +L6320 + High : Enabled and Pulsing + Low : Enabled not Pulsing + Null : Disabled + +Konrad's Board (6 step) + High : high-side pulsing, low-side off + Low : high-side off, low-side on + Null : high-side off, low-side off + + high-side are PwmOuts + low-side are DigitalOuts +*/ + //original names: CBA CBA, new names: BAC BAC void Output_ANull_BLow_CHigh() //state1, A0 B- C+ { @@ -145,7 +160,7 @@ redLed = !redLed; } -void SixStepNext() +void SixStepNext(int h1, int h2, int h3) { // compute next outputs if (reverse == 0) @@ -201,7 +216,7 @@ prevHallState = currentHallState; spinTickerCounter += 1; // count the number of times spinTicker runs per hall sensor - SixStepNext(); + SixStepNext(h1, h2, h3); toggleRedLed(); }