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

60 commits

Author SHA1 Message Date
Dominic Clifton
ea58885441 MSC - Fix MSC on H7. Commit 9629f96676
broke MSC.

Details on https://github.com/betaflight/betaflight/pull/10747
2022-08-21 16:46:48 +02:00
Steve Evans
cf3615938b Remove superfluous double ; 2022-07-24 14:49:35 +01:00
Dominic Clifton
115a584713 HAL - Fix issues with HAL USB timeouts on fast processors.
* Occurs more frequently on >=480Mhz CPUs.
* Occurs more frequently on RELEASE builds due to optimizations.

Patch comes from here:

https://community.st.com/s/question/0D50X0000BCMFx0SQH/usbhs-ulpi-on-stm32h750

Confirmed fixed on H730 @ 520Mhz RELEASE build.
2021-12-23 12:36:02 +01:00
Dominic Clifton
91483d2e8e STM32H7 - SDMMC Fix the short busy loop being compiled out by newer
versions of GCC.

STM32H7 - Don't go into an infinite loop if an SDIO read fails.

STM32H7 - Generate compiliation error for non-8Mhz crystals when SDCARD
via SDIO is used.  Prevents accidental overclocking of hardware.

Avoid double-init of SD card when CONFIG_IN_SDCARD is used.

Note: There's no SD_DeInit() function.

STM32H7 - Fix MSC SD initialisation when using USE_DMA_SPEC.
2021-09-10 02:28:29 +12:00
Steve Evans
f39467c396 Use static definition for ClassData to support USB MSC DMA on G4 2021-08-30 12:54:04 +01:00
Steve Evans
9629f96676 New memory section types for DMA 2021-05-17 23:36:04 +01:00
Steve Evans
823d0edf99 [H7][LIB] Remove duplicate definition of assert_param from LL spi 2021-04-03 14:03:54 +01:00
Steve Evans
f71bb41166 Fix H7 USB MSC support to use same structure naming as F7, and to ensure that data buffers are cache aligned so that USB, SD card and QSPI DMAs function correctly 2020-10-08 21:08:10 +01:00
jflyper
f2810551e7 [H7][LIB][SDMMC] Workaround for SDMMC Errata 2.11.4
Application of

STM32H750 - Apply workaround to the SDMMC Errata 2.11.4 (8446832)

to V1.6.0
2020-09-14 11:09:37 +09:00
jflyper
0397a1618a [H7][LIB][USB] Middlewares change: Fix memory corruption
Application of
[H7] USB LIB Middlewares change: Avoid null hhid from being deferenced
to V1.6.0
2020-09-14 11:09:37 +09:00
jflyper
fd11348dce [H7][LIB][USB] Modify USB Library for composite device
Includes changes from 4e487f6
2020-09-14 11:09:21 +09:00
jflyper
c3f2632405 [H7][LIB] Remove duplicate definition of assert_param from LL dma & Tim 2020-09-14 11:07:25 +09:00
jflyper
5b75338aff [H7][LIB] Revert some function in stm32h7xx_hal_tim.h to global
TIM_DMADelayPulseCplt (HAL_TIM_DMADelayPulseCplt) was changed to static
in 1.7 or 1.8, but this will cause timer_hal.c which uses
HAL_TIM_DMADelayPulseCplt not to build.
2020-09-14 11:07:25 +09:00
jflyper
c4fbe44e28 [H7][LIB] Take care of UNUSED parameters in V1.8.0 2020-09-14 11:07:25 +09:00
jflyper
2b16f050ab [H7][LIB] Modify HAL SPI driver for const-ness 2020-09-14 11:07:25 +09:00
jflyper
a88bc07769 [H7][LIB][USB] usbd_def: disable insane defs of MIN and MAX 2020-09-14 11:07:25 +09:00
jflyper
8d74d61b70 [H7][LIB][USB] Import "Middleware" from V1.8.0 distribution 2020-09-14 11:07:24 +09:00
jflyper
b1172b9cd2 [H7][LIB] Import FW V1.8.0 library 2020-09-14 11:07:24 +09:00
jflyper
35cdd784fa [H7][LIB] Remove V1.6.0 FW library 2020-09-14 11:07:16 +09:00
Davor Kustec
3c6a37007d Fixes from review + new PR 2020-08-31 16:40:38 +02:00
jflyper
c08b321dee [H7][LIB][SDMMC] Workaround for SDMMC Errata 2.11.4
Application of

STM32H750 - Apply workaround to the SDMMC Errata 2.11.4 (8446832)

