Skip to content

Commit b5d1132

Browse files
Merge pull request #15 from jordancormack/master-1
Update bldc_driver_6pwm.md
2 parents 94deb57 + 8b0b260 commit b5d1132

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/simplefoc_library/code/drivers/bldc_driver/bldc_driver_6pwm.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ To create the interface to the BLDC driver you need to specify the 6 `PWM` pin n
3232
// - phB_h, phB_l - B phase pwm pin high/low pair
3333
// - phB_h, phC_l - C phase pwm pin high/low pair
3434
// - enable pin - (optional input)
35-
BLDCDriver6PWM motor = BLDCDriver6PWM(5,6, 9,10, 3,11, 8);
35+
BLDCDriver6PWM driver = BLDCDriver6PWM(5,6, 9,10, 3,11, 8);
3636
```
3737
<blockquote class="warning">
3838
⚠️ 6 PWM configuration is very hardware specific and please make sure to respect certain guidelines in order for it to work properly!
@@ -65,15 +65,15 @@ In hardware 6 PWM mode the user uses only one timer, usually Timer 1 for all the
6565
Where `T1Cx` are the Timer 1 channels and `T1CxN` are their complementary channels (inverted channels). Each pair of `T1Cx` and `T1CxN` is used for one pair of the high/low PWM pins. The library will configure the necessary timers and registers if you provide these pins to the constrictor of the `BLDCDriver6PWM` class. For example:
6666
```cpp
6767
// BLDCDriver6PWM( int phA_h, int phA_l, int phB_h, int phB_l, int phC_h, int phC_l, int en)
68-
BLDCDriver6PWM motor = BLDCDriver6PWM(PA8, PB13, PA9, PB14, PA10, PB15);
68+
BLDCDriver6PWM driver = BLDCDriver6PWM(PA8, PB13, PA9, PB14, PA10, PB15);
6969
```
7070

7171
#### Software 6 PWM mode
7272
If it is not possible to use the hardware 6 PWM mode with your board <span class="simple">Simple<span class="foc">FOC</span>library</span> enables you to use any two channels of any of the timers as your high/low side PWM pair. Basically, the library will automatically configure the complementary channels on the provided low side pins. The only requirement for this code to work properly is exatcly the same as for the Arudino UNO, each phase high/low PWM pair needs to belong to the same timer.
7373
For example, if we take STM32 Nucleo F401RE board we can take for example:
7474
```cpp
7575
// BLDCDriver6PWM( int phA_h, int phA_l, int phB_h, int phB_l, int phC_h, int phC_l, int en)
76-
BLDCDriver6PWM motor = BLDCDriver6PWM(7, 2, 6, 3, 5, 4);
76+
BLDCDriver6PWM driver = BLDCDriver6PWM(7, 2, 6, 3, 5, 4);
7777
```
7878
Where
7979

@@ -84,7 +84,7 @@ Where
8484
On Bluepill we could use:
8585
```cpp
8686
// BLDCDriver6PWM( int phA_h, int phA_l, int phB_h, int phB_l, int phC_h, int phC_l, int en)
87-
BLDCDriver6PWM motor = BLDCDriver6PWM(PA8, PA9, PB6, PB7, PB8, PB9);
87+
BLDCDriver6PWM driver = BLDCDriver6PWM(PA8, PA9, PB6, PB7, PB8, PB9);
8888
```
8989
Where
9090

@@ -247,4 +247,4 @@ void loop() {
247247
// phase A: 3V, phase B: 6V, phase C: 5V
248248
driver.setPwm(3,6,5);
249249
}
250-
```
250+
```

index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Therefore this is an attempt to:
4141
- start, end and separator characters
4242
- decimal places (settable through commander)
4343
- Added machine readable verbose mode in `Commander` [#233](https://github.com/simplefoc/Arduino-FOC/pull/233)
44-
- *Simple**FOC**WebController* - Web based user interface for SimpleFOC by [@geekuillaume](https://github.com/geekuillaume) - [webcontroller.simplefoc.com](webcontroller.simplefoc.com)
44+
- *Simple**FOC**WebController* - Web based user interface for SimpleFOC by [@geekuillaume](https://github.com/geekuillaume) - [webcontroller.simplefoc.com](https://webcontroller.simplefoc.com)
4545
- bugfix - `MagneticSensorPWM` multiple occasions - [#258](https://github.com/simplefoc/Arduino-FOC/pull/258)
4646
- bugfix - current sense align - added offset exchange when exchanging pins
4747
- bugfix - trapezoid 150 fixed
@@ -120,4 +120,4 @@ These are just a few of the alternative FOC supporting projects which provide ha
120120
✔️Simple to use | ✔️ Simple to use | ✔️Simple to use | ❌ Simple to use
121121
❌ Low cost ($100) | ❌ Low cost ($100) | ✔️Low cost ($40) | ✔️ Low cost
122122
❌ Low power (>50A) | ✔️ Low power | ✔️ Low power | ✔️ Low power
123-
❌ Stepper support | ❌ Stepper support | ❌ Stepper support | ❌ Stepper support
123+
❌ Stepper support | ❌ Stepper support | ❌ Stepper support | ❌ Stepper support

0 commit comments

Comments
 (0)