I.MX6ULL UART Transmission Issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

I.MX6ULL UART Transmission Issue

1,841件の閲覧回数
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 返答(返信)

1,639件の閲覧回数
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 件の賞賛

1,589件の閲覧回数
nagaprasad
Contributor I

hi @kef2@Dhruvit 

we tried increasing N_TTY_BUF_SIZE & UART_XMIT_SIZE, kernel crashing.

Thanks & Regards,

Naga Prasad.

0 件の賞賛

1,556件の閲覧回数
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 件の賞賛

1,567件の閲覧回数
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 件の賞賛

1,801件の閲覧回数
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 件の賞賛

1,776件の閲覧回数
nagaprasad
Contributor I

Hi @Dhruvit ,

Awaiting for your reply.

Thanks & Regards,

Naga Prasad.

0 件の賞賛

1,764件の閲覧回数
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 件の賞賛

1,751件の閲覧回数
nagaprasad
Contributor I
hi,
please help us to resolve this issue asap
0 件の賞賛

1,742件の閲覧回数
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 件の賞賛

1,676件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @nagaprasad,

I hope you are doing well.

waiting for your response.

Thanks & Regards,
Dhruvit Vasavada

0 件の賞賛

1,644件の閲覧回数
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 件の賞賛

1,760件の閲覧回数
nagaprasad
Contributor I

Hi @Dhruvit 

please find attached dts file for imx6ull.

0 件の賞賛

1,799件の閲覧回数
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 件の賞賛

1,813件の閲覧回数
nagaprasad
Contributor I

Hi,

Awaiting for any support on this issue.

0 件の賞賛