Andrew Tridgell
1e4f597e02
HAL_ChibiOS: fixed support for STM32H7A3
...
need to tell ChibiOS this is a newer H7
2024-02-03 08:36:18 +11:00
Andrew Tridgell
054fb94e9a
HAL_ChibiOS: added support for STM32H7A3
...
interesting MCU as it is the first H7 we support that doesn't have a
128k flash sector size
2024-02-01 11:43:24 +11:00
Andrew Tridgell
07d0418cf9
HAL_ChibiOS: fixed flash support on H7 with 8k page size
...
the STM32H7A3xx has 8k pages
2024-02-01 11:43:24 +11:00
Andrew Tridgell
0a6057f2b3
HAL_ChibiOS: adjust clocks for H723 and H730
...
FDCAN clock must be 80MHz, and also align no-crystal clocks with
clocks for boards with crystals
2024-01-30 12:32:23 +11:00
Andrew Tridgell
967af533b9
HAL_ChibiOS: fixed flash page count on H723
...
single bank H7 has 8 pages
2024-01-30 12:32:23 +11:00
Andrew Tridgell
4eaf5ef247
HAL_ChibiOS: support STM32H723 boards
2024-01-30 12:32:23 +11:00
Andrew Tridgell
e772012e01
HAL_ChibiOS: raise SDMMC clock limit on H7
...
this allows for faster log download on ethernet
2024-01-29 06:51:11 +11:00
Andrew Tridgell
a2707b48c5
HAL_ChibiOS: enable clock management on G4
...
this allows for a different clock tree in the main fw from the
bootloader
2024-01-25 11:44:02 +11:00
Andrew Tridgell
2d031a4d20
HAL_ChibiOS: switched G4 FDCAN clock to 80MHz
...
this requires main CPU clock at 160 MHz instead of 168 MHz
2024-01-25 11:44:02 +11:00
Andrew Tridgell
f7c7ee00e9
HAL_ChibiOS: added a delete_next thread field for cleanup
...
allows for cleanup of web server threads in bootloader
2024-01-21 12:30:08 +11:00
Thomas Watson
5f5673b58f
AP_HAL_ChibiOS: match thread stack pointer types to ChibiOS
...
`__main_thread_stack_base__` and `__main_thread_stack_end__` are
variables whose address is defined to be the corresponding part of the
stack. These are declared as `extern stkalign_t` in ChibiOS code, and
being declared as `extern uint32_t` in ArduPilot code creates a warning
at link time when using LTO. Correct the declaration to eliminate this
warning.
Also update `__main_stack_base__` and `__main_stack_end__` which don't
currently trigger this warning but serve similar purposes and so might
in the future.
The hardware expects an alignment of `stkalign_t` (which is 8 bytes) and
the linker script defines the variable values with this alignment as
well, so this is safe.
No code size or functional change.
2024-01-16 09:24:34 +11:00
Andrew Tridgell
6ea2c28a4d
HAL_ChibiOS: fixed DMA on SPI on H743
...
this fixes DMA failures affecting IMUs on H743. The reason for the
failure is not yet clear, but this reverts back to our old stragegy of
always using the bouncebuffer on H7 as a quick workaround
2024-01-07 19:10:25 +11:00
Andrew Tridgell
c54aa0241a
HAL_ChibiOS: added mem_is_dma_safe() function
...
used for bouncebuffer code and in FATFS code
2024-01-05 06:52:11 -08:00
Andrew Tridgell
cc8c671cb7
HAL_ChibiOS: don't link evtimer in chibios_board.mk
2024-01-03 12:14:47 +11:00
Andrew Tridgell
418897c443
HAL_ChibiOS: removed old lwip options
2024-01-03 12:14:47 +11:00
Andrew Tridgell
9456b585fa
HAL_ChibiOS: don't link lwip bindings from ChibiOS
2024-01-03 12:14:47 +11:00
Andrew Tridgell
d2d2067f1c
HAL_ChibiOS: fixed micros and millis on boards without 1MHz clock
2023-12-24 10:10:14 +11:00
Andrew Tridgell
4a59097b5e
HAL_ChibiOS: use C implemention of div1000
2023-12-21 09:09:11 +11:00
Andrew Tridgell
6dbc3b6a70
HAL_ChibiOS: speed up millis(), micros64() etc
...
these use faster primitives and an assembly division by 1000 to get
between 2x and 3x speedup on these critical calls
2023-12-19 11:47:24 +11:00
Andrew Tridgell
a4fb05de95
HAL_ChibiOS: increase LWIP windows
...
now getting 6.8MByte/s with NET_TESTS=4
2023-12-11 18:00:38 +11:00
Andrew Tridgell
28885dca4c
HAL_ChibiOS: adjust buffer sizes
...
this fixes issues with TCP accepts being lost in web server
2023-12-11 18:00:38 +11:00
Andrew Tridgell
f603f045b5
HAL_ChibiOS: make lwip debugging easier
...
use ap_networking_printf wrapper
2023-12-11 18:00:38 +11:00
Andrew Tridgell
436c60c7de
HAL_ChibiOS: defaults to 50 socket limit
...
makes for more useful web server
2023-12-11 18:00:38 +11:00
Andrew Tridgell
f471732aad
HAL_ChibiOS: enable SO_REUSEADDR
2023-11-28 12:18:55 +11:00
Andrew Tridgell
0659ab8ef4
HAL_ChibiOS: increase max TCP resources
2023-11-28 12:18:55 +11:00
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