to V1.6.0
2020-02-08 12:38:57 +09:00
jflyper
172ce0fc2c [H7][LIB][USB] Middlewares change: Fix memory corruption
Application of
[H7] USB LIB Middlewares change: Avoid null hhid from being deferenced
to V1.6.0
2020-02-08 12:38:57 +09:00
jflyper
79fa75b2b2 [H7][LIB][USB] Modify USB Library for composite device 2020-02-08 12:38:57 +09:00
jflyper
6725595f37 [H7][LIB] Remove duplicate definition of assert_param from LL dma & Tim 2020-02-08 12:38:57 +09:00
jflyper
3a42a373bd [H7][LIB] Take care of UNUSED parameters in V1.6.0 2020-02-08 12:38:57 +09:00
jflyper
6d486f0566 [H7][LIB] Modify HAL SPI driver for const-ness 2020-02-08 12:38:57 +09:00
jflyper
a4519df277 [H7][LIB][USB] usbd_def: disable insane defs of MIN and MAX 2020-02-08 12:38:56 +09:00
jflyper
b49f9e1f59 [H7][LIB][USB] Import "Middleware" from V1.6.0 distribution 2020-02-08 12:38:45 +09:00
jflyper
6f293d01d4 [H7][LIB] Import FW V1.6.0 library
Removed MiddleWares
2020-02-08 12:30:23 +09:00
jflyper
6e8a03bf64 [H7][LIB] Remove V1.4.0 FW library 2020-02-08 04:50:25 +09:00
mikeller
c1e31617b1 Fixed the 'attribute' warning in H7 libraries. 2019-11-27 20:01:13 +13:00
jflyper
9ed7ceb47c Register changes fired by modified EOL code for html files 2019-10-03 03:18:37 +09:00
mikeller
865713460e Remove overshoot in warning suppression introduced in #8713. 2019-08-18 08:43:15 +12:00
Dominic Clifton
064b578d43
Merge pull request #8713 from jflyper/bfdev-h7-fix-ll-for-size-sensitive-spi-reg
[H7][LIB] Suppress warnings on type-punned pointers (LL-SPI)
2019-08-16 18:30:00 +02:00
jflyper
880a5d6b55 [H7][LIB] Supress strict aliasing rule warnings on deferencing type-punned pointers 2019-08-16 00:24:08 +09:00
jflyper
1d44de3d42 [H7][LIB] Remove duplicate definition of assert_param from LL dma and Tim 2019-08-12 11:25:34 +09:00
jflyper
6fbc0f44ca [H7][LIB][SPI] Use union to access size sensitive SPI data register
Application of

Use union to access access size sensitive registers (7a0d3e7)

to V1.4.0

----
Note from "Use union to access access size sensitive registers (7a0d3e7)":
----

Use union to access access size sensitive registers

As described in RM0433 section 49.4.13 "Data packing", STM32H7's SPI data register supports data packing and it is sensitive to actual access width.

The original code used pointer casting to obtain a code to access the register in a desired size.
However, these operation results in strict aliasing warnings (deferencing punned pointer) and are not desirable.

Here, we declare a union that allow access to a 32-bit register in 8, 16 or 32-bit width and cast pointer to the original RXDR and TXDR data registers and then access the portion of the register through an appropriate union member.

XXX FIXME Only handled 16-bit access case, as 32-bit (original declaration) and 8-bit (allowed) cases do not generate warnings, but these should be handled similarly for correctness and consistency of the code.
2019-07-08 09:36:04 +09:00
jflyper
8bbc1456f3 [H7][LIB][USB] Middlewares change: Fix memory corruption
Application of
[H7] USB LIB Middlewares change: Avoid null hhid from being deferenced
to V1.4.0
2019-07-08 09:36:04 +09:00
jflyper
c6321190a9 [H7][LIB][USB] Modify USB Library for composite device
Application of

[H7] Modify USB Middleware library for composite device support #8235 (1861c6d)

to V1.4.0
2019-07-08 09:30:55 +09:00
jflyper
d924e59c3c [H7][LIB][SDMMC] Workaround for SDMMC Errata 2.11.4
Application of

STM32H750 - Apply workaround to the SDMMC Errata 2.11.4 (8446832)

to V1.4.0
2019-07-08 09:30:55 +09:00
jflyper
41f7c0c5fd [H7][LIB][SD] Fix for H750 Errata 2.11.5.
Application of

STM32H750 - Fix for H750 Errata 2.11.5. (adcf556)

to V1.4.0
2019-07-08 09:30:55 +09:00
jflyper
125e0887b5 [H7][LIB] Take care of UNUSED parameters in V1.4.0 2019-07-08 09:30:54 +09:00
jflyper
49ee02a707 [H7][LIB] Modify HAL SPI driver for const-ness to match call from current bus_spi driver 2019-07-08 09:30:54 +09:00
jflyper
42c9475203 [H7][LIB][USB] usbd_def: disable insane defs of MIN and MAX 2019-07-08 09:30:54 +09:00
jflyper
0c7bc10bd0 [H7][LIB][CMSIS] Handle FLASH_SIZE def collision with Betaflight 2019-07-08 09:30:40 +09:00
jflyper
2f911c1163 [H7][LIB] Import V1.4.0 library 2019-07-05 00:09:01 +09:00
jflyper
1a8d40494d [H7][LIB] Remove V1.3.0 library 2019-07-05 00:09:00 +09:00
Dominic Clifton
8a1a75e2ef [H7] USB Middlewares change: Fix memory corruption 2019-05-12 22:09:09 +09:00
jflyper
1861c6d957 [H7] Modify USB Middleware library for composite device support 2019-05-09 13:56:29 +09:00
jflyper
0c5540228f Simple fixes to library files
- stm32h7xx_hal_rcc.c: Prevent signed-unsigned comparison warning

- [USBLIB] Take care of unused parameters

- [LIB] Stop signed-unsigned comparison warning (rcc_ex)

- Modify HAL SPI driver for const-ness to match call from current bus_spi driver

- [LIB] Handle unused in stm32h7xx_hal_flash.c

- UNUSED care for stm32h7xx_hal_rtc_ex.c

- UNUSED care for stm32h7xx_hal_pwr.c

- UNUSED care for stm32h7xx_hal_pcd.c

- UNUSED care for stm32h7xx_hal_flash.c

- UNUSED care for stm32h7xx_hal_adc_ex.c
2019-04-28 05:55:01 +09:00