mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
STM32F30x - Working parallel PWM. Timer IRQ handle was not defined for
TIM8 correctly. Software serial conficted with parallel PWM input. Fixed crash due to incorrect timerConfig index calculation code. The crash occurred when capture compare interrupt handlers attempted to call an invalid callback. Note: the crash does not affect existing baseflight code since the formula is OK when using a 2 dimensional array with equal dimensions. Formula details here: https://docs.google.com/spreadsheets/d/1UuxnC0VKiprvt1wt3KXffefEWJUb_-ILFLQuP377Anw
This commit is contained in:
parent
fbe2f82c05
commit
92bed4a33d
10 changed files with 82 additions and 82 deletions
|
@ -49,6 +49,7 @@ extern uint32_t previousTime;
|
|||
|
||||
failsafe_t *failsafe;
|
||||
|
||||
void timerInit(void);
|
||||
void initTelemetry(serialPorts_t *serialPorts);
|
||||
void serialInit(serialConfig_t *initialSerialConfig);
|
||||
failsafe_t* failsafeInit(rxConfig_t *intialRxConfig);
|
||||
|
@ -97,7 +98,7 @@ int main(void)
|
|||
else
|
||||
pwm_params.airplane = false;
|
||||
pwm_params.useUART = feature(FEATURE_GPS) || feature(FEATURE_SERIALRX); // serial rx support uses UART too
|
||||
pwm_params.useSoftSerial = feature(FEATURE_SOFTSERIAL);
|
||||
pwm_params.useSoftSerial = canSoftwareSerialBeUsed();
|
||||
pwm_params.usePPM = feature(FEATURE_PPM);
|
||||
pwm_params.enableInput = !feature(FEATURE_SERIALRX); // disable inputs if using spektrum
|
||||
pwm_params.useServos = isMixerUsingServos();
|
||||
|
@ -126,6 +127,7 @@ int main(void)
|
|||
|
||||
failsafe = failsafeInit(&masterConfig.rxConfig);
|
||||
buzzerInit(failsafe);
|
||||
timerInit();
|
||||
pwmInit(&pwm_params, failsafe);
|
||||
|
||||
rxInit(&masterConfig.rxConfig, failsafe);
|
||||
|
@ -171,7 +173,7 @@ int main(void)
|
|||
serialInit(&masterConfig.serialConfig);
|
||||
|
||||
#ifndef FY90Q
|
||||
if (feature(FEATURE_SOFTSERIAL)) {
|
||||
if (canSoftwareSerialBeUsed()) {
|
||||
//mcfg.softserial_baudrate = 19200; // Uncomment to override config value
|
||||
|
||||
setupSoftSerialPrimary(masterConfig.serialConfig.softserial_baudrate, masterConfig.serialConfig.softserial_1_inverted);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue