Commit Graph

923 Commits

Author SHA1 Message Date
Andrew Tridgell
26d1371d25 HAL_ChibiOS: separate out DMA allocation for sdcard IO
this fixes an issue with DMA to SPI6 on STM32H7. On the H7 SRAM4 can
be used for DMA and BDMA to all devices except for SDMMC which uses
IDMA.

by separating out DMA of sdcard data from other data we can arrange
for DMA to all devices to work
2019-03-09 07:33:47 +11:00
Andrew Tridgell
a7c91d1cb4 HAL_ChibiOS: show all SPI clocks 2019-03-09 07:33:47 +11:00
Siddharth Purohit
fef81b6381 HAL_ChibiOS: add support for new main sensors 2019-03-06 20:47:10 +11:00
Andrew Tridgell
160de969a5 HAL_ChibiOS: simplify H7 clock tree setup
and push more peripherals to max of 100MHz
2019-03-04 21:42:07 +11:00
Andrew Tridgell
5bcfe41d1f HAL_ChibiOS: push H7 clock to 400MHz 2019-03-04 19:38:06 +11:00
Andrew Tridgell
a59e1d0e0f HAL_ChibiOS: fixed H7 dma sharing between BDMA and DMA
the BDMA and DMA controllers have separate namespaces for streams, so
we can allocate a lot more streams than we were
2019-03-02 20:50:59 +11:00
Andrew Tridgell
c7ca6d77c7 HAL_ChibiOS: H7 doesn't need a DMA mapping for SDMMC
it uses a dedicated internal DMA controller in the SDMMC peripheral
2019-03-02 20:50:59 +11:00
Andrew Tridgell
6f07d804b9 HAL_ChibiOS: adjust Pixhawk4Pro VBUS and DMA priority 2019-03-02 20:50:59 +11:00
Andrew Tridgell
603d9f6907 HAL_ChibiOS: fixed typo in ITCM base address 2019-03-02 09:01:20 +11:00
Andrew Tridgell
4c12ba4c2c HAL_ChibiOS: fixed SDMMC IRQ priority 2019-03-01 11:39:27 +11:00
Andrew Tridgell
7e1048c89b HAL_ChibiOS: enable UART inversion on H7 2019-03-01 11:39:27 +11:00
Andrew Tridgell
2f833c92d3 HAL_ChibiOS: enable SDMMC for CubeOrange 2019-03-01 11:39:12 +11:00
Andrew Tridgell
37010a568e HAL_ChibiOS: enable SDMMC on Pixhawk4Pro 2019-03-01 11:39:12 +11:00
Andrew Tridgell
e192bc6c10 HAL_ChibiOS: adjust H7 clocks, and enabled SDMMC 2019-03-01 11:39:12 +11:00
Andrew Tridgell
ff28337bfd HAL_ChibiOS: fixed typos 2019-03-01 07:27:47 +11:00
Andrew Tridgell
64681cb05c HAL_ChibiOS: allocate threads from any heap
this fixes a failure on MatekF405-Wing where it fails to allocate the
SPI thread for the IMU
2019-02-27 11:54:28 +11:00
Andrew Tridgell
3a2227c912 HAL_ChibiOS: updated IDs for CubeOrange 2019-02-26 18:21:13 +11:00
Andrew Tridgell
ff4614b399 HAL_ChibiOS: rename CubeH7 to CubeOrange 2019-02-26 18:21:13 +11:00
Andrew Tridgell
94abc5a54d HAL_ChibiOS: fixed DShot on H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
26e76e51ed HAL_ChibiOS: fixed H7 build with older compilers 2019-02-26 16:18:26 +11:00
Andrew Tridgell
70930cca29 HAL_ChibiOS: fixed bootloader build with gcc 4.9 2019-02-26 16:18:26 +11:00
Andrew Tridgell
723e8a23fc HAL_ChibiOS: enable HSE_BYPASS for NucleoH743 2019-02-26 16:18:26 +11:00
Andrew Tridgell
f8aeeb0333 HAL_ChibiOS: adjust clock tree to be more consistent
use 96MHz for all peripheral buses
2019-02-26 16:18:26 +11:00
Andrew Tridgell
5dd82f1d63 HAL_ChibiOS: adjust 16MHz HSE settings for H743 (CubeH7) 2019-02-26 16:18:26 +11:00
Andrew Tridgell
b0f4494c4a HAL_ChibiOS: fixed DMA on SPI for Pixhawk4Pro 2019-02-26 16:18:26 +11:00
Andrew Tridgell
312597ac20 HAL_ChibiOS: fixed default batt2 pins for fmuv5 2019-02-26 16:18:26 +11:00
Andrew Tridgell
584e36e360 HAL_ChibiOS: switch Holybro to their own VID 2019-02-26 16:18:26 +11:00
Andrew Tridgell
9966fbea0f HAL_ChibiOS: fixed bootloader build error 2019-02-26 16:18:26 +11:00
Andrew Tridgell
8e745f74fb HAL_ChibiOS: support SPI6 on Pixhawk4Pro 2019-02-26 16:18:26 +11:00
Andrew Tridgell
75cd20aea4 HAL_ChibiOS: handle DMAMUX2 on H7
with BDMA
2019-02-26 16:18:26 +11:00
Andrew Tridgell
e43ad56920 HAL_ChibiOS: fixed Pixhawk4Pro battery defaults 2019-02-26 16:18:26 +11:00
Andrew Tridgell
87e7ea368f HAL_ChibiOS: fixed battery monitoring and buzzer for Pixhawk4Pro 2019-02-26 16:18:26 +11:00
Andrew Tridgell
542372014e HAL_ChibiOS: enable SPI5 on Pixhawk4Pro 2019-02-26 16:18:26 +11:00
Andrew Tridgell
778d892fc2 HAL_ChibiOS: fixed dma resolved for H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
bf783e73ab HAL_ChibiOS: use polled SPI for Pixhawk4Pro for now
and disable sensors rail till later in startup
2019-02-26 16:18:26 +11:00
Andrew Tridgell
807d9e4b92 HAL_ChibiOS: added optional polled SPI mode 2019-02-26 16:18:26 +11:00
Andrew Tridgell
bd47aba5ca HAL_ChibiOS: reduced delay time in main loop to 50us
this allows for faster loop rates, and seems to be enough in testing
2019-02-26 16:18:26 +11:00
Andrew Tridgell
e92c66418d HAL_ChibiOS: fixed bouncebuffer code on STM32F7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
a3e69e715d HAL_ChibiOS: avoid doing one-way SPI transfers
these transfers use dummy bytes in the hal driver, which may not be in
DMA safe memory, so best to avoid them
2019-02-26 16:18:26 +11:00
Andrew Tridgell
dad1774330 HAL_ChibiOS: fixed channel selection for F4/F7 uart driver 2019-02-26 16:18:26 +11:00
Andrew Tridgell
cda1959629 HAL_ChibiOS: added support for more flexible memory regions
this allows for an arbitrary number of memory regions, with each one
flagged as DMA safe, fast or normal
2019-02-26 16:18:26 +11:00
Andrew Tridgell
5f88340919 HAL_ChibiOS: fixed flash build warning 2019-02-26 16:18:26 +11:00
Andrew Tridgell
8a40ee8132 HAL_ChibiOS: fixed idle wait on H7 flash program 2019-02-26 16:18:26 +11:00
Andrew Tridgell
1d6c877c3c HAL_ChibiOS: set board type on PH4Pro 2019-02-26 16:18:26 +11:00
Andrew Tridgell
6177129e41 HAL_ChibiOS: fixed typo in dma_resolver.py 2019-02-26 16:18:26 +11:00
Andrew Tridgell
4e067ee3cd HAL_ChibiOS: fixed DMA on TIM12 for Pixhawk4Pro 2019-02-26 16:18:26 +11:00
Andrew Tridgell
dd835f5fce HAL_ChibiOS: optimize for speed on more boards 2019-02-26 16:18:26 +11:00
Andrew Tridgell
34a7812416 HAL_ChibiOS: use -O3 on boards with 2M flash 2019-02-26 16:18:26 +11:00
Andrew Tridgell
b07ba37359 HAL_ChibiOS: pass optimization to ChibiOS build 2019-02-26 16:18:26 +11:00
Andrew Tridgell
77d4e1f796 HAL_ChibiOS: removed ID_ANY streams for H7
use generated map instead
2019-02-26 16:18:26 +11:00
Andrew Tridgell
ee1d2e8edb HAL_ChibiOS: adjust H743 DMA settings 2019-02-26 16:18:26 +11:00
Andrew Tridgell
cb77b06460 HAL_ChibiOS: generate a dma map for H7
this allows for DMA sharing, allowing for more peripherals with DMA
2019-02-26 16:18:26 +11:00
Andrew Tridgell
423ad60c47 HAL_ChibiOS: enable all DMAs on Pixhawk4Pro 2019-02-26 16:18:26 +11:00
Andrew Tridgell
718cf4377d HAL_ChibiOS: reduce DMA count until we can share 2019-02-26 16:18:26 +11:00
Andrew Tridgell
0c01375799 HAL_ChibiOS: enable IOMCU for CubeH7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
9647a68c9e HAL_ChibiOS: fixed UART RX DMA for H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
6422068e6b HAL_ChibiOS: fixed analog input on H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
efc8da9f9a HAL_ChibiOS: enable TX DMA on uarts on H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
231117e9b1 HAL_ChibiOS: invalidate before read on rx, not on DMA setup
more efficient, as we only invalidate what was used
2019-02-26 16:18:26 +11:00
Andrew Tridgell
071d5e01af HAL_ChibiOS: added DMAMUX channel assignment calls 2019-02-26 16:18:26 +11:00
Andrew Tridgell
f4e31ce65b HAL_ChibiOS: added more cache flush ops 2019-02-26 16:18:26 +11:00
Andrew Tridgell
46787fe7d8 HAL_ChibiOS: adjust clocks for H743 2019-02-26 16:18:26 +11:00
Andrew Tridgell
8e52ed4e9b HAL_ChibiOS: update Pixhawk4Pro hwdef 2019-02-26 16:18:26 +11:00
Andrew Tridgell
b662adf8cc HAL_ChibiOS: setup sensors on NucleoH743 2019-02-26 16:18:26 +11:00
Andrew Tridgell
c0e47754fa HAL_ChibiOS: enable more peripherals on CubeH7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
bd27d7fc26 HAL_ChibiOS: fixed build on F4 2019-02-26 16:18:26 +11:00
Andrew Tridgell
d6bedc3bdf HAL_ChibiOS: use ifndef on more peripheral types 2019-02-26 16:18:26 +11:00
Andrew Tridgell
6fb40a9713 HAL_ChibiOS: set FPU=hard if not set elsewhere 2019-02-26 16:18:26 +11:00
Andrew Tridgell
f753669a58 HAL_ChibiOS: improved check for DTCM ram 2019-02-26 16:18:26 +11:00
Andrew Tridgell
57c573552c HAL_ChibiOS: check for logger instance before use 2019-02-26 16:18:26 +11:00
Andrew Tridgell
7c61d66d75 HAL_ChibiOS: fixed SPI clocks on H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
ca221e7e7a HAL_ChibiOS: cleanup shared DMA code 2019-02-26 16:18:26 +11:00
Andrew Tridgell
dd8115c9b4 HAL_ChibiOS: check for already allocated TX dma in UART driver 2019-02-26 16:18:26 +11:00
Andrew Tridgell
a4687930b0 HAL_ChibiOS: enable FRAM for storage 2019-02-26 16:18:26 +11:00
Andrew Tridgell
37bcd6e7d8 HAL_ChibiOS: default to timer 5 for H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
d96142a37e HAL_ChibiOS: allow double allocate call in RCOutput 2019-02-26 16:18:26 +11:00
Andrew Tridgell
c02a271c8a HAL_ChibiOS: fixed shared DMA for H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
4c7fa7c6fb HAL_ChibiOS: make SPI clock test non-blocking 2019-02-26 16:18:26 +11:00
Andrew Tridgell
e6b41fbe0b HAL_ChibiOS: added initial CubeH7 hwdef 2019-02-26 16:18:26 +11:00
Andrew Tridgell
e581be8df7 HAL_ChibiOS: optionally disable DCache on H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
46cb506a22 HAL_ChibiOS: added cache management for H7 in bouncebuffer code 2019-02-26 16:18:26 +11:00
Andrew Tridgell
50b7b7beb5 HAL_ChibiOS: disable DTCM on H7 for now
DTCM doesn't allow for DMA yet
2019-02-26 16:18:26 +11:00
Andrew Tridgell
ff21508ce8 HAL_ChibiOS: ensure 32 byte alignment for DMA on H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
33699d4f4a HAL_ChibiOS: fixed shared_dma for H7
stream ID any doesn't need to be locked
2019-02-26 16:18:26 +11:00
Andrew Tridgell
c36f677c94 HAL_ChibiOS: initial hwdef for Pixhawk4Pro 2019-02-26 16:18:26 +11:00
Andrew Tridgell
5faec2f869 HAL_ChibiOS: removed HSE bypass for NucleoH743
not needed any more
2019-02-26 16:18:26 +11:00
Andrew Tridgell
0691e23219 HAL_ChibiOS: setup some sensors on NucleoH743 2019-02-26 16:18:26 +11:00
Andrew Tridgell
4b01e2c3b3 HAL_ChibiOS: fixed clock tree for no LSE on H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
3c9ba02ce9 HAL_ChibiOS: fixed H7 flash 2019-02-26 16:18:26 +11:00
Andrew Tridgell
8c55f7bc49 HAL_ChibiOS: enable debug on SD7 for bootloader for NucleoH743 2019-02-26 16:18:26 +11:00
Andrew Tridgell
599a1a3d67 HAL_ChibiOS: adapt analog driver for H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
52b47e499b HAL_ChibiOS: fixed H7 clock tree for ADC driver 2019-02-26 16:18:26 +11:00
Andrew Tridgell
de335f14d7 HAL_ChibiOS: fixed GPIO init for H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
1fa0a2eeca HAL_ChibiOS: fixed peripheral enables on H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
acf77ba49a HAL_ChibiOS: fixed dma resolver for H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
d9c888ab45 HAL_ChibiOS: port SPI, I2C and UART drivers to H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
ae448a6932 HAL_ChibiOS: enable DMA checking on H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell
51b4d54f70 HAL_ChibiOS: disable show_stack_usage in bootloader 2019-02-26 16:18:26 +11:00
Andrew Tridgell
5201fdf653 HAL_ChibiOS: adjust for changed flash API 2019-02-26 16:18:26 +11:00
Andrew Tridgell
565706cf7e HAL_ChibiOS: fixed H7 flash handling 2019-02-26 16:18:26 +11:00