Difference between revisions of "A20-SOM"
(→Android) |
(→Power supply and consumption) |
||
Line 122: | Line 122: | ||
<br> | <br> | ||
===Power supply and consumption=== | ===Power supply and consumption=== | ||
+ | |||
+ | A20-SOM typically consumes between 0.20A and 0.25A when connected to a 5V | ||
+ | voltage source (provided at pins GND and 5VEXT). | ||
+ | |||
+ | During heavy load of the processor the consumption might raise up to 0.35A | ||
+ | (tested with 'top d0'). | ||
+ | |||
+ | The current consumed might have peaks as high as 0.50A during start-up when | ||
+ | different modules are initialized. | ||
+ | |||
+ | Make sure your supply is capable of providing at least half an ampere of | ||
+ | current at 5V of voltage. | ||
===Board dimensions=== | ===Board dimensions=== |
Revision as of 22:12, 20 July 2014
Features:
- A20 dual core Cortex-A7 processor
- 1GB DDR3 memory
- AXP209 PMU IC
- MicroSD card
- UART console
- 4GB NAND Flash
- Status LEDs
- RESET, RECOVERY buttons
- 6 connectors x 40 pin 0.05" step
Contents
- 1 Official Images from OLIMEX
- 2 Documents
- 3 Hardware
- 4 How To?
- 4.1 How to correctly power off OLinuXino running from NAND Flash
- 4.2 How to generate boot-able SD-card Debian Linux image for A20-OLinuXino?
- 4.3 How to download new Android image to the NAND memory of my A20 board?
- 4.4 How do I write the official Android image to a micro SD card for my A20 board?
- 4.5 How do I write the Linux image to a micro SD card to use with my A20 board?
- 4.6 How to change HDMI, VGA and LCD resolutions?
- 4.7 How to generate Arch Linux image?
- 4.8 How to detect and enable the Ethernet controller (if it is disabled by default)?
- 4.9 How to install Android on SD-card?
- 4.10 How to access UART, I2C, GPIOs under Android?
- 4.11 How to control PWM under Linux?
- 4.12 How to build the Android 4.2.2 image for A20-OLinuXino-MICRO?
- 4.13 How to build Debian Linux 3.4 image for A20-OLinuXino-MICRO?
Official Images from OLIMEX
Note that only the microSD connector is suitable for booting the desired operating system, the SD-MMC connector is not suitable for booting since it is not a part of the boot sequence (refer to A20 datasheet).
Linux
Debian with Kernel 3.4.79+ Gigabit Ethernet, Camera interface, GPIOs, WIFI, 3G, USB-CDC etc.
The list of all installed packages is located in A20-SOM-installed_packages.txt file inside the image.
The image includes installations for the following:
- XFCE4 desktop environment
- mplayer
- smplayer
- gcc-4.6
- dpkg
- git
- i2c-tools
- perl
- xorg
- python 2.7
- midori
- minicom
- usb-modeswitch
- sshfs
- wvdial
Tested board peripherals with this image:
- GPIOs - they are located in /sys/class/gpio directory. Note that first you have to export GPIOs. For example:
# for i in `seq 1 1 230`; do echo $i > /sys/class/gpio/export; done will export all available GPIOs # echo out > /sys/class/gpio/gpioXX_pxx/direction will make the port output # echo 1 > /sys/class/gpio/gpioXX_pXX/value will make the port output in logical 1
- LCD - 4.3(480x272), 7(800x480), 10(1024x600), 15(1366x768)
- SATA - with power on/off control
- HDMI - the default HDMI resolution is 720p60(720x1280 - 60 Hz)
- Touch_screen support - you need calibrate LCD before using touch screen and in certain cases you would also need to select the proper video configuration. Note that if you want to use touch screen in X environment then you have to calibrate it like olimex user, not like root user because X environment is started like olimex user. For example type:
#su olimex #sudo ts_calibrate calibrate the touch screen and reboot the board
- ASIX8877 USB-LAN - link to product page
- WEB camera A4TECH
- WIFI_RTL8188 - link to product page
- MOD-WIFI-R5370 - link to product page
- USB_OTG - low/full/high USB host
- USB_HOST_up - low/full/high USB host
- USB_HOST_down - low/full/high USB host
- MOD-USB3G - link to product page
in order to test MOD-USB3G module you have to place SIM card(without pin code) in module and
connect it to USB host connector change settings in /etc/wvdial.conf file according to your
mobile operator and type: # wvdial 3gconnect
- micro_SD_card - linux starts from micro_SD card
- second_SD_card - with card present capability
- ETHERNET - 100Mb/1000Mb
- MIC IN
MIC_IC can be tested with: # arecord -f dat -r 60000 -D hw:0,0 -d 5 test.wav this command will record 5 sec audio stream from microphone in test.wav file
- Headphone OUT
Headphones output can be tested with: # aplay -D hw:0,0 test.wav this command will play the audio stream from test.wav file
- NAND support - /dev/nandX
- I2C2(100KHz) - /dev/i2c-2
- I2C1(100KHz) - /dev/i2c-1
- UART6 - /dev/ttyS1
- UART7 - /dev/ttyS2
- SPI1 - /dev/spidev1.0
- SPI2 - /dev/spidev2.0
there is a simple test for SPI2 in /opt/spidev directory. # ls /opt/spidev max6675/ MOD-SMB380/ in folder max6675/ there is example related with MOD- TC(link to product) -
temperature sensor that you have to connect to UEXT1 connector # cd max6675 # ./MAX6675 the last command will read temperature from MOD-TC thermocouple in folder MOD-SMB380 there is
example related with MOD-SMB380(link to product link to product page)3-AXIS ACCELEROMETER
BOARD that you have to connect to UEXT1 connector # cd MOD-SMB380 # ./a.out
the last command will read temperature and 3-asix accelerometer values BUTTONs - we use evtest package for testing. For example:
# evtest
then enter 2 for event number and now you can press the BUTTONs and you should see the result on terminal window
Android
Android 4.2.2 NAND Flash image for A20-SOM-4GB with support got Gigabit Ethernet, Camera, GPIOs etc.
Documents
A20 Brief
A20 Datasheet
A20 User Manual
Hardware
Power supply and consumption
A20-SOM typically consumes between 0.20A and 0.25A when connected to a 5V voltage source (provided at pins GND and 5VEXT).
During heavy load of the processor the consumption might raise up to 0.35A (tested with 'top d0').
The current consumed might have peaks as high as 0.50A during start-up when different modules are initialized.
Make sure your supply is capable of providing at least half an ampere of current at 5V of voltage.
Board dimensions
A20-SOM and A20-SOM-4GB basic dimensions in mils: click
A20-SOM-EVB basic dimension in mils: click
CAD files
A20-OLinuXino is Open Source Hardware, CAD files are available at GitHub
The CAD product used to design OLinuXino is Eagle and you can download evaluation free version from their web.
Board Layout
How To?
How to correctly power off OLinuXino running from NAND Flash
In this Blog post we explain what are the problems. This is common problem for all computers running OS. Here you can read more about MLC NAND Flash and Linux file system.
How to generate boot-able SD-card Debian Linux image for A20-OLinuXino?
Follow our blog post with step by step instructions Note that Linux-Sunxi Kernel is a work-in-progress, this means you can try the current stage/sunxi-3.4 branch but if something is broken and doesn't work just revert to the git tags we give in the blog and they should work for sure
Sunxi u-boot loader The linux-sunxi git page contains a lot of sources for all Olimex Allwinner boards.
How to download new Android image to the NAND memory of my A20 board?
To repair the image on the NAND re-upload it following these steps:
- 1. Install and run PhoenixSuit (can be found here: download from google drive).
- 2. Go to firmware tab of the program and point to a valid Android image (the latest official one may also be downloaded above).
- 3. Disconnect the power supply and USB cable from the A20 board.
- 4. Press and hold RECOVERY button, apply power supply (6-16)V, release RECOVERY button.
- 5. Connect USB cable to the mini USB connector.
- 6. You will be asked for drivers for the bootloader. Navigate to the folder where you extracted the PhoenixSuit and install the drivers from the respective executables (or manually point the installer to the drivers folder in the PhoenixSuit installation path).
- 7. PhoenixSuit will detect the board and would ask for the method of writing the image. Choose method of writing the image and confirm your wish to write the image.
- 8. Wait till upgrade succeeds
Note that it is not recommended to have your mini USB connected to an external USB hub. This might cause delays and might distort the signal levels. Always test with the USB connected straight to the USB ports of your computer.
How do I write the official Android image to a micro SD card for my A20 board?
There are two Android images available for an SD card. One for 7″ LCD and one for 10″ LCD A20-OLinuXino-MICRO#Android. Note that Android display configuration settings are edited in the script.bin file (it has to be converter to fex and edited according to the fex guide at linux sunxi's article; then converted back to script.bin and written in the image). To write the images on the SD card you will need PhoenixSuit and to follow these steps:
• Install and run PhoenixSuit
• Go to the firmware tab of the program and point to a valid Android image (note that the images on Gdrive are compressed and you have to extract them to .img files to be able write them with PhoenixSuit)
• Disconnect the power supply and USB cable from the A20 board. Put an SD card in micro SD holder. We recommend 4GB class 10 card.
• Press and hold RECOVERY button, apply power supply (6-16)V, release RECOVERY button.
• Connect USB cable to the mini USB connector.
• You will be asked for drivers for the boot-loader. Navigate to the folder where you extracted the PhoenixSuit and install the drivers from the respective executables (or manually point the installer to the drivers folder in the PhoenixSuit installation path).
• PhoenixSuit will detect the board and would ask for the method of writing the image. Choose method of writing the image and confirm your wish to write the image.
• Wait till upgrade succeeds
Note that it is not recommended to have your mini USB connected to an external USB hub. This might cause delays and might distort the signal levels. Always test with the USB connected straight to the USB ports of your computer.
Important: When Android runs for very first time it takes several minutes to initialize all files and buffers please do not cut the power supply during this process! Also when fresh image is installed fast boot may be disabled, which means that when you apply power supply after few seconds Android will go in sleep mode and you have to press POWER button to start it, you can change to fast boot when you power off there is dialog box asking you if you want next boot to be fast boot, you have to check this box before you power off. Also note that you must do touch screen calibration when you run Android for very first time which might require a mouse.
How do I write the Linux image to a micro SD card to use with my A20 board?
To write a Linux image to an SD card under Windows we use Win32 Disk Imager):
- Download Win32 Disk Imager Win32 Disk Imager
- Insert card
- Start program
- Select file
- Click "write"
To write a Linux image to an SD card under Linux:
For instance you have an image with the file name of "debian_2g.img". It would be downloaded to the SD card connected to a Linux machine using one of the following commands:
- # dd bs=4M oflag=sync if=debian_2g.img of=/dev/sdX
or
- # cp debian_2g.img /dev/sdX
where X is the uSD card.
How to change HDMI, VGA and LCD resolutions?
The default SD card setup is made with settings for HDMI 720p/60Hz. If you want to change to some other LCD, VGA or HDMI resolution then you have to start change_display.sh script file in /root directory.
Type:
./change_display*
or
./change_display_a20_SOM.sh
and press "Enter".
Then choose the resolution and the interface(LCD, HDMI or VGA). Note that the selection of a specific resolution is done by navigating with the arrow keys and pressing "space" button. Make sure the asterisk marks your selection properly.
The supported resolutions are:
For LCD:
- 1. 4.3" (480x272)
- 2. 7" (800x480)
- 3. 10" (1024x600)
- 4. 15.6" (1366x768)
Important: initially the boards are calibrated for a specific display. If you re-write the image (no matter whether the SD card or the NAND memory) you would need to use a mouse to calibrate the display initially. It might be impossible to calibrate it via touching the display.
For HDMI:
- 0. 480i
- 1. 576i
- 2. 480p
- 3. 576p
- 4. 720p50
- 5. 720p60
- 6. 1080i50
- 7. 1080i60
- 8. 1080p24
- 9. 1080p50
- 10. 1080p60
- 11. pal
- 14. ntsc
For VGA: (note that the VGA signals are routed to custom 6 pin connector and you need from adapter to standard VGA connector)
- 0. 1680x1050
- 1. 1440x900
- 2. 1360x768
- 3. 1280x1024
- 4. 1024x768
- 5. 800x600
- 6. 640x480
- 7. 1920x1080
- 8. 1280x720
How to generate Arch Linux image?
Step by step instructions how to build Arch Linux image
How to detect and enable the Ethernet controller (if it is disabled by default)?
Note: in the previous Debian releases the Ethernet was auto-detected and initialized during boot BUT this was causing big delays in the start-up of the board if you didn't want to use Ethernet or if there wasn't Ethernet cable connected.
You can enable it by following these two steps:
1. To check under what name the LAN is associated write "ifconfig –a"
2. If, for example, it is under eth0 name, then write: "dhclient eth0"
This should enable the Ethernet and then SSH would also be available.
How to install Android on SD-card?
How to access UART, I2C, GPIOs under Android?
Use our Open Source OLinuXino A20-TOOLS
How to control PWM under Linux?
There is an article here: how to add pwm
How to build the Android 4.2.2 image for A20-OLinuXino-MICRO?
First you need to Download the A20 SDK2.0 Linux Kernel 3.4
Second you need to configure your environment read the instructions here
Then Build the kernel, kernel modules and u-boot
cd lichee ./build.sh -psun7i_android
When done, continue with Bulding the android image:
cd ../android4.2 cd device/softwinner/ tar zxfv olinuxino-a20.tgz cd ../../ source build/envsetup.sh lunch #select olinuxino-a20_eng extract-bsp make -j4
Dave from Axon instruments wrote more detailed blog post about how he generates the Android image]