z_archive: Testground - bird-sanctuary/bluejay GitHub Wiki
| PWM | Period | Bit | Steps | Time / step | Mapping factor | rcpulse / step |
|---|---|---|---|---|---|---|
| 24kHz | 41666.67ns | 10 | 2^10 = 1024 | 40.7ns | 1024 / 2000 = 0.512 | 1.95 |
| 48kHz | 20833.32ns | 9 | 2^9 = 512 | 40.7ns | 512 / 2000 = 0.256 | 3.9 |
| 96kHz | 10416.67ns | 8 | 2^8 = 256 | 40.7ns | 256 / 2000 = 0.128 | 7.8 |
The lower the PWM frequency the more steps we have to properly map the rcpulse value. rcpulse has 2000 possible values 0-1999 after normalization (converting from actual DSHOT value). As you can see from the above table, the time / step is constant when PWM frequency is set in relation to steps.