I.MX6ULL UART Transmission Issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I.MX6ULL UART Transmission Issue

3,056 Views
nagaprasad
Contributor I

Hi all,

we are using i.mx6ull for our product.using uart for communication with external device.when we are trying to transmit more than 4Kb of data,we are unable to receive on other end.please suggest how can we achieve to transmit more than 4kb(8KB).i tried by modifying UART_XMIT_SIZE value but not working.

Thanks & Regards,

Naga Prasad.

Labels (5)
0 Kudos
Reply
14 Replies

2,854 Views
kef2
Senior Contributor V

I think this isn't imx6ull related. Changing kernel N_TTY_BUF_SIZE define perhaps could help crossing 4k limit, but by default you should split your writes to less than 4k.

0 Kudos
Reply

2,804 Views
nagaprasad
Contributor I

hi @kef2@Dhruvit 

we tried increasing N_TTY_BUF_SIZE & UART_XMIT_SIZE, kernel crashing.

Thanks & Regards,

Naga Prasad.

0 Kudos
Reply

2,771 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @nagaprasad,

I hope you are doing well
 
Please try to configure the DMA buffer size from the device tree using the 'fsl,dma-info' property.
For more information, please refer to the file Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml from the kernel source.
 
Thanks & Regards,
Dhruvit Vasavada

0 Kudos
Reply

2,782 Views
kef2
Senior Contributor V

Then keep splitting your write calls to 4k. 

I saw on google someone succeeded changing that define in the past. Perhaps it was different kernel, no DMA or something else. I take this as a weird kernel feature, which I need to live with... 

0 Kudos
Reply

3,016 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @nagaprasad,

I hope you are doing well
 
My apology for the delayed response.
 
Please try to enable the DMA for the UART communication for better results. It will help you to prevent such types of issues.
 
Thanks & Regards,
Dhruvit Vasavada

0 Kudos
Reply

2,991 Views
nagaprasad
Contributor I

Hi @Dhruvit ,

Awaiting for your reply.

Thanks & Regards,

Naga Prasad.

0 Kudos
Reply

2,979 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @nagaprasad,

I hope you are doing well
 
Please share your board device tree(dts) file for further debugging.
 
Thanks & Regards,
Dhruvit Vasavada

0 Kudos
Reply

2,966 Views
nagaprasad
Contributor I
hi,
please help us to resolve this issue asap
0 Kudos
Reply

2,957 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @nagaprasad,

I hope you are doing well
 
The configuration seems correct as you get the 4 kb of data correctly.
Kindly share your code for transmitting and receiving the data from UART for further debugging the issue.
 
Thanks & Regards,
Dhruvit Vasavada

0 Kudos
Reply

2,891 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @nagaprasad,

I hope you are doing well.

waiting for your response.

Thanks & Regards,
Dhruvit Vasavada

0 Kudos
Reply

2,859 Views
nagaprasad
Contributor I

Hi @Dhruvit,

still we are facing same issue, 

for example: when we are trying to transmit 5120 bytes, it is able to transmit only 4095 bytes using serial port programming.

if your able to transmit more than 4095 bytes, please share the test application  or patch file required to do changes.our requirement is should be able to transmit 8200 bytes without splitting data into two halfs for transmission.

please help us to resolve asap. 

Thanks & Regards,

NagaPrasad.

0 Kudos
Reply

2,975 Views
nagaprasad
Contributor I

Hi @Dhruvit 

please find attached dts file for imx6ull.

0 Kudos
Reply

3,014 Views
nagaprasad
Contributor I

Hi Dhruvit,

Thanks for your reply.

i have tried with enabling dma for uart but still facing same issue,please suggest if anything need to be done for enabling dma

uart5: serial@21f4000 {
compatible = "fsl,imx6ul-uart",
"fsl,imx6q-uart";
reg = <0x021f4000 0x4000>;
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6UL_CLK_UART5_IPG>,
<&clks IMX6UL_CLK_UART5_SERIAL>;
clock-names = "ipg", "per";
dmas = <&sdma 33 4 0>, <&sdma 34 4 0>;
dma-names = "rx", "tx";
status = "disabled";
}; 

0 Kudos
Reply

3,028 Views
nagaprasad
Contributor I

Hi,

Awaiting for any support on this issue.

0 Kudos
Reply