I have a Nucleo-767 board, and I'm doing a port from a STM32F103 to this new board. Whit the last peripheral (UART7) I have a assert error "stream already allocated" for UART7-RX.
In fact, the channel/stream (1, 3) was identical to the one used by I2C2_RX. From another questions I saw that the only reallocations allowed were those contained at corresponding "stm32_registry.h" (I can't locate that limitation at the reference manual), so I tried the following alternatives for the peripherals I use:
Code: Select all
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) => (1, 2)
#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) => (1, 4)
#define STM32_I2C_I2C4_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) => (1, 5)
#define STM32_I2C_I2C4_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
#define STM32_SPI_SPI4_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
#define STM32_SPI_SPI4_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
#define STM32_UART_UART5_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
#define STM32_UART_UART5_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) => (2, 6)
#define STM32_UART_UART7_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) ====> ORIGINAL PROBLEM!!
#define STM32_UART_UART7_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
However, the working code stopped working: I2C4 was unable to send data. As a bad solution, I have use interrupts instead of DMA for I2C (by declaring STM32_I2C_USE_DMA FALSE on mcuconf.h).
Any ideas would be welcomed...