Start mspider fork#3
Open
bbeschea wants to merge 51 commits into
Open
Conversation
added 21 commits
January 26, 2021 17:26
- Code refactoring: Created Eclipse project - New Torque Sensor offset calibration procedure (solved original FW issues)
- Fix backward resistence if using cadence sensor advanced mode
- New Cadence calculation algorithm (much faster detection start/stop detection) - Code clean-up - Removed advanced cadence mode & calibration - Removed EEPROM storage - Removed unused brake IRQ - Added default values to struct_configuration_variables - some minor motor.c optimizations - removed various unused functions/variables
- Four times faster ebike control loop (ebike_app_controller() called every 25ms) - Various code refactoring
The original firmware used the previous buffered value insted of the actual converted value. The value now is read correctly from ADC1->DRH and ADC1->DRL registers.
- Max IRQ duration from 630 CPU cycles (39us) to 452 CPU cycles (30us) - removed eeprom.c/h files - added TIM1 IRQ timing debug code
- configurable motor inductance - PWM frequency set to 18KHz (#ifdef for 20KHz) - decreased BATTERY_CURRENT_PER_10_BIT_ADC_STEP_X100 from 17 to 16
… less power losses. - 40KHz TIM1 Interrupt rate -> max HAL sensor detection offset 25us - Rotor speed calculated two times each Electrical Revolution
- TIM1 PWM Freq to 19KHz - Better rotor interpolation: + Double TIM1 IRQ rate + Hal sensor detection running at 38KHz - Updated motor svm_table according to TIM1 PWM freqency and to upper bound of TIM1 counter - Motor ref speed calculated two times every electr. revol. - Battery current sampled in the middle of PWM duty cycle (counter = 0) - Max Field Weakening angle calculated based on motor speed - Higher Power Assist multiplier resolution (2% insted of 10%) - ADC Freq. = CPU Freq/3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.