I.MX6ULL UART Transmission Issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

I.MX6ULL UART Transmission Issue

3,054 次查看
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.

标签 (5)
0 项奖励
回复
14 回复数

2,852 次查看
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 项奖励
回复

2,802 次查看
nagaprasad
Contributor I

hi @kef2@Dhruvit 

we tried increasing N_TTY_BUF_SIZE & UART_XMIT_SIZE, kernel crashing.

Thanks & Regards,

Naga Prasad.

0 项奖励
回复

2,769 次查看
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 项奖励
回复

2,780 次查看
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 项奖励
回复

3,014 次查看
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 项奖励
回复

2,989 次查看
nagaprasad
Contributor I

Hi @Dhruvit ,

Awaiting for your reply.

Thanks & Regards,

Naga Prasad.

0 项奖励
回复

2,977 次查看
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 项奖励
回复

2,964 次查看
nagaprasad
Contributor I
hi,
please help us to resolve this issue asap
0 项奖励
回复

2,955 次查看
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 项奖励
回复

2,889 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @nagaprasad,

I hope you are doing well.

waiting for your response.

Thanks & Regards,
Dhruvit Vasavada

0 项奖励
回复

2,857 次查看
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 项奖励
回复

2,973 次查看
nagaprasad
Contributor I

Hi @Dhruvit 

please find attached dts file for imx6ull.

0 项奖励
回复

3,012 次查看
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 项奖励
回复

3,026 次查看
nagaprasad
Contributor I

Hi,

Awaiting for any support on this issue.

0 项奖励
回复