Showing results for 
Search instead for 
Did you mean: 

STM32F3x Zephyr Project, DMA configuration



I am trying to use the async transfers with usarts, but it fails to enable the UART (using uart_rx_enable), due to no DMA configured for the usart.

I have not been able to modify the device tree for DMA, but so far unsuccessful.

On the dma2 node, I have changed the status from "disabled" to "okay", and modified the usart3 to reference the dma2 in "dmas".


&usart3 {
    pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>;
    pinctrl-names = "default";
    current-speed = <19200>;
    dmas = <&dma2 3 1 (STM32_DMA_PERIPH_TX | STM32_DMA_PRIORITY_HIGH)>,
          <&dma2 2 1 (STM32_DMA_PERIPH_RX | STM32_DMA_PRIORITY_HIGH)>;
    //dma-names = "tx", "rx";
    status = "okay";
It fails with:
zephyr.dts:209.4-64: Warning (dmas_property): /soc/serial@40004800:dmas: cell 3 is not a phandle reference
zephyr.dts:209.4-64: Warning (dmas_property): /soc/serial@40004800:dmas: Could not get phandle node for (cell 3)

The MCU is the STM32F303.
Any idea how to configure DMA for usarts correctly?
ST Employee

Hello @sbend

Could you please share the DMA controller node code, to check #DMA-cells  

The phandle is pointing to the DMA controller node where the warning is related to cell 3 

PS: uncomment dma-names, it's a required property

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.