2 Replies Latest reply on Jun 19, 2017 2:01 AM by omkar.ak_2256296

    UART DMA Tranmission  Baud rate issue

    omkar.ak_2256296

      Hi,

         

      I am using USB-UART example with a slight change. There is a DMA channel from UART producer to USB endpoint Manual  and another manual out DMA channel from CPU to UART consumer.

         

       

         

      There is aperipheral connected to UART which has to work in 3M baud rate. The data from this peripheral is coming as expected. We are trying to send data to this peripheral using the CPU-UART DMA manual out channel. But, the data transmitted to the peripheral seems to be in 115200 baud rate.

         

      We have configured the device in 3M baudrate and reading is happening in 3M baudrate itself. We have no problem in reading path. But, how does the baudrate change when we do a DMA transfer from CPU-UART?

         

      If we are doing it wrong, explain alternative way of sending data to UART consumer  in DMA mode with example.

        • 1. Re: UART DMA Tranmission  Baud rate issue
          rghe

          Hi,

             

          In the USB-UART example project, the default baud rate (glUartConfig.baudRate) is set to 115200 in the CyFxUSBUARTAppInit() API.

             

          Since, you are using a CPU-UART DMA Manual Out channel, there won't be any SET_LINE_CODING or GET_LINE_CODING CDC class requests from a Host Application. As a result baud rate will be set to the default 115200. 

             

          You need to set the glUartConfig.baudRate field to CY_U3P_UART_BAUDRATE_3M in CyFxUSBUARTAppInit() API to transmit data at 3M baud rate to the device.

             

           

             

          Regards,

             

          Raghuram

          • 2. Re: UART DMA Tranmission  Baud rate issue
            omkar.ak_2256296

            Hi Raghuram,

               

            Thank you for the reply . I have configured the UART(glUartConfig.baudRate) at 3M baud rate, but still the CPU-UART DMA transmits at 115200 baud rate. So i don't really understand what is going wrong. Is there some other setting which has to be done to make this DMA channel work at 3M baud rate ?