Skip to content

Start mspider fork#3

Open
bbeschea wants to merge 51 commits into
leon927:masterfrom
bbeschea:startMspiderFork
Open

Start mspider fork#3
bbeschea wants to merge 51 commits into
leon927:masterfrom
bbeschea:startMspiderFork

Conversation

@bbeschea
Copy link
Copy Markdown

No description provided.

leon927 and others added 30 commits August 28, 2019 14:36
(ui8_tx_buffer[6])
- Removed Human Power (ui8_tx_buffer[23-24]: could be calculated from
torque and cadence fields)
This reverts commit 52245ca.
This reverts commit 087dead.
Changes:
- Uart TX interrupt
- Better ADC conversion accuracy (CLK/3)
- Small motor.c optimization (some time wasted waiting ADC conversion)
- Removed LCD3 code
bogdan.beschea 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
- Changed PWM frequency to 18KHz
- ebike_app math operations optimizations
- configurable motor inductance
- PWM frequency set to 18KHz (#ifdef for 20KHz)
- decreased BATTERY_CURRENT_PER_10_BIT_ADC_STEP_X100 from 17 to 16
- 20KHz PWM frequency
- Added Field Weakening
SW speed optimization done.
Ready to implement improved rotor position detection.
… less power losses.

- 40KHz TIM1 Interrupt rate -> max HAL sensor detection offset 25us
- Rotor speed calculated two times each Electrical Revolution
v7
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants