Hi Bin
The issue has been reproduced for the SERIAL_OMAP driver. Please find requested data below.
1. the output of command "serialstats", the link below has the information of this tool.
The serialstats and serialcheck tools have been cross-compiled and uploaded to target device, but it seems that serialcheck tool doesn't work with OMAP driver:
./serialcheck -h -d /dev/ttyO1 -f binary -m t -l 10 -b 19200 tiocsserial failed: Invalid argument
serialstats is working properly:
./serialstats -d /dev/ttyO5 -i 1 cts: 0 dsr: 0 rng: 0 dcd: 0 rx: 0 tx: 0 frame error 0 overuns 0 parity: 0 break: 0 buffer overrun: 0 cts: 0 dsr: 0 rng: 0 dcd: 0 rx: 0 tx: 0 frame error 0 overuns 0 parity: 0 break: 0 buffer overrun: 0
2. get the register dump of the locked port. you can use devmem2 command to read the registers.
It will be in the file UART5registers.txt which will be sent to the local support team
3. get all the tasks in the system by command "echo t > /proc/sysrq-trigger". You can send this log offline if you are not comfortable to post it here.
It will be in the file sysrq.txt which will be sent to the local support team
4. what is the state of RTS line (high or low) after the port is locked up?
It is high:
Once above states and logs are collected, please check if the UART IP is in sane state:
- write a char directly to the TX FIFO to see if there is any activity on the TX line, for example on UART5, "devmem2 0x481aa000 b 0x55", where 0xa81aa000 is the base address of UART5.
When writing to the failed port, there is no effect on the TX line
devmem2 0x481aa000 b 0x55 /dev/mem opened. Memory mapped at address 0xb6f01000. Read at address 0x481AA000 (0xb6f01000): 0x00 Write at address 0x481AA000 (0xb6f01000): 0x55, readback 0x55
When writing to a working port, data can be observed on the TX line:
- send some data from the other side and see if AM3352 UART FIFO occupancy increases in offset 0x64 (UART_RXFIFO_LVL register).
For the failed port RXFIFO doesn't increase:
/dev/mem opened. Memory mapped at address 0xb6f73000. Read at address 0x481AA064 (0xb6f73064): 0x00
For the working port RXFIFO increases:
/dev/mem opened. Memory mapped at address 0xb6f49000. Read at address 0x481A8064 (0xb6f49064): 0x01
Also do you understand when exactly the lockup happens? Is it just after switching baud rate or in the middle of transfer or at the start or random? When the AM3352 UART lockup happens, it is a rs485 master, not slave, right?
It is after switching when trying to transfer data. Device is working as rs485 master.





