Commit Graph

380 Commits

Author SHA1 Message Date
thu5cob 49d7d0b1c4 HAL_ChibiOS: Fix stm32l4+ flash issue
stm32l4+ flash reset register has been reset properly
2023-10-06 14:52:34 +11:00
Andrew Tridgell 999919424b hwdef: allow for MCO pin to be configured
this allows for hwdef.dat lines like this:

  PA8 MCO1 RCC
  PC9 MCO2 RCC

you can control the scaling by defining the following:

- STM32_MCO1SEL
- STM32_MCO1PRE_VALUE
- STM32_MCO2SEL
- STM32_MCO2PRE_VALUE
2023-08-25 07:37:12 +10:00
Andy Piper 52dbac1de7 AP_HAL_ChibiOS: run STM32F103 core clock at 72Mhz on 24Mhz oscillators 2023-08-15 06:53:48 +10:00
Andy Piper c057cc5485 AP_HAL_ChibiOS: add get_output_mode() and use it to print correct banner for iomcu
add support for undef of STM32 lines and DMA_NOMAP
add support for F103 running at 24Mhz
add f103 variants of iofirmware
reduce memory usage in iomcu for new model
correct pwm output reporting
split iofirmware into config + mcu to allow f103 definition
don't enable non-existant timers on F103
2023-08-15 06:53:48 +10:00
Andy Piper f233a65580 AP_HAL_ChibiOS: add global interrupt handlers for TIM15 and TIM17 on F1 2023-08-15 06:53:48 +10:00
Tom Pittenger d59c3d7de0 AP_HAL_ChibiOS: remove common_eth.ld 2023-08-06 09:20:08 +10:00
bugobliterator cf6fd6717b AP_HAL_ChibiOS: fix alignment for Ethernet safe memory 2023-08-06 09:20:08 +10:00
Tom Pittenger 9698291920 AP_HAL_ChibiOS: fix unused var compile error 2023-08-06 09:20:08 +10:00
bugobliterator e6b51df7cd AP_HAL_ChibiOS: dynamically allocate memory for MAC Peripheral 2023-08-06 09:20:08 +10:00
Tom Pittenger f66327d97d AP_HAL_ChibiOS: Ethernet related memory allocations 2023-08-06 09:20:08 +10:00
Tom Pittenger 3b79ff0ad3 AP_HAL_ChibiOS: add hooks to compile Networking 2023-08-06 09:20:08 +10:00
Tom Pittenger d841d250d8 AP_HAL_ChibiOS: allow HW without HW_RNG to SW-based create psuedo-random 2023-08-06 09:20:08 +10:00
Andrew Tridgell 0accc9f897 HAL_ChibiOS: clear EOP bit at end of F4 programming 2023-07-10 06:52:44 +10:00
Andrew Tridgell 0aab2f7974 HAL_ChibiOS: implement newlib alloc functions as malloc wrappers
this fixes issue #24106
2023-07-05 07:13:39 +10:00
Andrew Tridgell 54e2e33ee1 HAL_ChibiOS: allow hwdef to specify a NRST_MODE override
this allows the boot behaviour of a board to be changes to avoid a
reset issue
2023-06-27 10:32:43 +10:00
Andrew Tridgell ddb991d9b5 HAL_ChibiOS: fixed 24mhz crystal on H7 with 480MHz clock
need to adjust the PLLQ as well as the PLLN
2023-06-20 18:56:13 +10:00
Andrew Tridgell 1055c5f1c6 waf: fixed dependency of ChibiOS build on compiler flags
this adds a chibios_flags.h which contains the flags we pass to the
ChibiOS make, which allows us to have a make level dependency on the
flags

this fixes (among other things) the build of copter followed by
bootloader for SPRacingH7
2023-06-20 18:08:31 +10:00
Martin Luessi b336526765 AP_HAL_ChibiOS: Move scheduler task table to RAM for H750 2023-06-06 19:19:10 +10:00
Martin Luessi 82280b6a8d AP_HAL_ChibiOS: Rename STM32_FORCE_CLOCK_INIT to HAL_FORCE_CLOCK_INIT 2023-06-06 19:19:10 +10:00
Martin Luessi 350dfc235e AP_HAL_ChibiOS: Add libgcc comment to H750 linker script 2023-06-06 19:19:10 +10:00
Martin Luessi f55261c852 AP_HAL_ChibiOS: Use DTCM for vector table for external flash targets 2023-06-06 19:19:10 +10:00
Martin Luessi ab03c49ea8 AP_HAL_ChibiOS: Move more time critical code to RAM for H750 2023-06-06 19:19:10 +10:00
Martin Luessi 0c93800ec1 AP_HAL_ChibiOS: Copy vector table to RAM if external flash is primary 2023-06-06 19:19:10 +10:00
Martin Luessi 84ccd046c6 AP_HAL_ChibiOS: Change linker script so vector table can be copied to RAM for external flash targets 2023-06-06 19:19:10 +10:00
Martin Luessi f5e6b055b6 AP_HAL_ChibiOS: Allow custom STM32_QSPISEL for H7 2023-06-06 19:19:10 +10:00
Martin Luessi 01f030da7c AP_HAL_ChibiOS: Option to force clock init 2023-06-06 19:19:10 +10:00
Andrew Tridgell 6f469c48e7 HAL_ChibiOS: support f_mkfs on all boards 2023-06-06 15:19:00 +10:00
Andrew Tridgell 146cc3312c HAL_ChibiOS: implement ff_memalloc, fixing mkdir() after format
this implements FATFS memory allocation in the HAL_ChibiOS malloc.c
which fixes mkdir() after a format of the microSD

