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

40 commits

Author SHA1 Message Date
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
823d0edf99 [H7][LIB] Remove duplicate definition of assert_param from LL spi 2021-04-03 14:03:54 +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
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
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
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
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
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
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
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
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
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
jflyper
7a0d3e73f5 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-04-28 05:55:01 +09:00
jflyper
8670c05068 SPI HAL library bug (referencing RX side handle from TX only DMA) 2019-04-28 05:55:01 +09:00
Dominic Clifton
844683279a STM32H750 - Apply workaround to the SDMMC Errata 2.11.4
Issue: "Consecutive multiple block transfers can induce incorrect data length"
Workaround: "8 SDMMC clock cycles must elapse before DTEN can be set."
2019-04-28 05:55:01 +09:00
Dominic Clifton
adcf556ea5 STM32H750 - Fix for H750 Errata 2.11.5. 2019-04-28 05:55:00 +09:00
Dominic Clifton
a545abc511 Fix compilation error in H7 HAL library when enabling QSPI. 2019-04-28 05:55:00 +09:00
jflyper
99ea236bc2 Take care of "FLASH_SIZE" constant for stm32h750xx.h in lib 2019-04-28 05:54:36 +09:00
jflyper
e124693d48 [LIB] stm32h7xx_hal_def.h : Include <stddef.h> instead of <stdio.h>
Inclusion of <stdio.h> produces poisoned function alert for sprintf and
variants.
F7 use <stddef.h> instead of <stdio.h>
2019-04-25 12:01:42 +09:00
jflyper
22dd78f247 [CMSIS] stm32h743xx.h: FLASH_SIZE def collide with Betaflight 2019-04-25 12:01:42 +09:00
jflyper
5f15f58aa6 Import STM32Cube_FW_H7_V1.3.0 2019-04-21 18:39:03 +09:00