This shows you the differences between two versions of the page.
|
tutorials:common:how_to_use_the_uart [2014/03/26 18:01] allen created |
tutorials:common:how_to_use_the_uart [2014/06/09 19:52] (current) allen |
||
|---|---|---|---|
| Line 9: | Line 9: | ||
| ===== Abstract ===== | ===== Abstract ===== | ||
| - | Here is the guide to teach that open the uart port on cubiboard and how to test the uart port whether available | + | Here is the guide to teach that how to enable the uart port on cubiboard and how to test the uart port is available . |
| - | In this guide ,using the | + | |
| Line 18: | Line 18: | ||
| Cubieboard 1 2 [[http://docs.cubieboard.org/cubieboard1_and_cubieboard2_gpio_pin]] | Cubieboard 1 2 [[http://docs.cubieboard.org/cubieboard1_and_cubieboard2_gpio_pin]] | ||
| + | Fex Guide [[http://linux-sunxi.org/Fex_Guide]] | ||
| ===== Open the port ===== | ===== Open the port ===== | ||
| - | Using cubietruck as a example . | ||
| <code> | <code> | ||
| #mount /dev/nanda /mnt | #mount /dev/nanda /mnt | ||
| Line 53: | Line 53: | ||
| #reboot | #reboot | ||
| </code> | </code> | ||
| - | <note tip> **remember save as scrpit.bin and reboot**</note> | ||
| After the reboot ,the uart3 and uart4 are available. | After the reboot ,the uart3 and uart4 are available. | ||
| + | |||
| + | <note tip> **remember save as script.bin and reboot**</note> | ||
| + | |||
| ===== Test the uart ===== | ===== Test the uart ===== | ||
| Line 326: | Line 328: | ||
| </code> | </code> | ||
| - | Install the compiled enviroment | + | Install software build the compiled enviroment . |
| <code> | <code> | ||
| Line 333: | Line 335: | ||
| </code> | </code> | ||
| + | The uart0 3 4 5 6 are available in Cubieboard1 and Cubieboard2 ,while uart0 3 4 7 are available in Cubietruck, but uart0 is debug serial. | ||
| - | To make sure the PG06 and PG07 internal loopback,use Dupont Line connect them . | + | To test uart3(or uart4) should make sure the PG06 and PG07 (or PG10 and PG11)internal loopback,use Dupont Line connect them . |
| - | If you only open the uart0 uart3 uart4,uart3 mapping the device ttyS1 | + | |
| - | while open the uart0 uart2 uart3 uart4uart3 mapping the device ttyS2 | + | |
| - | <code> | + | If you only open the uart0 4, uart4 is mapping the device ttyS1. |
| - | #./uart_test ttyS1 or ttyS2 | + | |
| - | </code> | + | |
| + | While open the uart0 3 4, uart3 is mapping the device ttyS1. uart4 is mapping the device ttyS2. | ||
| + | <code> | ||
| + | #./uart_test ttyS1 // or ttyS2 | ||
| + | </code> | ||
| + | The termial will prinf as below,it prove the uart3 is working . | ||
| + | {{:tutorials:common:选区_061.png?600|}} | ||
| === See Also === | === See Also === | ||