The strategy is to deny large allocations and try for DMA allocations
if possible. This both fixes mkdir() and makes filesystem operations
faster as we have less copying of memory via the bouncebuffer
2023-06-03 17:07:04 +10:00
Andrew Tridgell 4946ce5431 HAL_ChibiOS: revert recent USB changes
these are causing some boards to crash on startup. Tested with a
QiotekZealotH743 which doesn't get out of setup_usb_strings()

once we have debugged this we can re-add the functionality
2023-06-03 16:50:30 +10:00
bugobliterator f7d3969116 AP_HAL_ChibiOS: enable write protection on USB msd
also fixes support for MSD on FS
2023-05-31 18:40:17 +10:00
bugobliterator a9ef3b031e AP_HAL_ChibiOS: add support for setting baudrate for ACM port in USB MSD 2023-05-31 18:40:17 +10:00
bugobliterator c6631bce57 AP_HAL_ChibiOS: add block filesystem access support when using MSD USB 2023-05-31 18:40:17 +10:00
bugobliterator 6d6c791fdf AP_HAL_ChibiOS: add support for mass storage device 2023-05-31 18:40:17 +10:00
bugobliterator cc302d8b8c AP_HAL_ChibiOS: add support for OTG HS 2023-05-31 18:40:17 +10:00
Peter Barker 537fc19bb5 AP_HAL_ChibiOS: do not build ChibiOS with debug symbols unless debug build
debug symbols subtly change the compiler output which can lead to problems with repeatable builds
2023-05-16 09:55:47 +10:00
Andrew Tridgell 7e84028a91 HAL_ChibiOS: fixed sdcard lockup with SPI sdcard
this affects boards that share sdcard on the same bus as another SPI
device. In this case it was a QiotekZealotH743 where logging stopped

this issue is that the SPI hooks for MMC SPI did not do a DMA channel
lock before the SPI device lock. So when the RAMTRON driver on the
QiotekZealotH743 which is on the same SPI2 bus as the sdcard did an
operation we had a lock order violation
2023-05-13 18:18:14 +10:00
Andy Piper 95437d248f AP_HAL_ChibiOS: advanced timers are now determined automatically on L4+ 2023-05-03 07:39:39 +10:00
Andy Piper d69b8c2693 AP_HAL_ChibiOS: fix usage of ADC2 and ADC3 in STM32H730 2023-04-28 08:31:15 +10:00
Andy Piper 26c59349d5 AP_HAL_ChibiOS: use HAL_XIP_ENABLED to denote running in external flash 2023-04-28 08:31:15 +10:00
Andy Piper ff1661a8de AP_HAL_ChibiOS: use STM32_FLASH_NBANKS for flash actions 2023-04-28 08:31:15 +10:00
Andy Piper 5b43926d0a AP_HAL_ChibiOS: for H730/H750 running in XIP mode do not reset clocks
create mcuconf file for STM32H730 (type2)
allow OTG2 to be used as OTG1 on MCUs that need it
remove redundant OTG enablement
2023-04-28 08:31:15 +10:00
Andy Piper b75ff2e2ae AP_HAL_ChibiOS: allow only ADC2 to be used 2023-04-28 08:31:15 +10:00
Andy Piper 798fc05ba8 AP_HAL_ChibiOS: clean up linker map on H730 and H750
use regular ChibiOS RAM areas for RAM functions
exclude board.o from RAM functions and add some comments
use separate linker script for H750
use correct RAM area for process stack on H750/H743
update EXCLUDE items to put __early_init in flash on H730 and H750
optimize H730 ramfunc usage
2023-04-28 08:31:15 +10:00
Andy Piper 7516f04106 AP_HAL_ChibiOS: create two configurable non-cacheable memory areas for DMA 2023-04-28 08:31:15 +10:00
Andy Piper cc086ab8d4 AP_HAL_ChibiOS: support for STM32H730xx MCUs
correct calculation of advanced timers
add support for linker script configuration in mcu config script
use linker script configuration for H750 and H730
add single OTG_HS support on H730 via OTG2
make sure complimentary channels get advanced timers
complemntary timers do not require advanced mode
allow custom clockspeeds of 550Mhz
correct debug pins on H730
support custom clockrate of 520Mhz on H730
correct H730 USB end point pins
restructure linker script for STM32H730
allow chibios_hwdef.py to set advanced timer on L431
don't define RAMFUNC on STM32H730
clock tree for STM32H730
create non-cacheable memory area for SDMMC DMA
don't look for RAM_MAP in bootloader with external flash
2023-04-28 08:31:15 +10:00
bugobliterator 0343b789e6 AP_HAL_ChibiOS: add support for mixed internal and external flash 2023-04-26 18:04:00 +10:00
bugobliterator 726dcda24f AP_HAL_ChibiOS: add support for using ADC2 and ADC3 on H7 2023-04-26 18:04:00 +10:00
Andrew Tridgell 64cd58c21a ChibiOS: disable DMA on I2C on F7 and H7 by default
this was already done on many (most?) boards, and greatly reduces DMA
sharing which improves performance of UARTs. This changes the default
to no DMA on I2C
2023-04-25 14:19:09 +10:00
Andy Piper fc6cb74ac7 AP_HAL_ChibiOS: SDIO PWRSAV needs to be enabled on F4/F7 2023-04-14 08:05:19 +10:00
tsubashmail@gmail.com ae9e15ade5 HAL_ChibiOS: port for STM32L4+ processor
Added support for stm32l4+ processor

- Added scripts for hwdef generation
- Tested in custom hardware prototype (stm32l4r5vit6)
- Tested all peripherals and auto pilot modes.
2023-04-14 07:48:56 +10:00