A13-OLinuXino-WIFI with Android. UART1 blocks OS

Started by agustin_nrtk, June 13, 2013, 02:56:07 PM

Previous topic - Next topic

agustin_nrtk

Hi I have an A13-OLinuXino-WIFI board with Android on NAND.
I connect the UART1 to a PIC and try to make a communication with it.
Now I have the code running on an Android application but with a USB-serial and runs well.
When I try to read or write with the UEXT UART1, the operating system freezes and restarts. After that until the UART is connected the system not boot any more.

Why does this happen?
I could not find any example that access to the UART1 in Android.

agustin_nrtk

I keep looking for the problem and I think it's because the debug information continuous out through the UART.
I disabled from script.bin:

Quote[uart_para]
uart_debug_port = 0

Any suggestions?

Tele

I'm just guessing.
Maybe its hardware error, I mean you have made some connection error. Don't forget that you have to connect the TX to the RX and same with the another RX - TX wire pair.
Check the level of the signals. UEXT connector accepts 3.3V logic, not a driven 5V or even higher.
These pins connected directly to the A13 processor, they can make strange troubles if their level is too high, or output pins are interconnected.
You can ruin your processor if you connect 5V or higher to its pins.
It can be max 3.3V, strictly.

I'm just guessing here.

swiggers

You have to remove the entire section in script.fex:

[uart_para]
uart_debug_port = 1
uart_debug_tx = port: PG03 <4> <1> <default> <default>
uart_debug_rx = port: PG04 <4> <1> <default> <default>

Not work change it to 0. That means UART0

You also have to change in default.prop, but in the ramdisk:

ro.debuggable=1 to 0

This prevents the console start Android ttyS1

Hope that helps

agustin_nrtk

Quote from: Tele on June 13, 2013, 09:41:48 PM
I'm just guessing.
Maybe its hardware error, I mean you have made some connection error. Don't forget that you have to connect the TX to the RX and same with the another RX - TX wire pair.
Check the level of the signals. UEXT connector accepts 3.3V logic, not a driven 5V or even higher.
These pins connected directly to the A13 processor, they can make strange troubles if their level is too high, or output pins are interconnected.
You can ruin your processor if you connect 5V or higher to its pins.
It can be max 3.3V, strictly.

I'm just guessing here.
Yeah, that's all checked. And just in case, I'm using the power provided by the UART extension.

Quote from: swiggers on June 14, 2013, 01:16:43 AM
You have to remove the entire section in script.fex:

[uart_para]
uart_debug_port = 1
uart_debug_tx = port: PG03 <4> <1> <default> <default>
uart_debug_rx = port: PG04 <4> <1> <default> <default>

Not work change it to 0. That means UART0

You also have to change in default.prop, but in the ramdisk:

ro.debuggable=1 to 0

This prevents the console start Android ttyS1

Hope that helps
Excellent detail swiggers.
I was wrong thinking it was like the rest of the options "somewhat" _used of the script.fex file.

Finally got to disable debug output following the instructions on this page:
http://www.imajeenyus.com/computer/20130301_android_tablet/android/unpack_repack_recovery_image.html

For the NANDC disk image I used the following command:
adb shell "cat /dev/block/nandc > /data/nandc.img"

Then edit the init.rc (on decompressed ramdisk), commenting the following lines:

#service console /system/bin/sh
    class core
    console
    disabled
    user shell
    group log

#service console /system/bin/sh /dev/ttyS0
    class core
    console

#on property:ro.debuggable=1
    start console

After reloading the image to /dev/block/nandc, the console debug stop working and can finally use the UART1

I hope this help to someone.
Thanks for replys.

vinifr

QuoteAfter reloading the image to /dev/block/nandc

How did you do that?  :o

agustin_nrtk

Quote from: vinifr on June 16, 2013, 06:14:18 PM
QuoteAfter reloading the image to /dev/block/nandc

How did you do that?  :o

I did it with the following command:
adb shell "cat /data/nandc.img > /dev/block/nandc"

koray.duran

I've tried it many way and also stopped debug same way but at booting of cpu still debug messages are coming untill android starts to run. allright?
Do you have any idea how we can stop it totally?

agustin_nrtk


mohammadfa91

Does it need SDK library for using UART1? What is send and receiving commands in android?

JohnS

Quote from: agustin_nrtk on June 19, 2013, 04:17:26 PM
Unfortunately according to this page:
http://jas-hacks.blogspot.com.ar/2012/08/hackberry-a10-bootloader.html
There is no way to disable all debug information.

That's another board.  Try it with this one (A13) and SD card.

John