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

156 commits

Author SHA1 Message Date
Homer
515e55ef0a
Rename FAKE to VIRTUAL (#12493)
* use_fake_xyz to use_virtual_xyz

* xyz_fake to xyz_virtual

* other fake to virtual

* all files fake to vrtual

* last touch on fake to virtual
2023-03-14 12:35:39 +01:00
J Blackman
80e9cfb998
Removing Brushed ESC auto detect (#12479)
- minimise pin "activation" on init.
2023-03-08 20:46:04 +01:00
J Blackman
ee77239db1
Removing Custom Defaults (#12425) 2023-03-02 19:39:44 +01:00
Steve Evans
1ff78c6aac
NEW TARGET: AT32 debug targets, ATSTARTF435 and REVO-AT (#12392)
* Never block use of SWD pins

* Split the AT-START-F435 and REVO-AT configs out from AT32F435/target.h
2023-02-21 13:14:07 +01:00
J Blackman
166ff9c9b3
FIX: Several build issues following configuration changes (#12389)
* FIX: Several build issues following configuration changes

1. RX_SPI pins undefined
2. SDCARD enabled but no utilisation (i.e. no blackbox selected).

* Improved readability (readiness for "black" macro magic)

* Adding Makefile rule to enable CI targets to include Configured targets
2023-02-20 15:17:45 +01:00
J Blackman
3598f3e41a
Remove USE_SWDIO, simply refer to DEBUG (#12361)
Remove USE_SWDIO, simply refer to debug

Command line of `make TARGET=STM32F405 DEBUG=GDB` will trigger this.

Alternative is simply `make TARGET=STM32F405 EXTRA_FLAGS="-DDEBUG"`
2023-02-14 21:37:16 +01:00
J Blackman
19f22f5120
Method for adding defaults using defines for resources. (#12342)
* Method for adding defaults using defines for resources.

* As we will always be using the fullTimerHardware, we just need to configure the pin mapping.

This is done in the config.h as

#define TIMER_PIN_MAPPING   \
    TIMER_PIN_MAP(0, PA0, 1, 0) \
    TIMER_PIN_MAP(0, PA1, 1, 0)

timerHardware[] dependencies to be removed in another PR

* Adding missing pin definitions (removing dependency on timerHardware)

* Typo

* In case MOTOR1_PIN is not defined, but a motor is configured
2023-02-12 04:06:49 +01:00
J Blackman
7b2d114c51
Tidy up of AT (timer defs), and STM specific init defines (#12339)
* Tidy up of AT Timer Definitions
* Removed unnecessary F1 code.
* Remove some STM specific define logic from init.c
* As per renaming suggestion from @klutvott123
2023-02-10 14:01:38 +11:00
Steve Evans
0ac9962bd4
Enable DMA on AT32F435 SPI (#12327) 2023-02-08 20:54:41 +00:00
Dominic Clifton
b3053be4dd
OctoSPI and Memory Mapped Flash support (#11825)
* STM32H730/STM32H750 - Fix use of USE_LP_UART1 instead of USE_LPUART1.

* STM32H723 - Prepare for being able to build for using non-internal-flash
config storage.

* STM32H723 - Prepare for using non-default strings.

* STM32H723 - Disable 'use custom defaults' when using USE_EXST.

* STM32H723 - Disable CUSTOM_DEFAULTS_EXTENDED when EXST is used.

* OCTOSPI - Add initialisation code.

* Add support for RAM_CODE.

* STM32H730 - Add support for RAM_CODE via the .ram_code attribute.

* OCTOSPI - Proof-of-concept for disabling/enabling memory mapped mode on
a running system.

NOTE: The HAL libs are compiled into a memory mapped region, and this cannot be used for OctoSPI access when memory mapped mode is disabled.

* OCTOSPI - Drop HAL support after determining that it's not suitable for
the memory mapped flash use-case.

* OCTOSPI - Sometimes, when disabling memory map mode, the abort fails.
Handle this by disabling the OSPI peripheral first and re-enabling it
afterwards.

* SD/FLASH - Update comments regarding possible solutions to the catch-22
issue with SD/SPI/QUADSPI/OCTOSPI pin configurations.

* OCTOSPI - Use device instance directly.

* OCTOSPI - Prepare W25Q flash driver for octospi support.

* OCTOSPI - Add octospi flash detection.

Note: The method to detect flash chips is similar to the method used for
QUADSPI and as such the code was used as a base. However the initial
OCTOSPI implementation doesn't support the non-memory-mapped use-case so
the un-tested code is gated with `USE_OCTOSPI_EXPERIMENTAL`.

The key differences are:
* uses octospi api not quadspi api.
* flash chip clock speeds should not be changed for memory-mapped flash
chips, bootloader already set it correctly.
* only certain flash chips are capable of memory mapped support.

* W25Q - Ensure w25q128fv_readRegister returns 0 if the receive fails.

* OCTOSPI - Implement octoSpiTransmit1LINE, octoSpiReceive1LINE and
octoSpiReceive4LINES.

* OCTOSPI - Specify device from init.

* OCTOSPI - More fixes and work on init.

Current status is that memory mapped mode is disabled and flash chip is
detected, but w25q128fv_detect should not be calling w25q128fv_reset.

* FLASH - Add comment regarding wasted flash space on targets that only
use one bus type for the flash chip.

* FLASH - Split `detect` into `identify` and `configure`.

* OCTOSPI - Extract flashMemoryMappedModeEnable/Disable to separate
methods.

* FLASH - Reduce size of targets that don't support the use of multiple
flash interfaces.

* Single-flash-chip targets usually only support one type of io
interface.
* Without this, compiler warnings are generated in `flashSpiInit` for
targets that only use flash chip drivers that support quadspi or octospi
that don't even use SPI for flash.

* FLASH - Use MMFLASH_CODE/DATA to conditionally move code/data to RAM.

Only targets compiled to support memory mapped flash chips need the some
specific code in RAM.  Otherwise the code/data should be in the normal
linker section.

* FLASH - W25Q Prepare for memory mapped flash usage.

* Wait/Delay functions must work with interrupts disabled.
* Code used for reading/writing must run from RAM.

* OCTOSPI - Implement remaining required methods.

* OCTOSPI - Fixes for earlier code (not last commit).

* FLASH - W25Q update timeout values from Datasheet Rev L.

* FLASH - Prepare flash driver for use when memory mapped flash is
disabled.

* System - Prepare microsISR for use when memory mapped flash is disabled.

* FLASH - Add support for CONFIG_IN_MEMORY_MAPPED_FLASH.

* Flash - Fix incorrect gating on cli flash commands.

When compiling with USE_FLASH_CHIP and without USE_FLASHFS there were
compiler warnings.

* MMFLASH - Fix release-mode build.

* FLASH - Allow SPI pins to be reconfigured when using CONFIG_IN_MEMORY_MAPPED_FLASH.

MMFLASH only works via QuadSPI/OctoSPI peripherals.

* EXST - Disable the 2GB workaround which is now causing a different
error.

The error we get with 'remove-section' enabled is:

"error in private header data: sorry, cannot handle this file".  The
cause of this new error in the objcopy codebase is an out of memory
condition, somehow the 2GB files and this error are related but the root
cause of both is still unknown.

* OCTOSPI - Add support for STM32H723.

* STM32H723 - Add linker scripts for EXST usage.

* NucleoH723ZG - Add build script to demonstrate OCTOSPI and Memory Mapped
flash support.

* FLASH - WUse the size in bits to set the size of the buffer.

* FLASH - Fix typo in W25N driver defines.

Was using W28N instead of W25N

* OCTOSPI - Fix missing semilcolon when compiling without
USE_FLASH_MEMORY_MAPPED.

* OCTPSPI - Fix missing call to 'memoryMappedModeInit'.

* SPRacingH7RF - Add example build script to allow for testing prior to
unified target / cloud-build support.
2023-02-04 06:24:01 +11:00
J Blackman
74be33dfbc
AT32 development, introduction of AT32F435 target (#12247)
* AT32F435: new target (#12159)
* AT32F435: New target (WIP)
* IO and Timer Updates
* Adding pseudonyms for the STM TypeDef items.
- implementation to follow
* Adding config_streamer support for AT32
* Implementation for IO
* Adding in Peripheral mapping from emsr.
* Warnings cleanup for AT drivers
* Getting things to the linking stage
* Add AT-START-F435 LEDs as default in AT32F435 as a temporary measure to aid bringup
* Remove tabs
* Enable selection of serial port to use for MSP
* Setup defaults for AT-START-F435 to use MSP on UART1
* Fix for most recent 4.5.0 Makefile changes
* Solve for sanity check.
* Add AT32F435 MCU type
* Fix compilation issue with SITL
* Merge conflict resolution
* Minor cleanup
* Adding line feed.

---------

Co-authored-by: Steve Evans <Steve@SCEvans.com>
2023-01-31 11:31:23 +11:00
J Blackman
d96586d505
Missing define to activate TABLE_VIDEO_SYSTEM (#12200)
* Missing define to activate TABLE_VIDEO_SYSTEM
* USE_PWM should only be for RX (parallell RX inputs), USE_PWM_OUTPUT is for all others.
* Updated gate naming so there is less confusion
* Simplified. Note there maybe further occurences.
2023-01-16 15:50:57 +11:00
blckmn
192f2c6cc7 Moved osdDisplayPortDevice_e osdDisplayPortDevice initialisation to within USE_OSD define. 2022-10-29 17:11:20 +11:00
J Blackman
dbd0014ac5
Merge pull request #11911 from KarateBrot/baroRate
Lock altitude task at 100Hz & fix baro calibration
2022-10-25 18:07:26 +11:00
KarateBrot
f17a2af8c3 Lock altitude task to 100Hz
+ fix baro calibration
+ baro refactoring
2022-10-22 21:45:50 +02:00
haslinghuis
d58f2c4a3c
Merge pull request #11909 from blckmn/all_use_config
Removing 'UNIFIED_TARGET'
2022-10-22 21:24:22 +02:00
blckmn
3396013b53 Removing USE_UNIFIED_TARGET... 2022-10-21 10:04:10 +11:00
blckmn
8714bd13f4 Fixes for SITL - adding to the standard list of targets 2022-10-21 08:51:21 +11:00
KarateBrot
ddf1d46549 Remove old style definitions 2022-10-13 03:33:54 +02:00
ctzsnooze
1cd28a5eea refactoring and smoother transition to return, thanks Karatebrot 2022-09-15 15:06:40 +10:00
phobos-
f10413392b VtxDevice over msp 2022-09-07 14:41:36 +02:00
Steve Evans
4f9f26ef1c Remove USE_EXTI, USE_GYRO_EXTI and USE_MPU_DATA_READY_SIGNAL defines 2022-06-17 20:09:24 +01:00
Hans Christian Olaussen
205b8cd2ad Initialize tasks data earlier 2022-04-16 16:01:50 +02:00
Hans Christian Olaussen
cfa78b7b4f Move telemetry displayport init and cms device registering 2021-12-28 23:24:41 +01:00
haslinghuis
8cbd562dca
Merge pull request #11103 from klutvott123/fix-telemetry-displayport-init
Fix telemetry displayport initialisation
2021-12-18 00:16:22 +01:00
Steve Evans
ab1baccc66 Track state execution time for OSD, baro, rx and GPS tasks and inform scheduler of next state execution time 2021-12-17 15:40:01 +00:00
haslinghuis
051cb68fb6
Merge pull request #11122 from SteveCEvans/clracing_flash
Only call sdCardAndFSInit() when SD card is in use
2021-12-15 02:28:18 +01:00
Steve Evans
246a02dcc1 Support SPI MOSI/MISO DMA stream assignment
Add SPI_TX/SPI_RX aliases for SPI_MOSI/SPI_MISO for dma command
Only assign SPI DMA before motors on F4/F7
2021-12-12 16:35:59 +00:00
Steve Evans
9212eedd5c Only call sdCardAndFSInit() when SD card is in use 2021-12-12 14:03:35 +00:00
Hans Christian Olaussen
46b69260a2 Fix telemetry displayport initialisation 2021-12-05 19:17:08 +01:00
Michael Keller
8730a8efea Fixed SPI SD card support on H7 targets with SDIO support enabled. 2021-10-03 17:39:23 +13:00
Michael Keller
d5631e448e
Merge pull request #10950 from mikeller/fix_bus_switch 2021-09-28 02:24:16 +13:00
Michael Keller
da0377faf4 Cleanup of the bus switch functionality. 2021-09-07 10:28:02 +12:00
Michael Keller
54588cf7dd Removed softserial loopback. 2021-09-07 10:23:10 +12:00
Dominic Clifton
49869fa2bb Debug - Initialise debug pins on startup, not as part of the dshot
bitbang code.
2021-08-18 15:37:54 +02:00
Steve Evans
87c8847c13 New SPI API supporting DMA
Call targetConfiguration() once before config is loaded and again afterwards in case the config needs to be changed to load from SD card etc

Drop SPI clock during binding

Remove debug

Add per device SPI DMA enable

Fix sdioPinConfigure() declaration warning

Reduce clock speed during SPI RX initialisation
2021-07-25 12:40:25 +12:00
Dominic Clifton
e0f2b89828 Indicate failure when CONFIG_IN_SDCARD is used and no SD card is
inserted.
2021-05-08 14:20:29 +02:00
mikeller
b53b2fe76c Made the displayport initialisation consistent for all telemetry protocols. 2021-02-14 16:44:52 +13:00
Steve Evans
31b06cd7d2 Add USB MSC support for H7 2020-10-30 19:30:38 +00:00
mikeller
1a6514cd9b Refactored mixer / servo init. 2020-10-15 07:45:46 +13:00
mikeller
e4b3a1f2e5 Moved mixer profile initialisation to after pid initialisation. 2020-10-11 23:54:26 +13:00
jflyper
08f1f91c50 [G4] CLI and config changes for overclocking 2020-10-01 20:40:44 +09:00
Michael Keller
94cd650472
Merge pull request #9981 from mikeller/fix_max7456_delay_problems
Fixed the MAX7456 loop time problems introduced by #9948.
2020-07-26 15:31:16 +12:00
Michael Keller
5d591e3162
Merge pull request #9985 from mikeller/fix_osd_feature_disabling
Fixed disabling of OSD feature when OSD is disabled.
2020-07-08 00:57:26 +12:00
mikeller
1a30329c93 Fixed disabling of OSD feature when OSD is disabled. 2020-07-07 00:29:18 +12:00
mikeller
15d1df3c77 Removed DTerm RPM filter. 2020-07-06 19:33:06 +12:00
mikeller
cfc89c98a8 Fixed the MAX7456 loop time problems introduced by #9948. 2020-07-05 22:00:13 +12:00
Michael Keller
e96e63e252
Merge pull request #9963 from mikeller/remove_unused_header
Removed unused 'io/motors.h' header file.
2020-06-30 23:19:56 +12:00
Michael Keller
c1dc66b452
Merge pull request #9936 from mikeller/cleanup_rangefinder_support
Cleaned up rangefinder code, removed unsupported driver stubs.
2020-06-29 23:16:20 +12:00
mikeller
5b58c300b6 Removed unused 'io/motors.h' header file. 2020-06-29 18:49:06 +12:00