1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 04:45:24 +03:00
Commit graph

169 commits

Author SHA1 Message Date
J Blackman
72ab5b1275
Re-arranging VCP/IO/EXTI files in preparation for AT32 (#12289)
* Re-arranging VCP files in preparation for AT32

* Tab size 4

* Adding ADC driver for AT32F43x

* RCC code here is STM32 specific.

* Adding rcc.c for AT32

* pwm_output.c has very specific MCU coupling - to be re factored.

* Separating exti.c

* Split up io.c int stm32/io_stm32.c and at32/io_at32.c

* Adding in VCP files for AT32 and move timer

- note will require more cleanup

* Solving for sanity checks

* Inadvertent inclusion of timer.c for HAL

* rcc.c, timer.c and moving other spevific files out of the driver directory

* Adding I2C drivers

* Formatting

* ws2811 driver and usb_msc driver skeleton
2023-02-06 05:15:56 +01:00
Steve Evans
701b0ae55c Remove F1 and F3 support 2022-06-14 19:10:13 +01:00
Sam Lane
4c99ad743d Rename FAST_RAM to FAST_DATA 2020-08-23 08:49:26 +01:00
limonspb
464919c416 Motor output reordering for CLI and MSP
Fixed some code formatting

+fixReorderingArray() for EEPROM load/save and renamings

fix brace new line

moving MOTOR_OUTPUT_REORDERING to MSP2 betaflight specific

validateAndfixConfig now resets reordering motor array to default in case it is invalid
2020-07-27 20:10:37 -05:00
jflyper
adf6fd1764 DMA bit banging Dshot, first cut
F405 working (OMNIBUSF4SD target)
F411 not tested
F722 working, needs testing (OMNINXT7 target)
F74x not working

NOX target (temporary)

bb_dshot with telemetry on f4
bbshot f7 targets and fix crash due to missing debug pins

remove empty line

add empty lines

remove OMNIBUSF4 specific debug pins

add missing comma

add missing comma

Use separate bbTimerHardware array to fix unified targets

eliminate now unneeded timerGetByUsage

don't duplicate timer1 def

Add auto mode, rename dshot_bbshot to dshot_bitbang

remove newline

renamve various files

various changes to address feedback

address feedback

address feedback

add pacer timers to timer show

don't disable telemetry if dshot_bitbang is on or auto

Address feedback, add faster decode implementation based on bit banding, modify dma parameters to reduce required memory bandwidth on half

remove debug output

remove NOINLINE

Protect gpio direction change with critical sections

FIXWS_SAVE_INDEX

add static back in

no forward typedef

address review feedback

disallow proshot1000 with dshot bitbang

Extracted and plumbed up 'dbgPin'.
2019-09-04 16:06:48 +12:00
jflyper
11994e6ab8 Isolate MSP_MOTOR from pwm_output (pwmGetMotors) 2019-08-14 23:50:13 +09:00
mikeller
768b345166 Added resource index display. 2019-08-08 11:49:51 +12:00
mikeller
6a0c5836de Added 'timer show' command to CLI. 2019-08-06 23:56:54 +12:00
jflyper
542146c702 Motor code refactor (Phase 1) 2019-07-17 01:33:39 +09:00
Dominic Clifton
1f2ef98042 Fix compilation when USE_DSHOT and USE_PWM_OUTPUT are not defined.
Fix compilation when USE_DMA and USE_DMA_SPEC are not defined.

Cleanup calling code of `isMotorProtocolDshot`.

Fix 'unused' warning when USE_PWM_OUTPUT is not defined.

Undo isMotoroProtocolDshot change.

Disable USE_SERIAL_4WAY_BLHELI_INTERFACE when USE_PWM_OUTPUT is not
enabled.

Style cleanup.
2019-07-03 08:36:12 +12:00
jflyper
0e63596abd Move motorConfig_s, motorDevConfig_s and associated PG handling into pg/motor.[ch] 2019-06-29 20:03:54 +09:00
jflyper
3a7edd1e3a [H7] Enable motor
- Initial cut without Dshot

- Enable HAL-based DShot (no burst yet)

- Burst Dshot First working version

- Non-stop PWM refactor

- Conditionalize HAL structures inside motorTimerDma_s
2019-05-08 02:58:26 +09:00
Michael Keller
d9382ad012
Add new basic feature conditionals (#8175)
Add new basic feature conditionals
2019-05-06 19:07:11 +12:00
jflyper
45b7fa8095 Add and handle USE_PWM_OUTPUT 2019-05-05 18:05:13 +09:00
jflyper
896b915838 Add conditional for useDshotTelemetry 2019-05-04 23:57:15 +09:00
Thorsten Laux
4a7be33c25 invert dshot 2019-05-02 14:18:19 +02:00
Bruce Luckcuck
e2b5fc24bd Refactor dshot command output scheduling logic
Change to a state machine that tracks the progress of each dshot command in the queue as it moves through the various phases. Simplifies the code to make it easier to understand and maintain.

Transition to timing based on motor output cycle counts calculated from desired delays instead of using direct time comparisons. Since the output timing is always based on the motor update schedule, there were cases where if the time between motor updates was a significant percentage of the desired dshot command timing, then the output could get irregular and skip cycles (for example trying to use 2K pid loop with 500us timing conflicting with 1ms timing between dshot command outputs).
2019-04-08 08:19:38 -04:00
Bruce Luckcuck
27e4dddeef Fix erroneous dshot motor frame between multiple queued dshot commands
In the case of multiple queued non-blocking dshot commands, a single motor command frame would get erroneously sent in the idle time between the commands when arming. This change contains some workarounds to prevent this behavior.
2019-04-06 20:40:53 -04:00
Bruce Luckcuck
4c274bd06a Fix F1 compile errors 2019-03-30 18:56:54 -04:00
mikeller
9e50bae9ef Fixed PWM beeper. 2019-03-29 01:44:23 +13:00
Thorsten Laux
5a759c56ef avoid dshot telemetry collisions
actually use calculated deadtime

fix whitespace and return value

fix ws

Address review feedback

fix ws
2019-03-26 21:51:25 +13:00
Bruce Luckcuck
9622b83278 DSHOT command non-blocking motor selection fix
Fixes a logic error that would send non-blocking DSHOT commands to all motors regardless of the selected motor index.
2019-03-17 17:01:44 -04:00
Thorsten Laux
7859e6d540 Add dshot command queue and limit max notch filter frequency 2019-01-12 12:25:30 +01:00
Thorsten Laux
816da6cbf5 Dshot erpm telemetry on the signal line 2019-01-03 14:42:52 +01:00
jflyper
5d7f6b6c3d Initialize timers assigned to servos appropriately 2018-09-02 01:02:26 +09:00
mikeller
f067324844 Fixed extra repeat. 2018-06-17 03:07:10 +12:00
mikeller
7f107e2d9b Added updating of scheduled command time when motors become idle. 2018-06-17 01:45:10 +12:00
mikeller
d49948f1fd Stop Dshot commands from running when ESCs not disarmed. 2018-06-17 00:37:57 +12:00
Michael Keller
1aa78531f7 Fixes from review. 2018-06-14 12:24:30 +12:00
mikeller
906a4bcb78 Fixed Dshot command check on non-F7. 2018-06-14 01:46:24 +12:00
mikeller
51763a40f9 Made Dshot commands work in a non-blocking way. 2018-06-01 21:56:11 +12:00
Bryce Johnson
0045b36320 Added blocked dshot commands, Added post command delay
Moved the dshotcommand to happen in pwm_output_dshot.
Simplified the timing and repeats to happen on a group basis instead works better for dshotburst
2018-06-01 21:56:11 +12:00
Andrey Mironov
d8dd6f29f8 Set FAST_RAM to go into .fastram_data by default. Added FAST_RAM_NOINIT 2018-05-23 14:40:33 +03:00
blckmn
aad6efdf03 Timer clean up in preparation for configurable timers 2018-05-06 06:55:17 +10:00
blckmn
a9f74cd6df Removed excess trailing spaces before new lines on licenses. 2018-04-25 20:58:00 +10:00
jflyper
e87d14fe46 White space tidy & add braces 2018-04-24 08:11:27 +09:00
jflyper
37cd0404e5 Prevent channel.ccr to be deferenced if timer failed to initialize 2018-04-24 07:42:46 +09:00
blckmn
46fe22b4bd Direct license replacement 2018-04-22 09:22:46 +10:00
Andrey Mironov
bf984f39b1 F7 optimizations (#5674)
* Revert "Revert "Rewritten F7 dshot to LL (draft)" (#5430)"

This reverts commit aa42a69d2f.

* Reworked F7 linker scripts to maximize performance of both F74x and F72x

* Some comments and changes from original F7 HAL DSHOT

* Prohibit inlining of some functions to place them in ITCM-RAM

* Fixed usartTargetConfigure implicit declaration

* Moved back to SRAM1 as main RAM

* Added SRAM2 attribute

* Fixed LL DSHOT FOR SPRF7DUAL and probably other adv TIM users

* Fixed SPRF7DUAL rev. A motor order

* Enabled CCM for data on F40x

* Fixed F7 startup assembly symbols

* Fixed KISSFCV2F7 linker script

* Added a quick way of building F7 targets only

* Got rid of the useless F7 target script

* Added NOINLINE and got rid of useless __APPLE__ define

* Added some important functions to ITCM

* Added NOINLINE macro for tests

* Copy to ITCM before passing execution into it

* Minimized cache footprint of motor output code

* Evicted low-impact functions from ITCM

* Switched MATEKF722 and SPRACINGF7DUAL to burst DSHOT

* Switched CLRACINGF7 to burst DSHOT

* Moved UART RX&TX buffers to DTCM-RAM to avoid cache incoherency

* Marked taskMainPidLoop for ITCM-RAM, disallowed inlining per-function

* Revert "Added a quick way of building F7 targets only"

This reverts commit 2294518998.
2018-04-20 08:37:32 +12:00
jflyper
416495e17a Convert BEEPER to USE_ scheme (#5433) 2018-03-11 09:28:08 +13:00
Michael Keller
9bcc6aca8e
Revert "BEEPER Conversion to use USE_ scheme" (#5368) 2018-03-04 09:40:17 +13:00
jflyper
bf11921dc0
Merge pull request #5285 from jflyper/bfdev-convert-beeper-to-USE_-scheme
BEEPER Conversion to use USE_ scheme
2018-03-03 23:22:56 +09:00
jflyper
ea0db878bf Convert to USE_ scheme 2018-03-02 22:29:40 +09:00
Bruce Luckcuck
ecc0125672 Fix compilation error for F1 targets 2018-02-25 15:59:11 -05:00
jflyper
1bc2e756f5 Do full IOConfigGPIOAF instead of IOConfigGPIO 2018-02-15 03:40:11 +09:00
jflyper
9475988218 Make burst and non-burst runtime configurable 2018-02-11 23:24:07 +09:00
Martin Budden
3747d6742b Whitespace tidy 2018-01-10 16:56:54 +00:00
jflyper
9f04705130 Use striding loadDmaBuffer to avoid buffer copy 2017-12-26 18:17:32 +09:00
jflyper
446606d9e6 Consolidate IOInit calls 2017-12-23 18:24:40 +09:00
Michael Keller
7ddf1e856d
Merge pull request #3996 from jflyper/bfdev-fix-motor-nchannel
Fix Motor N-Channel handling (Non-F7)
2017-11-07 07:58:37 +13:00