HAL_ChibiOS: enable TX DMA on uarts on H7

This commit is contained in:
Andrew Tridgell 2019-02-14 07:22:44 +11:00
parent 231117e9b1
commit efc8da9f9a
2 changed files with 9 additions and 9 deletions

View File

@ -33,7 +33,7 @@ UART_ORDER OTG1 UART4 USART2 USART3 UART8 UART7
# UART4 serial GPS # UART4 serial GPS
PA0 UART4_TX UART4 PA0 UART4_TX UART4
PA1 UART4_RX UART4 PA1 UART4_RX UART4 NODMA
PA2 BATT_VOLTAGE_SENS ADC1 SCALE(1) PA2 BATT_VOLTAGE_SENS ADC1 SCALE(1)
PA3 BATT_CURRENT_SENS ADC1 SCALE(1) PA3 BATT_CURRENT_SENS ADC1 SCALE(1)
@ -106,7 +106,7 @@ PC4 AUX_ADC2 ADC1 SCALE(1)
PC5 PRESSURE_SENS ADC1 SCALE(2) PC5 PRESSURE_SENS ADC1 SCALE(2)
# USART6 to IO # USART6 to IO
PC6 USART6_TX USART6 NODMA PC6 USART6_TX USART6
PC7 USART6_RX USART6 NODMA PC7 USART6_RX USART6 NODMA
# Now setup the pins for the microSD card, if available. # Now setup the pins for the microSD card, if available.
@ -131,14 +131,14 @@ PE4 MPU_EXT_CS CS
# Another USART, this one for telem1. This one has RTS and CTS lines. # Another USART, this one for telem1. This one has RTS and CTS lines.
# USART2 serial2 telem1 # USART2 serial2 telem1
PD3 USART2_CTS USART2 NODMA PD3 USART2_CTS USART2
PD4 USART2_RTS USART2 NODMA PD4 USART2_RTS USART2
PD5 USART2_TX USART2 NODMA PD5 USART2_TX USART2
PD6 USART2_RX USART2 NODMA PD6 USART2_RX USART2 NODMA
# The telem2 USART, also with RTS/CTS available. # The telem2 USART, also with RTS/CTS available.
# USART3 serial3 telem2 # USART3 serial3 telem2
PD8 USART3_TX USART3 NODMA PD8 USART3_TX USART3
PD9 USART3_RX USART3 NODMA PD9 USART3_RX USART3 NODMA
PD11 USART3_CTS USART3 NODMA PD11 USART3_CTS USART3 NODMA
PD12 USART3_RTS USART3 NODMA PD12 USART3_RTS USART3 NODMA
@ -172,7 +172,7 @@ PD15 MPU_DRDY INPUT
# the 2nd GPS UART # the 2nd GPS UART
# UART8 serial4 GPS2 # UART8 serial4 GPS2
PE0 UART8_RX UART8 NODMA PE0 UART8_RX UART8 NODMA
PE1 UART8_TX UART8 NODMA PE1 UART8_TX UART8
# Now setup SPI bus4. # Now setup SPI bus4.
PE2 SPI4_SCK SPI4 PE2 SPI4_SCK SPI4
@ -186,7 +186,7 @@ PE3 VDD_3V3_SENSORS_EN OUTPUT HIGH
# UART7 maps to uartF in the HAL (serial5 in SERIALn_ parameters). # UART7 maps to uartF in the HAL (serial5 in SERIALn_ parameters).
PE7 UART7_RX UART7 NODMA PE7 UART7_RX UART7 NODMA
PE8 UART7_TX UART7 NODMA PE8 UART7_TX UART7
# Define a LED, mapping it to GPIO(0). LOW will illuminate the LED # Define a LED, mapping it to GPIO(0). LOW will illuminate the LED
PE12 FMU_LED_AMBER OUTPUT HIGH OPENDRAIN GPIO(0) PE12 FMU_LED_AMBER OUTPUT HIGH OPENDRAIN GPIO(0)

View File

@ -182,7 +182,7 @@ def write_dma_header(f, peripheral_list, mcu_type, dma_exclude=[],
shared = ' // shared %s' % ','.join(stream_assign[stream]) shared = ' // shared %s' % ','.join(stream_assign[stream])
if curr_dict[key] == "STM32_DMA_STREAM_ID_ANY": if curr_dict[key] == "STM32_DMA_STREAM_ID_ANY":
f.write("#define %-30s STM32_DMA_STREAM_ID_ANY\n" % (chibios_dma_define_name(key)+'STREAM')) f.write("#define %-30s STM32_DMA_STREAM_ID_ANY\n" % (chibios_dma_define_name(key)+'STREAM'))
f.write("#define %-30s 0U\n" % (chibios_dma_define_name(key)+'CHAN')) f.write("#define %-30s STM32_DMAMUX1_%s\n" % (chibios_dma_define_name(key)+'CHAN', key))
continue continue
else: else:
f.write("#define %-30s STM32_DMA_STREAM_ID(%u, %u)%s\n" % f.write("#define %-30s STM32_DMA_STREAM_ID(%u, %u)%s\n" %