This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM355 usb test mode (host and device)

hi

I want to enter DM355 USB test mode to test the usb diagram for both host and device. Following is the bash file I wrote to test the packet.

 

#!/bin/sh

echo "test start!"

# 0x0 is device mode, 0x1 is host mode?
./areg -w /dev/areg 0x01c64460 0x0

# write packet
i=0
while [ $i -lt 9 ]
do
 i=`expr $i + 1`
 echo $i
 ./areg -w /dev/areg 0x01c64420 0x0
done

i=0
while [ $i -lt 8 ]
do
 i=`expr $i + 1`
 echo $i
 ./areg -w /dev/areg 0x01c64420 0xaa
done

i=0
while [ $i -lt 8 ]
do
 i=`expr $i + 1`
 echo $i
 ./areg -w /dev/areg 0x01c64420 0xee
done

./areg -w /dev/areg 0x01c64420 0xfe

i=0
while [ $i -lt 11 ]
do
 i=`expr $i + 1`
 echo $i
 ./areg -w /dev/areg 0x01c64420 0xff
done

./areg -w /dev/areg 0x01c64420 0x7f
./areg -w /dev/areg 0x01c64420 0xbf
./areg -w /dev/areg 0x01c64420 0xdf
./areg -w /dev/areg 0x01c64420 0xef
./areg -w /dev/areg 0x01c64420 0xf7
./areg -w /dev/areg 0x01c64420 0xfb
./areg -w /dev/areg 0x01c64420 0xfd
./areg -w /dev/areg 0x01c64420 0xfc
./areg -w /dev/areg 0x01c64420 0x7e
./areg -w /dev/areg 0x01c64420 0xbf
./areg -w /dev/areg 0x01c64420 0xdf
./areg -w /dev/areg 0x01c64420 0xef
./areg -w /dev/areg 0x01c64420 0xf7
./areg -w /dev/areg 0x01c64420 0xfb
./areg -w /dev/areg 0x01c64420 0xfd
./areg -w /dev/areg 0x01c64420 0x7e

# enter test mode
./areg -w /dev/areg 0x01c6440c 0x8000000
# set TxPktRdy ready
./areg -w /dev/areg 0x01c64410 0x20000

echo "test done!"

Here are the questions I want to know

1.  Can I run this file to test both device mode and host mode? How?

2. On device mode, Do I need to send command SET_FEATURE to DM355 first?  On host mode, what do I need to do before run the scipt?

3. Is there any mistake I make or Can you give me some advice? as I can't see the diagram by running the scirpt.

Thanks,

Best regards,

Jian