I am using application uart of iMX287. I am using AUART2 on the same.
Initially to test AUART I did echo "Hello World" /dev/ttySP2.
This ended with some error/warning "Usage: mxmxs-auart mxs-auart.2: Unhandled status 52028d".
On forum I came to know about this could be some parity or framing error. I am not sure how simple echo can lead to such kind of errors.
Then I tested one of my working program (tested one on iMX233) with the iMX287 board that also lead to same error/warning. In that code I have used no parity.
Later I enable DMA for this AUART and compiled linux kernel (2.6.35.3) and tested the code. After enabling DMA I haven't seen any "Usage: mxmxs-auart mxs-auart.2: Unhandled status 52028d".
But I am not able to see any data over wire. I tested minicom with and without DMA. With minicom I was not able to see any data over TX/RX lines.
Unfortunately "cat /proc/tty/driver/auart" show TX/RX count to be zero. Someone on forum has mentioned that those counters are disable for security reasons.
Has anyone faced such kind of issue?
I had enabled AUART support in kernel. I was suspecting MUX issue but not sure how I can resolve it.
But eventually I found the issue in original mx28evk_pins.c. I have highlighted.
{
.name = "usb0",
.id = PINID_AUART2_TX,
.fun = PIN_GPIO,
}
{
.name = "usb1",
.id = PINID_AUART2_RX,
.fun = PIN_GPIO,
}
I replaced with below mentioned changes and it worked.
#ifdef CONFIG_MXS_AUART2_DEVICE_ENABLE
{
.name = "AUART2.TX",
.id = PINID_AUART2_TX,
.fun = PIN_FUN1,
}
{
.name = "AUART2.RX",
.id = PINID_AUART2_RX,
.fun = PIN_FUN1,
}
#endif
Also I found that AUART2 configuration code is not under CONFIG_MXC_AUART_DEVICE_ENABLE compilation flag.
Simarly AUART1 will not work as RX/TX pins are shared with LED PWM0/1 and proper compilation flags are not used.
I have shared reference if anyone wants to use AUART1 instead of LED PWM0/1. One can make it better by adding "#error" messages if both features enabled.
#ifndef CONFIG_MXS_AUART1_DEVICE_ENABLE // LED PWM0 & 1 are muxed with AUART1
#if defined(CONFIG_LEDS_MXS) || defined(CONFIG_LEDS_MXS_MODULE)
{
.name = "LEDS_PWM0",
.id = PINID_AUART1_RX,
.fun = PIN_FUN3,
.strength = PAD_8MA,
.voltage = PAD_3_3V,
.pullup = 1,
.drive = 1,
.pull = 1,
},
{
.name = "LEDS_PWM1",
.id = PINID_AUART1_TX,
.fun = PIN_FUN3,
.strength = PAD_8MA,
.voltage = PAD_3_3V,
.pullup = 1,
.drive = 1,
.pull = 1,
},
#endif
#else // if AUART1 is defined then enable UART
{
.name = "AUART1.TX",
.id = PINID_AUART1_RX, /* Power enable pin*/
.fun = PIN_FUN1,
},
{
.name = "AUART1.RX",
.id = PINID_AUART1_TX,
.fun = PIN_FUN1,
},
#endif
Thanks.
Kiran Nevaskar
Hi,
Send your post to imx community (e.g. i.MX Community ) to get it visible for active members.
Saurabh
Hi
Thanks for your inputs.
With Regards,
Kiran Nevaskar