Hi, i am using ti wl1273 chip on uart with freescale imx6 based board. When waiting to recieve version info from chip, the data is recieved in parts and hence the ti driver logic fails.
Any suggestions what could be the problem..?
Log:
[ 53.791790] (stk) : st_kim_start
[ 53.909975] (stk) :ldisc_install = 1
[ 53.915072] (stc): st_tty_open
[ 53.918518] (stk) :line discipline installed
[ 53.922760] <out<01 01 10 00
[ 53.926859] >in>04
[ 53.929021] >in>0e 0c 01 01 10 00 06 00 00 06 0d 00 0f 1f
Here dat being recieved comes in parts 04 and then the remaining part. This is causing problems.
I am using uart5 with ctsrts and sdma.
@@ -788,6 +788,7 @@ static void dma_rx_work(struct work_struct *w)
struct imx_port *sport = container_of(w, struct imx_port, tsk_dma_rx);
struct tty_struct *tty = sport->port.state->port.tty;
+ printk("%s uart: %d rx bytes %d\n",__FUNCTION__, sport->port.line, sport
if (sport->rx_bytes) {
tty_insert_flip_string(tty, sport->rx_buf, sport->rx_bytes);
@@ -1063,8 +1065,9 @@ static int imx_startup(struct uart_port *port)
temp |= UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN;
if (sport->enable_dma) {
temp |= UCR1_RDMAEN | UCR1_TDMAEN;
- /* ICD,await 4 idle frames also enable AGING Timer */
- temp |= UCR1_ICD_REG(0)|UCR1_ATDMAEN;
+ /* ICD,await 32 idle frames. Disabling AGING Timer */
+ temp |= UCR1_ICD_REG(3) ;
+ temp &= ~(UCR1_ATDMAEN);
}
The above change in kernel/drivers/tty/serial/imx.c seems to resolve the problem, but if printk is removed the problem starts appearing again.
Can someone from freescale help me in identifying the real cause ?
It could be related to the stack. Would it be possible to have some charts of the signals to see how they are behaving?
hi gusarambula,
which stack are you refereing to ?
I am using TI-st driver in kernel, along with ti uim-sys service, bluedroid, and libbt-vendor-ti.c
Hi,
Neeraj
First verify signal response using scope on CTS,RTS,RX and TX pins.
If above settings are proper than you should able to get data correctly.
Thanks
Saurabh
verified CTS, RTS, RX, TX.
@@ -788,6 +788,7 @@ static void dma_rx_work(struct work_struct *w)
struct imx_port *sport = container_of(w, struct imx_port, tsk_dma_rx);
struct tty_struct *tty = sport->port.state->port.tty;
+ printk("%s uart: %d rx bytes %d\n",__FUNCTION__, sport->port.line, sport
if (sport->rx_bytes) {
tty_insert_flip_string(tty, sport->rx_buf, sport->rx_bytes);
@@ -1063,8 +1065,9 @@ static int imx_startup(struct uart_port *port)
temp |= UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN;
if (sport->enable_dma) {
temp |= UCR1_RDMAEN | UCR1_TDMAEN;
- /* ICD,await 4 idle frames also enable AGING Timer */
- temp |= UCR1_ICD_REG(0)|UCR1_ATDMAEN;
+ /* ICD,await 32 idle frames. Disabling AGING Timer */
+ temp |= UCR1_ICD_REG(3) ;
+ temp &= ~(UCR1_ATDMAEN);
}
The above change in kernel/drivers/tty/serial/imx.c seems to resolve the problem, but if printk is removed the problem starts appearing again.
Can someone from freescale help me in identifying the real cause ?