Skip to content

Commit 58f9ae3

Browse files
authored
remove typos, improve style
1 parent a5f7d66 commit 58f9ae3

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

docs/simplefoc_library/practical/choosing_pins.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ toc: true
1212

1313
# A short guide to choosing PWM pins for your application
1414

15-
When it comes to choosing pins for your application, there are a few things to consider. The most important thing is to make sure that the pins you choose are compatible with the hardware you are using.
15+
When choosing pins for your application, there are a few things to consider. The most important thing is to make sure that the pins you choose are compatible with the hardware you are using.
1616
Make sure to check that your microcontroller family and SimpleFOC supports the necessary PWM generation, position sensor and current sensing technique. You can find this info in our docs [here](microcontrollers).
1717

18-
Once you are sure that you microcontroller is apt to the application, it is time to consider which pins to use. There are three main questions:
18+
After choosing an appropriate microcontroller, it is time to consider which pins to use. There are three main questions:
1919
1. Which pins to use for PWM generation?
2020
2. Which pins to use for the position sensor?
2121
3. Which pins to use for current sensing?
2222

23-
In this guide we will focus on the first question: **Which pins to use for PWM generation?**
23+
In this guide, we will focus on the first question: **Which pins to use for PWM generation?**
2424

2525
The answer to these questions depends on the microcontroller you are using and the hardware you have. Here is the list of microcontroller families supported by SimpleFOC and the PWM generation modes supported by each of them:
2626

@@ -40,17 +40,17 @@ Portenta H7 | ✔️ | ✔️ | ✔️ | ❌ | ✔️ | ❌ | ❌
4040
nRF52 |✔️ | ✔️ | ✔️ | ✔️ | ✔️| ❌ (2/3/4PWM) <br> ✔️ (6PWM) |❌
4141
Renesas (UNO R4 Minima) | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ❌ (2/3/4PWM) <br> ✔️ (6PWM) | ❌
4242

43-
What is important to see is that all the supported families can be used with 2/3/4PWM modes. However, not all the architectures support 6PWM mode. Additionally, the PWM frequency can be configured for all the supported architectures, but for Arduino AVR boards, the frequency can be set to either 4kHz or 32kHz.
43+
Importantly, all supported families can be used with 2/3/4PWM modes. However, not all architectures support 6PWM mode. Additionally, the PWM frequency can be configured for all supported architectures, except Arduino AVR boards - the frequency can be set to either 4kHz or 32kHz.
4444

45-
Another important factor when it comes to choosing the PWM pins is to try to use the PWM pins that belong to the same timer. This is important because the PWM signals generated by the pins that belong to the same timer will have the same frequency and phase. This is important for the FOC algorithm to work properly.
45+
Another important factor when choosing PWM pins is to attempt to use PWM pins that all belong to the same timer. This is important because the PWM signals generated by pins belonging to the same timer will have the same frequency and phase. This is important for the FOC algorithm to work properly.
4646
The rule of thumb:
4747
- For 2PWM mode, try using only one timer.
4848
- For 3PWM mode, try using only one timer.
49-
- For 4PWM mode, try using only one timer if possible, if not use one timer per phase (so two timers).
50-
- For 6PWM mode, try using only one timer if possible, if not use one timer per phase (so three timers).
49+
- For 4PWM mode, try using only one timer if possible, else, use one timer per phase (so two timers).
50+
- For 6PWM mode, try using only one timer if possible, else, use one timer per phase (so three timers).
5151

5252
<blockquote class="info" markdown="1"><p class="heading">BEWARE: PWM center alignment</p>
53-
SimpleFOC does synchronise (center-align) the PWM signals generated by different timers in some cases (as shown on the table above), but it is always better to use the pins that belong to the same timer.
53+
SimpleFOC does synchronise (center-align) the PWM signals generated by different timers in some cases (as shown in the table above), but it is always better to use pins belonging to the same timer.
5454
</blockquote>
5555

5656
<blockquote class="info" markdown="1"> <p class="heading">BEWARE: Timer-ADC sync - low-side current sensing</p>
@@ -155,7 +155,7 @@ ESP32-C6|6
155155
ESP32-H2|6 (no arduino support yet)
156156
ESP32-P4|8 (no arduino support yet) -->
157157

158-
If the user wants to force using the `LEDC` driver for the boards that support `MCPRM` he has to set the `SIMPLEFOC_ESP32_USELEDC`.
158+
If the user wants to force using the `LEDC` driver for the boards that support `MCPRM`, they must set `SIMPLEFOC_ESP32_USELEDC`.
159159

160160
## STM32 boards
161161

@@ -167,9 +167,9 @@ Stm32 is the most powerful family of microcontrollers supported by SimpleFOC, at
167167

168168
When it comes to 6PWM mode, the user has two choices:
169169
1. Use the pins that belong to the same timer.
170-
This is the recommended as all stm32 boards have timers typically `TIM1` and `TIM8` that are desigened for this applications and allow for the best performance.
170+
This is the recommended solution, as all stm32 boards have timers, typically `TIM1` and `TIM8`, that are designed for these applications and allow for the best performance.
171171
2. Use one timer per phase.
172-
This is also a goof solution, especially if the pins necessary to use the advanced timers are not available. However, in this case the application uses 2 or 3 timers instead of 1 which might reduce the capacity of the microcontroller to do other tasks in parallel.
172+
This is also a good solution, especially if the pins necessary to use the advanced timers are not available. However, in this case, the application uses 2 or 3 timers instead of 1, which might reduce the microcontroller's capacity to perform other tasks in parallel.
173173

174174
Once you provide the SimpleFOC driver object with a set of pins, the library will automatically associate the pins with the appropriate timers and channels and find the best combination for motor control. If the pins are not compatible with the motor control mode you are trying to use, the library will throw as error.
175175

0 commit comments

Comments
 (0)