Home
MYD-SAMA5D3X User Manual
Contents
1. VALCI Z F Erasing blocks batch 3 F Erasing blocks batch 4 Erasing blocks batch 5 F Erasing blocks batch 6 Erasing blocks batch 7 sam ba 2 12 1 96 Figure 4 10 36 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real Download u boot bin to 0x40000 Refer to figure 4 12 MYD SAM9X5 User Manual 5 28 2013 7 14 BIN File 6 14 2013 9 42 Figure 4 11 File Script File Size in byte s 0 100 0 00300000 0 00300010 0 00300020 0 00300030 m at91sama5d3x Memory Display Start Address 0 300000 0x00000004 0 34014951 0x05B04910 0x804531B4 A Display format C ascii C 8 bit C 16 bit G 32 bit 0 50 529 0 821 10 0 02006583 2 8002 0 5085258 Ox2CFF7AEB OxBC4E4967 OxABASC4F6 Awernsanrec OxE2695B1D 0x819A7091 OxFB9BFO9D 0x055ASBC6 4 DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash NorFlash One wire EEPROM SRAM SerialFlash AT25 AT26 r Download Upload File Send File Name D SAMASD3X Linux Dy SAMASD3x Linuxcimage u boot bi Receive se Map Aqar s 040000 size For Receive File 051000 a Compare sent file with memory x Scripts Send Boot File
2. 42 4 5 4 Install uboot Source and Compile 43 4 5 5 Install and Compile Linux kernel Source Code 43 4 5 6 Install and Compile Linux File System esses 43 4 6 Make Linux File System 44 4 6 1 Write Demo Program hellomyir esce 44 4 6 2 Mount UBIFS File System 45 4 6 3 Modify UBIFS System 1 46 4 6 4 Regenerate UBIFS System 47 4T CNX USE Mc E ee 49 4 7 1 Screen Galibr llon 49 4 7 2 U ASK 50 47 3 SD Gard Pn M 51 4 7 4 Play MP3 Music 52 4 7 5 Network Port Test 52 41 0 lehet TSG m E 54 4 7 7 Login board via telnet1d U 55 4 7 8 Mount NFS file system n 56 MYIR TECH LIMITED www myirtech com MYR
3. Apply traces DBGU DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash NorFlash OTP One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File D SAMASD3X Android demo image Android 4 0 4 r2 1 s Receive File 5 Address Sige For Receive File 01000 byte s i EUM blocks batch 5 Erasing blocks batch 6 Erasing blocks batch 7 sam ba 2 12 1 NANDFLASH SendBootFilePmecc Sending boot file done sam ba_2 12 1 Figure 5 10 83 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual m at91sama5d3xek nandflashboot android dt 3 5 v Figure 5 11 6 Download u boot bin to 0x40000 Refer to figure 5 12 C ascii C 8 bit C 16 bit 32 bit 0 00300000 0x00000004 OxSOBCC529 0 5085258 OxE2695B1D 0 00300010 0 34014951 OxE821DB10 Ox2CFF7AEB 0x819A7091 0x00300020 0 05804910 OxD2D06583 OxBC4E4967 OxFB9BFOS9D 0x00300030 0 80453184 OxFC2A8002 OxABASC4F6 0 055 5 6 DwErn DANTE 4 DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash NorFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name Dy SAMAS
4. UXZUUUU DYLES UX UUUU DUNE d r UXZUUIUDZULJ 0x20000 bytes written by applet Writing 0x20000 bytes at 0x60000 buffer addr 0x2001052C 0x20000 bytes written by applet Writing 0x8FCC bytes at 0x80000 buffer addr 0x2001052C 0x8FCC bytes written by applet ba_2 12 1 Figure 5 13 8 Download sama5d3xek dtb to 0x0018 0000 Department Refer to figure 5 14 m SAM BA 2 12 at91sama5d3x e Open at91sama5d3x Memory Display Start Address 0x300000 Size byte s 0400 0 00300000 0x000000 0 00300010 Ox34D1AS9 0x00300020 0 05 04 0 00300030 0 80443 n nn2nnnan DDRAM DataFlash AT45DB DCB Download Upload File Receive File Name Send File D SAMASD Address 0x180000 Scripts Lookin Android 4 0 4 r2 1 sama5d3x nandboot Name at91sama5d3_nandflash tcl sama5d34ek dtb 8 at91sama5d3ek nandflash at91sama5d3ek nandflash tcl amp amp at91 samaSd3ek at91sama5d3ek pda nandflash tcl jat91sama5d3xek nandflashboot android logfile _ sama5d3lek dtb _ sama5d31ek_pda dtb sama5d33ek dtb _ sama5d33ek pda dtb nandflash 4 11 20131 01 PM TCLFil 6 3 2013 10 06 AM Windo 4 9 2013 3 02 PM TCL Fil 4 9 2013 3 02 PM Windo 4 9 2013 3 02 TCL Fil I 4 11 201312 57PM BIN Fil 6 7 20137 31 PM Text Di 4 11
5. Execute vvriurig UXZUUUU DYLES UXtUUUU d r UXZUULUDZL 0x20000 bytes written by applet Writing 0x20000 bytes at 0x60000 buffer addr 0x2001052C 0x20000 bytes written by applet Writing 0x8FCC bytes at 0x80000 buffer addr 0X2001052C 0x8FCC bytes written by applet sam ba_2 12 1 Figure 4 13 Download sama5d3xek dtb to 0x0018 0000 Refer to figure 4 14 38 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Size in byte s d00 ascii C 8 bit 16 bit 32 bit 0x00300000 0 00000004 0x50BCC529 0x5D85258F 0xE2695B1D 0 00300010 0x34D1A951 0xE821DB10 Ox2CFF7AEB 0 81947091 0 00300020 0x05B04910 0xD2D06583 4 4967 0 9 09 0 00300030 0 80453184 2 8002 9 4 6 0 055 5 6 Start Address 080000 Refresh AwCAD II ARE n s cern2oannmc nsDn2oororc 4 m DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash NorFlash OTP One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File D SAMA5D3X Linux image sama5d34ek dtb Receive File 8 oe pernesan O ea Scripts J e 5dili Ud 2 12 1 Yo U S3ANIA2USAJLITUX IITIdqe SdrTid2US teK uLU UXLOUUUU U F Send File D SAMA5D3X Linux image sama
6. Execute 1r Easily DIOCKS DdLCII F Erasing blocks batch 5 Erasing blocks batch 6 I Erasing blocks batch 7 sam ba 2 12 1 NANDFLASH SendBootFilePmecc Sending boot file done sam ba 2 12 1 96 Figure 4 12 37 MYIR TECH LIMITED www myirtech com Make Your Idea Real MYD SAM9X5 User Manual Download ubootEnvtFileNand Flash bin this file generated by sam ba when programing to 0x000C 0000 Refer to figure 4 13 0 00300000 0 00300010 0 00300020 0 00300030 n nn2nnnan at91sama5d3x Memory Display Start Address 0300000 Refresh Denis nnn Size in byte s 0100 0x00000004 0 34014951 0 05 04910 0x804531B4 ascii C 8 bit 16 bit 32 bit 0 50 529 0 821 10 0 02006583 OxFC2A8002 0 5085258 Ox2CFF7AEB OxBC4E4967 OxABASC4F6 OxE2695B1D 0x819A7091 OxFB9BFO9D 0 055 5 6 Download Upload File g D SAMASD3X Linux image ubootEnvtFileNandFlash bin Receive File Adfiress 0xC0000 Size Receive 051000 byte s DDRAM DataFlash ATASDB DCB EEPROMAT24 NandFlash NorFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Compare sent file with memory Scripts 1 Send Boot File
7. D5 51 M D6 53 M EBI D7 FLASH A9 8 35 M EBI D8 FLASH A10 T 37 M EBI D9 FLASH A11 6 40 M EBI D10 FLASH A12 5 42 M EBI D11 FLASH A13 4 48 M EBI D12 FLASH A14 3 50 M EBI D13 FLASH A15 2 52 M EBI D14 FLASH A16 1 FLASH A17 55 FLASH A18 18 FLASH A19 17 FLASH A20 16 54 M D15 FLASH A21 11 46 FLASH A22 10 FLASH A23 g 26 27 VDDIOM R27 OR 45 13 R29 100 44 r VDDIOM gt 33 C47 C48 NRD 12 100nFT 100nF NWE NCSO Figure 2 6 2 256MB NANDFLASH and its characteristics are as follows gt Organization Page size 2K 64 Bytes Block size 128K 4K Bytes 64 Pages e Plane size 1056Mb 128K 4K x1024Blocks Device size 2112Mb 1056Mbx2planes gt Array performance Read page 25 us e Program page 200 us TYP 1 8v 3 3V Erase block 700us TYP Power 2 7V 3 6V Endurance 100 000 Program Erase Cycles Data Retention 10 Years 12 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual gt 48 pin TSOP type1 CPL package gt WPt signal Write protect entire device NAND FLASH circuit is shown in figure 2 7 U4 256MB_NandFlash NANDCLE 16 M EBI DO NANDALE 17 1 00 M_EBI_D1 NRD R41 OR g ALE 1 01 M_EBI_D2 NWE OR 18 1 02 M EBI D3 NANDCE 9 a 04 R45 470K 05 VODIOM NANDRDY R48 OR zl Ves 05 R50 ATK e D7 VDDIOM b 08 l O9 N C 4 O10 N C 7 117 R58 51 N O12
8. MYR Make Your Idea Real MYD SAM9X5 User Manual Based on ARM Cortex A5 processor MYD SAMA5D3X integrates all the chip functi ons and features The key features are as follows High performance architecture Based on the ARM Cortex A5 core with floating point unit the SAMA5D3 series is ideal for applications requiring high precision computing and fast data processing Features a 64 bit internal bus architecture and 32 bit wide DDR controller running up to 166 2 that offers up to 1328MB s of bandwidth Market leading low power consumption Ideal for battery operat ed applications the SAMA5D3 series consumes less than 200mW when running at maximum speed and under 0 5mW in low power mode Comprehensive peripheral set for connectivity and user interface applications Includes Gigabit and 10 100 1000 Ethernet up to three HS USB ports dual CAN three SDIO SD MMC UARTSs SPls TWIs soft modem LCD controller with graphics accelerator camera interface 12 bit ADC 32 bit timers and more State of the art security Includes secure boot Advanced Encryption Standard AES Triple Data Encryption Standard DES encryption engine Secure Hash Algorithm SHA and True Random Number Generator TRNG Low system cost 0 8mm ball pitch package reduces the design complexity A simple power management scheme and impedance matching on DDR lines reduce the need for external components Three USB ports save the cost
9. USB Host driver supports the mode of OHCI and USB Host EHCI transmission source code available USB Device USB Device Driver Gadget source code available Device Ethernet Ethernet driver source code available Drivers MMC SD MMC SD Card driver source code available Nand Flash Smart Media driver source code Nand Flash available 29 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual TWI I2C 2 driver source code available SPI SPI driver source code available WM8904 WM8904 Audio driver source code available LCD driver support 4 3 inch Scalable 7 inch source LCD Controller code available clock driver source code available 4 wire resistive touch screen driver source code Touch Screen available PWM pulse width modulation driver source code PWM available USART Serial port driver source code available LED driver including GPIO LED PWM LED driver LED source code available The buildroot file system support QT graphical System Files application source code available Table 4 1 4 3 Start Linux System 4 3 1 Install Download Tool Here use SAM BA v2 12 provided by Atmel it can find at DVD path 03 Tools SAM BA sam ba_2 12 exe specific installation method please refer to the document Tools SAM BA sam ba install pdf Install pack sam ba_2 12_patch4 exe afte
10. tula tomb icd 89 5 5 L USE Keyboard MI m 89 5 5 2 Browse Pict re Test m 90 5 5 3 Play A di 91 5 5 4 Ethernet TEST Q 92 a e 94 sz agam 95 Appendix 2 sales FAQ and technical support 98 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Chapter 1 Product Overview 1 1 Product Description MYIR has lunched MYD SAMA5D3X series boards which based on Atmel ATSAMASD3Xseries processor SAMA5D31 SAMA5D33 SAMA5D34 SAMA5D35 based on the ARM 5 kernel Running at up to 536 MHz MYD SAMA5D3X 256MB Nand Flash 4MB Data Flash 16bits 512MB DDR2 SDRAM and supports Linux 3 6 9 as well as Android 4 0 4 operating system which also provides relevant sources and have rich peripheral interfaces High speed USB2 0 Audio input Audio output LCD interface CAN interface JTAG debug interface Serial port and Micro SD card interface 1 2 Product Preview 5V Power ETHO ETH1 Telephone Debug Camera UART PW Switch JTAG Power LCD RS485 Touch CAN1 HDMI CANO Audio In USB Host x 2 Audio Out Mini USB MIC Battery EXT Interface USERKEY CS Boot NRST Wakup MMC SD Micro SD Figure 1 1 1 3 Product Features 1 MYIR TECH LIMITED www myirtech com
11. 6 FDA Mme 2 PB12 PWR MCI1 gt PB 95 6 i ace PB15 F PB 8 8 BN PB20 MCIl DAD lt APB20 5 e PBMC il a PBIS 10 2 UCIDA d Fai 1 8 PB25 zr 5 24 3 N 4 5 110 33 1 Figure 2 17 5 ISI interface circuit is shown in figure 2 18 J10 TSW 115 07 L D IS 4 ISI RST ZB RSTN 8 TWEI lt 29 5 PD3 vDDIOPoL R29 1 5 2 191 VSYNC ISI ESYNC Ma 6 s PC30 8 15100 Paiz SI Dl 0 ISI D2 1 PA19 1 S13 2 ISI D4 PA20 PA21 81 0 4 s gt gt 22 PA23 SLD 6 ISI D 29 28 lt ISI D10 PC27 PC26r amp Figure 2 18 19 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 2 3 6 Smart DAA Module SmartDAA Module is shown in figure 2 19 m o d pe 1 1 1 p H DAA CNO MBO SUS 72 82 BLAQIPG2219N10 3 V EINST Figure 2 19 2 3 7 Audio Module Audio Performance e 91dB SNR weighted 48kHz ADC e 96dB SNR weighted 48kHz DAC ADC and DAC Sampling Frequency 8kHz 96kHz 2 or 3 Wire MPU Serial Control Interface Programmable Audio Data interface Modes e 5 Left Right Justified or DSP e 16 20 24 32 bit Word Lengths Master or Slave Clocking Mode Stereo sound output and input The output a
12. 27 12 RXD0 RS232 amp 25 25 t T XD0 RS232 12 12 vos c PE23 24 23 lt vBAT 4 2 cie PE24 22 21 PE29 ZE RSTN gt PE29 w 9 PE25 20 19 PE3 0 ZB IROl INT ETEL Hd 12 PE28 Qo 18 PES 28 1800 eS 7 2 2 25 16 15 SPI1 MOSI PC23 i3 PC24 SPCK e RD 37 BB gt POM pc 1 10 BS 3 P lt TD Pos 8 PC20 RF m 16 6 PC 9 RK gt PC19 73 Pcie i EN C PC m 3 Baa L rem que ESW 110 33 L D 18 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 5V 3V3 12 TXD2 C C RXD2 13 12 RTS2 l C crs2 12 SPIO MOSI SPIO NPCS3 PC9 El MDIO 1 MDC 9 25 EL ELE pu i 6 2 PCS 0 ELTXO PCO PCI El TXI sw 00 POO a HDMILINT ISI DB PC29 ia 9 RE T HDMI PC31 PD31 PCKI ISI PD31 v3 PCKO PD30 PD29 VBUS SENSE x pp 1 D PD27 ENSV EDC gt 27 111 44 PD28 gt OVCUR USB PD28 PD25 ENSV mS PD25 11 n PDZ6 U 5019 lt PD 9 5 2 PD B gt 1 SUC LE CN emu ga ANRXO PD14 PD9 MCIO CK C 4 9 gt 072 Po eea 1 PD4 MCIO D3 202 E 9 8 PD 2
13. MYR Make Your Idea Real MYD SAM9X5 User Manual MYD SAMA5D3X User Manual Version V1 0 MYIR TECH LIMITED www myirtech com e MYR Make Your Idea Real MYD SAM9X5 User Manual Version History V1 0 Initial Version 2013 05 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Directory Chapter 1 Product OvervieW UU uQ 1 1 1 Product Description 1 1 2 Product Preview 1 1 3 roo edidic 1 1 4 Product Configuration 5 Chapter 2 Hardware Resource Introduction l T 6 2 1 CPU module Base Board Resources Overview 22 6 2 2 CPU module 3st eris 7 2 2 1 CPU module architecture and s retis oa bra inh ire ettari to oes 7 2 22 DDR2 SDRAM 8 2 2 S GIOCK GIGUN uu 9 284 Serial DATAFLASH te opti R 10 2 2 5 NORFLASH amp 44 00 11 226 EDS us sua TT ONDE rete 13 2 2 7 ETHERNET Module u 14 2 3 Base Board Introducltion U L eres Edid dE 14 2 3 1 Base Board Architecture amp power supply 14
14. MYR Make Your Idea Real MYD SAM9X5 User Manual sync 15 fsmount bin boot dev etc hellomyir home lib media mnt proc sbin sys tmp usr var 4 6 4 Regenerate UBIFS System File After modification it needs to regenerate file system by mkfs ubifs tool Enter the following command to generate a new UBIFS file system sudo mkfs ubifs fsmount m 2048 126976 c 2024 ubifs img mkfs ubifs Parameter Description r Establish the system file directory m Minimum I O transfer unit size e Logical size of erase block The largest number of erase logic blocks 0 Specify the output file View smallest transfer unit size and logical erase block size by the following command 3t ubinfo dev ubiO ubiO Volumes count 1 Logical eraseblock size 126976 bytes 124 0 KiB Total amount of logical eraseblocks 2048 260046848 bytes 248 0 MiB Amount of available logical eraseblocks 0 0 bytes Maximum count of volumes 128 Count of bad physical eraseblocks 0 Count of reserved physical eraseblocks 20 Current maximum erase counter value 1 Minimum input output unit size 2048 bytes Character device major minor 250 0 47 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Present volumes 0 View erase block number by using the following command ubinfo dev ubi0_0 Volume ID 0 on ubi0 Type dynamic Alignment 1 Size 2024 LEBs 256999424 bytes 245 1 MiB S
15. Y Y Y V V WV Support HDMI1 3 SimplayHD DVI1 0 protecol DVD AUDIO support 4xIIS input Support 2 channel 192HZ or 8 channel 96HZ Programmable DDC control system design Flexible interrupt register 72 pin QFN package 10x10mm Support ICE 60958 or ICE 61937 Support MDO MDIO management interface VCC core 1 2 V e vCCQ 3 3 V 2 5 V mot not von 909 Figure 2 23 MYD SAM9X5 User Manual RINRI RINRI RI are needed KS2StNLRAGL RINRI RITL RITE RIT C12 0125 are not needed 0Base T 100Base TX MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real HDMI Module interface circuit is shown in figure2 24 MYD SAM9X5 User Manual a an ET 2x 1 v HP TX ExT Sw m ar guno en Closet Chip EU l 2 EDMI Spec 4 8V lt pVDD5 lt 2 3 11 USART Module amp USART Module interface circuit is shown in figure 2 25 43 tJ Be as Figure 2 24 RUE 3 _ 2 TXDO RE222 Figure 2 25 25 M COUDE MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 2
16. buildroot login telnet_user Password 5 pwd home te lnet_user 4 19 After login board by telnet telenet_user make operations switch to super user by follow command su The current directory will change to root after this command Noted user cann t login by root authority directly the DVD provide telnent_user in Linux system for login by telenet 4 7 8 Mount NFS file system Noted here we build NFS server on Ubuntu as example 1 Build NFS server on Ubuntu D install nfs kernel server sudo apt get install nfs kernel server Add follow content at file end of etc exports The NFS directory is home jbo nfsdir this directory will be mount on clients home jbo nfsdir rw sync no root squash 3 Restart portmap and nfs kernel server 56 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual service portmap restart service nfs kernel server restart 2 mount NFS file system on board configure IP ifconfig eth0 192 168 1 166 Make directory mkdir nfs mount NFS file system The 5 server is 192 168 1 223 mount t nfs o nolock 192 168 1 223 nome jbo nfsdir nfs User can operate nfs s directory and the change modification will refect on NFS server home jbo nfsdir 4 7 9 RTC Use 1 Install button battery to board 2 System will set initial value at first start time so it needs to set the time after
17. red define MYD_KEY1 91 PIN PC26 define MYD KEY2 AT91 PIN PC27 static ssize t dev read struct file char buffer size t count loff t ppos int ret char value if count 1 return EINVAL value 0x30 value gpio get value PIN MYD KEY3 ret copy to user buffer amp value count return ret EFAULT 1 static ssize t dev write struct file filp const char buffer size t count loff t off 8 value if count 1 return EINVAL if copy from user amp value buffer count pr_err s failed to copy from usern func return EFAULT gpio set value PIN MYD LED2 value gt gt 0 amp 1 gpio set value PIN MYD LEDS value gt gt 1 amp 1 return 0 59 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual static int dev open struct inode inode struct file filp return 0 typedef struct int gpio int keyO count struct timer list timer gpio button data 15 TAB 102 HOME 103 UP 107 END 108 DOWN 139 MENU 158 BACK static gpio button data buttons PIN MYD 15 35 BACK HOME PIN MYD 2 15 35 BACK HOME PIN MYD 15 35 BACK HOME static void gpiokeys check unsigned long a 8 value int i int a if i lt 0 i 2sizeof buttons sizeof buttons 0 return value gpio get valu
18. 2 32 CAN uu sS una a 15 2 9 9 RS4BS 16 ZR E rds 17 2 3 5 SODIMM Et OE 17 2 3 6 Smart DAA Module T 20 m 20 238 y EE 21 2 3 9 ETHERNET ususqa tisa 23 2 3 10 HDMI 24 2 3 11 USART Module amp 222 2222 22 25 2 4 Jurriper Setting 26 Chapter MDK USC 27 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Chapter 4 Linux System Guide I UI asas sss suwssssasssswsswassssasssssawasssssssswsssa 28 28 4 2 S0ftware 29 4 3 Start LINUX 30 4 3 1 Install Download u uu 30 4 3 2 Gonmnecti Board ID 30 4 3 3 Automatic Download 32 4 3 4 Manual Download 32 4 4 Linux Development Environment Structure 41 4 5 Installation and Compile n nunus 41 4 5 1 Create a Working Directory erento tton ieri batis 41 4 5 2 Install Cross Compiler Tools sua 42 4 5 3 Install AT91 Bootstrap Source and
19. 3 RRS 8 RRE Figure 4 3 3 Connect J28 to PC by serial cable set up SerialTerminal Baud rate115200 data bit 8 no parity stop bit 1 no rts cts COM port number is set by actual situation 4 3 3 Automatic Download Note please pull out SD card before download otherwise an error may occur when programing After complete chapter 4 3 1 and 4 3 2 the board will be as a USB device by PC open CD ROM directory MYIR SAMA5D3X02 Images Linux image double click samabd3xek demo linux nandflash Then SAM will download Linux image automatically to board Entire download process takes ab out three minutes When pop logfile log file automatically reset board there will be Linux start information Linux use please refer to chapter 4 7 4 3 4 Manual Download Note please pull out SD card before download otherwise an error may occur 32 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Use SAM BA to download Linux manually 1 Complete chapter 4 3 1 and 4 3 2 open SAM BA to set corresponding parameters Connection is XX is each computer s COM port choose it by actual situation here selected COMS board select at91sama5d3x ek then click Connect specific settings and connected results are shown in figure 4 4 4 5 Select the connection USBserial COM4 Select your board at91sama5d3x ek m JLink speed default J
20. 529 0 5085258 OxE2695B1D 0x00300010 0 3401 951 OxE821DB10 Ox2CFF7AEB 0x819A7091 0x00300020 0x05B04910 OxD2D06583 OxBC4E4967 OxFB9BFO9D 0x00300030 0 80453184 OxFC2A8002 OxABASC4F6 0 055 5 6 n nnonnnan AwraAD 721 Aw ECADANTC AyDAZOTDrE m 3 DDRAM DataFlash ATASDB DCB EEPROM AT24 NandFlash NorFlash OTP One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File 3 Send File D SAMASD3X Linux image ulmagd Receive File Name Receive File 2 Assess For Receive File 01000 byte s Compare sent file with memory Scripts Send Boot File 2 Y Execute 27 12 1 Yo UXLOUUUU U F Send File D SAMA5D3X Linux image sama5d34ek dtb at address 0 180000 GENERIC SendFile D SAMA5D3X Linux image sama5d34ek dtb at address 0x180000 F File size 0x50F3 byte s Writing 0x50F3 bytes at 0x180000 buffer addr 0x2001052C 0x20000 bytes written by applet sam ba 2 12 1 3 Board at9lsama5d3x ek Figure 4 16 9 Download rootfs ubi to address 0x80000 Refer to figure 4 17 Note Select Enable OS PMECC parameters and click Execute to select Trimffst 40 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD S
21. C software ecc boot header configuration Number of sectors per page 4 54 Spare size 64 Number of ECC bits b Size of the ECC sector 1 C 1024 5 Compare sent file with memory Scripts Enable OS PMECC parameters lt i LUGUINY dL d uress UXZUUUUUUU F Memory Size 0x10000000 bytes F Buffer address 0x2001052C Buffer size 0x20000 bytes 1 Applet initialization done sam ba 2 12 1 NANDFLASH NandHeaderValue HEADER 0 0 00405 sam ba 2 12 1 96 Board at91sama5d3x ek Figure 4 8 8 Select Erase All in Scripts tab then click Execute format Nand Flash Refer to figure 4 9 35 MYIR TECH LIMITED www myirtech com Make Your Idea Real MYD SAM9X5 User Manual Script File 4 r at9lsama5d3x Memory Display Start Address 05300000 Refresh Size in byte s 400 0x00300000 0x00300010 0x00300020 0x00300030 n 0n02nnonan 0x00000004 Ox34D1A951 0x05B04910 0x804531B4 ascii C 8 bit C 16 bit 32 bit Ox50BCC529 0x5D85258F OxE2695B1D OxE821DB10 Ox2CFF7AEB 0x819A7091 OxD2D06583 OxBC4E4967 OxFBS9BFO9D OxFC2A8002 OxABASC4F6 0 055 5 6 DDRAM DataFlash AT45DB DCB EEPROM AT2
22. Figure 5 16 3 View picture the results are shown in figure 5 17 90 MYIR TECH LIMITED www myirtech com MYD SAM9X5 User Manual MYR Make Your Idea Real Figure 5 17 5 5 3 Play Audio Test s 1 Enter interface and Select Music icon Refer to figure 5 18 APPS WIDGETS a Browser Calculator Camera 918 F AndroidCalib Atmel E HelloM Y IR Tools Downloads Email Ethernet eo Jack OWL Messaging Settings Figure 5 18 2 Select Songs option Refer to figure 5 19 MYIR TECH LIMITED www myirtech com 91 MYR Make Your Idea Real MYD SAM9X5 User Manual Songs Honey Honey www 7765 com EIN xE www 7765 com O DU 06A00 le U mH Figure 5 19 3 Select a song to play As shown in figure 5 20 Figure 5 20 5 5 4 Ethernet Test 1 Enter interface and select icon Ethernet Refer to figure 5 21 92 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Ethernet configuration Ethernet Turn off Ethernet Ethernet configuration Configure Ethernet devices Figure 5 21 2 Configure Ethernet Select Dhcp to obtain dynamic IP Otherwise select Static IP manually to set IP address subnet mask DNS server default gateway Refer to figure 5 22 Configure Ethernet device Figure 5 22 3 After configure inpu
23. new high SD card at address aaaa 51 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual mmcbIk0 mmc1 aaaa SUO2G 1 84 GiB mmcblk0 p1 2 Mount and view SD card mount t vfat dev mmcblkOp1 media sdcard 15 media sdcard 360 LOST DIR duba 360Download Music iReader Android PicStore mm Audio QQ qqservicec log Backup QQBrowser scan txt BaiduMapSdk Qzone tencent BlackBerry RMS tmp DCIM Sounds wandoujia Download audio_play_list txt GT S3600C samsung bluetooth 3 Pull out SD card directly system will uninstall it automatically 4 7 4 Play MP3 Music Before playing music connect headphones or stereo to J11 U disk storages an mp3 music and is inserted into USB interface play music in U disk by mplayer command in terminal mount t vfat dev sda1 mnt 15 mnt madplay mnt Dangerous mp3 At this point it can hear music from headphones Terminal prints information as shown below enter Ctrl C to end playing music MPEG Audio Decoder 0 15 2 beta Copyright C 2000 2004 Robert Leslie et al 4 7 5 Network Port Test 52 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 1 The development board connected to a PC using crossover Ethernet cable through the super terminal for a development board configuration is not the IP address of the current local area network LAN other equipment takes up in this case use a
24. 00300010 Ox34D1A951 OxE821DB10 Ox2CFF7AEB 0x00300020 0 05 04910 OxD2D06583 OxBC4E4967 0 00300030 0x804531B4 OxFC2A8002 OxABASC4F6 n nn2nnnan Avwernzsantec OxE2695B1D 0x819A7091 0 055 5 6 D0 20vDrc m DDRAM DataFlash AT45DB DCB EEPROM 24 NandFlash NorFlash One wire EEPROM SRAM SerialFlash AT25 AT26 m Download Upload File Send File Receive File Address Size For Receive File 01000 byte s Ecc weh is 2 Ecc Status is 2 F Configure trimffs 0 PMECC c0902405 to be Configured Pmecc header configration successful PMECC configure c0902405 sam ba 2 12 1 96 Figure 5 9 5 Download boot bin Refer to figure 5 10 5 11 File Script File m at91sama5d3x Memory Display Start Address 0300000 PSPS Size in byte s 0100 ascii 8 bit 16 bit 32 bit 0 00300000 0 00000004 OxD0BCC129 Ox5D95058F 0 00300010 Ox34D1A951 0x6821DB10 Ox2CFF72EB 0 00300020 0x05B04910 OxDADO6183 OxFC4EC967 0 00300030 0x804431B4 OxFC2A8002 1 4 6 OxE2695B1D 0x819A7091 OxFB9BFOSD 0 055 5 6 gt
25. 3 tar gz cd qt embedded linux opensource src 4 5 3 Specify cross compiler Open the mkspecs QWS Linux arm g Conf vi mkspecs qws linux arm g 4 qmake conf After using vi qmake Conf enter the following command arm Linux all with a replacement for Arm none Linux gnueabi and add LTS then save changes are as follows modifications to g conf QMAKE CC arm linux gnueabi gcc lts QMAKE CXX arm linux gnueabi g Its QMAKE LINK arm linux gnueabi g lts QMAKE LINK SHLIB arm linux gnueabi g lts 3 Qt configuration configure prefix usr local qt4 5 3 arm xplatform qws linux arm g release opensource qt zlib qt libtiff qt libpng qt libmng qt libipeg make libs nomake docs embedded arm little endian qt freetype depths 8 16 24 qt gfx linuxfb gt kbd usb qt mouse pc qt mouse linuxtp qt mouse tslib qt sql sqlite gt3support l usr local tslib include L usr local tslib lib confirm license Perform configure help to see detailed descriptions of the parameters according to the need to configure the appropriate parameters Compile the installation make 73 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual sudo make install Set the environment variables Execute the following command at terminal export PATH PATH usr local qt4 5 3 arm bin export LD_LIBRARY_PATH LD_LIBRARY_PATH usr local qt4 5 3 arm lib Or add the abov
26. 3401 951 0x00300020 0x055804910 0x00300030 0 804531 4 ns npa nn C Display format C ascii C 8 bit C 16 bit 32 bit 0 50 529 OxE821DB10 OxD2D06583 OxFC2A8002 0 5085258 2 0 4 4967 OxABASC4F6 Aw er 2oanm OxE2695B1D 0x819A7091 OxFBSBFOSD 0 055 5 6 Applet traces on DBGU infos 7 Apply J DDRAM DataFlash AT45DB DCB 24 NorFlash OTP One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name Receive File Address 0x0 Size For Receive File 0x1000 byte s 5 5 Send File Compare sent file with memory Scripts Enable NandFlasho NANUPLASH UOCE F Loading applet applet nandflash sama5d3x bin at address 0x20000000 F Memory Size 0x10000000 bytes E Buffer address 0x2001052C F Buffer size 0x20000 bytes F Applet initialization done sam ba 2 12 1 Figure 4 7 34 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Select Enable OS PMECC parameters in Scripts tab and then click Execute S ettings refer to figure 4 8 Note do not select Trimffs 5 212 at91sama5d3x ek a
27. 4 Jumper Setting Table2 2 Jumper Setting Enable DataFlash on CPU ere lo Disable DataFlash CPU module module JP2 OFF Boot from external Memory Boot from ROM JP3 ON RXD1 signal connection RXD1 signal close JP4 ON CTS1 signal connection CTS1 signal close JP5 ON Power supply Power supply by SHDN signal JP6 ON VBAT power supply VBAT power close 1 2 pin VDDANA power suppl JP7 1 2 2 power SUPPY 2 3 pin VDDANA power supply 3V JP8 OFF J8 SD card write protect Disable J8 SD write protect UART2 output at J26 as 485 JP9 OFF SAN UART2 output at J3 as usart signal Table 2 2 26 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Chapter 3 MDK use MDK will in the subsequent version update to add the current version temporarily does not provide the MDK resources 27 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Chapter 4 Linux System Guide 4 1 Outline This chapter describes how to run Linux system and embedded Linux applications the process of drive development in MYD SAMA5D3X development board It includes the development environment to build compile source code image download and Linux application and driver example The default startup is that Nand Flash start the initial system Product is Linux system at the factory and the Nand Flash content distribution and s
28. ID Read Methodology Low Power Dissipation 7 mAActive Read Current Typical 15HADeep Power Down Current Typical Endurance 100 000 Program Erase Cycles Data Retention 20 Years Complies with Full industrial Temperature Range Industry Standard Green Pb Halide free RoHS Compliant Package Options 8 lead SOIC 200 mil wide 10 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual e 16 lead SOIC 300 mil wide Processor has two SPI SPIO controls data flash Refer to figure 2 5 VDDIOP1 VDDIOP1 PD11 SPIO MISO SPCK R70 Figure 2 5 2 2 5 NORFLASH amp NAND FLASH 1 16MB its characteristics are as follows Organization e Page size 128K Bytes 4Blocks top to bottom e Block size 32k Bytes Read Operation e Random Read 25 us Serial Access 25 ns gt Fast Write Cycle Time e Page Program time 200 us Typ e Block Erase Time 20 us Power e VCC core 1 7 V 2 0 V e I O 1 7 V 3 6 V Endurance 100 000 Program Erase Cycles Data Retention 10 Years NORFLASH circuit is shown in figure 2 6 11 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual U2 16MB_NorFLASH FLASH_A1 29 FLASH_A2 25 FLASH_A3 24 FLASH_A4 23 FLASH_A5 22 FLASH_A6 21 FLASH A7 20 FLASH 8 19 34 M EBI DO 36 M EBI D1 39 M EBI D2 41 M EBI D3 47 M D4 49 M
29. Ici RAS TDR RAS r SS 3 DOR WE 2 08 WE DDR WE 1 DOR 59 us 3 DOR gt unos 2 AA 0005 DAS vss ROS 47K Rio DOR gt H was 3 DOR 0052 gt mas vss ts SAN tas vss L Roe 4 7K L Riot 47 T m a is u 5 DOR DOMO LDM 3 DOM2 LOM SQ RFU1 RFU1 RFU2 RFU2 RFU3 RFU3 RFU4 RFU DDR2 SDRAM Figure 2 2 2 2 3 Clock Circuit 1 Internal clock choose 12 MHz crystal Clock Circuit is shown in figure 2 3 Figure 2 3 2 RTC clock chooses 32 768 KHz crystals Circuit is shown in figure 2 4 9 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual XIN32 XOUT32 Figure 2 4 2 2 4 Serial DATAFLASH 4MB DATAFLASH Its characteristics are as follows gt gt v Y WV Single 2 7V 3 6V Supply Serial Peripheral interface Compatible e Support SPI Modes 0 and 3 70 MHz Maximum Clock Frequency Flexible Uniform Erase Architecture e 4 Kbyte Blocks 32 Kbyte Blocks 64 Kbyte Blocks Full Chip Erase Individual Sector Protection with Global Protect Unprotect Feature e 64 Kbyte Physical Sectors Hardware Controlled Locking of Protected Sectors Flexible Programming e Byte Page Program 1 to 256 Bytes Automatic Checking and Reporting of Erase Program Failures JEDEC Standard Manufacture and Device
30. Install cd opt linux U boot tar xvjf u boot at91 tar bz2 cd u boot at91 2 Compile make distclean make sama5d3xeknf_512MB_ config make U boot bin is U boot file that we download in u boot at91 directory 4 5 5 Install and Compile Linux kernel Source Code 1 Install cd opt linux Linux at91 tar xvjf linux at91 tar bz2 cd linux at91 2 Compile export ARCH arm make samabd3 defconfig make sudo apt get install uboot mkimage make ulmage make dtbs After compile kernel ulmage file in arch arm boot directory is Linux image files that we need sama5d31ek dtb sama5d33ek dtb sama5d34ek dtb sama5d35ek dtb is Linux device tree image file what we need 4 5 6 Install and Compile Linux File System 43 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 1 Install cd opt linux Buildroot at91 tar xvjf buildroot at91 tar bz2 cd buildroot at91 2 Compile sudo apt get install flex bison texinfo unzip gettext sudo apt get install g xz utils cp buildroot config config make takes long time to compile kernel rootfs ubi in arch arm boot directory is Linux file system that we need 4 6 Make Linux File System rootfs ubi can be made a simple formulation and revision in system file provided by CD Here take hellomyir for an example add an application to file system root directory show the detailed steps of making
31. Make Your Idea Real MYD SAM9X5 User Manual 57 4 8 Linux Driver Development Examples eene 57 2 5 T Hardware c ehh Pa wo d debat a 58 48 2 Driver Source God s uu 58 48 3 Compile the Driver uu 65 4 9 Application Development Instance aa 66 4 9 1 Download Driver into Board L rrt saa 66 Z9 2 DIO TEST S rco rtv retento 67 4 10 Qtuse D 67 4 10 1 Using the Qt cross compiler tool chain sees 67 4 10 2 Qt development environment see 71 Chapter 5 Android System Guide U uuu u uu uuu u 76 Ma i o cttw 76 2000 77 5 3 Build Android System 78 5 3 1 Install Download 78 5 3 2 Connect Board and 78 5 3 3 Automatic Download 79 5 3 4 Manual Download U 79 5 4 Compile Android System Files eese eene 87 5 4 1 Android System Principle Ee D eter 87 5 4 2 Compile System PIIBS cout tie In Serb ei 88 5 5 Android LSE
32. SAMA5D33 SAMA5D34 1 SAMA5D35 10 100 10 100 1000 10 100 1000 M Dual Ethernet LED Indicator gt APower Indicator CPU module Red gt A Users Light System Heartbeat Light CPU module Blue APower Indicator Base Board Red MYIR TECH LIMITED www myirtech com Make Your Idea Real 1 4 Product Configuration MYD SAMA5D3X Development Board 2 1 5Meters Crossover Cable 3 1 5 Meters Mini USB 2 0 Cable 1 4 5V 2A DC Power adapter 5 3V Button Batteries Serial Cable DB9 To DB9 9pins 7 Product DVD 8 4 3 Inch LCD Touch Screen MYD SAM9X5 User Manual Base Board CPU module Include Schematic PDF User Manual Source Code etc optional MYIR TECH LIMITED www myirtech com Make Your Idea Real MYD SAM9X5 User Manual Chapter 2 Hardware Resource Introduction 2 1 CPU module Base Board Resources Overview SAMA5D3X resources are shown in table2 1 Processor Atmel SAMA5D31 5D33 5D34 5D35 ARM Cortex A5 core Frequency at up to 536 2 Memory 512MB DDR2 SDRAM Flash 256MB Nand Flash 4MB Data Flash 16MB NorFlash 16 Bits USB HOST 2 2 2 USB Mini USB Host Device Audio Input Audio MIC Input Audio Output ETH 10 100M Ethernet Port Network ETH 1000M Ethernet Port DBGU Serial Serial USART1 JTAG JTAG Interface Support 4 3 Inch LCD
33. cannot check Trimffs Refer to figure 5 8 SAM BA212 l s Applet traces DBGU pmecc C software ecc ecc infos Apply boot header configuration 2695B1D 1947091 Number of sectors page j bd Spare size B uc B9BFO9D Number of ECC bits NN DSSASBC6 P Size of the sector T C 1024 i One wire EEPROM SRAM SerialFlash AT25 AT26 sean Receive File Address 0x0 Size For Receive File 0x1000 byte s Compare sent file with memory Scripts Enable OS PMECC parameters M ir LUGUINY appiet d uress UXZUUUUUUU Memory Size 0 10000000 bytes Buffer address 0x2001052C Buffer size 0 20000 bytes F Applet initialization done sam ba 2 12 1 NANDFLASH NandHeaderValue HEADER 0 0 00405 sam ba 2 12 1 USBserial COM4 Board at91sama5d3x ek gure 5 8 4 Select Erase All in Scripts tab and then click Execute Refer to figure 5 9 82 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Script File Hap m at91sama5d3x Memory Display Start Addi 0300000 Refresh Display format Size byte s 0400 ascii 8 bit 16 bit 32 bit 0 00300000 0 00000004 5 529 0 5085258 0
34. gnueabihf 4 7 2013 04 20130415 linux bin 2 Set the environment variable Qt application development Execute the following command at terminal export PATH PATH usr local qt4 5 3 arm bin export LD LIBRARY PATH LD LIBRARY PATH usr local qt4 5 3 arm lib Or add the above command to the etc profile file so set these environment variables automatically when system login 3 Burning Qt library image Reference 4 3 3 automatically download or 4 3 4 manually download to burning CD 02 Im ages Linux Qt Arm directory of Images the Images in the directory has been set for Qt runtime environment and already contains the Qt application runtime Commonly used libraries supported by the function modules as shown in table 4 2 If the features provided by the mirror can t meet the actual demand Please refer to the next section 4 10 2 cross compilation Qt development environment from the source code to configure the required function modules 4 Compile Qt and run the application There are several Qt sample program in 05 Linux Source Qt Arm Qt Examples in here Masterdetail for example using Qt cross compilation toolchain compile Qt application methods and run on the target board D Copy the sample program to Qt arm qt arm cp media cdrom 05 Linux Source Qt Arm Qt Examples masterdetail tar gz 70 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual tar xvzf masterdetail tar gz cd masterde
35. own working directory 3t mkdir opt linux cd opt linux 41 MYIR TECH LIMITED www myirtech com M iR Make Your Idea Real MYD SAM9X5 User Manual cp r media cdrom 05 Linux Source 4 5 2 Install Cross Compiler Tools Decompress cross compiler tool chain sudo apt get install build essential git libncurses5 dev u boot tools sudo apt get install flex bison texinfo zip unzip zlib1g dev gettext sudo apt get install libsdl dev libesdO dev libwxgtk2 6 dev cp media cdrom 03 Tools Cross compiler gcc linaro arm linux gnueabihf 4 7 2013 04 20130415 linux tar bz2 sudo tar xf gcc linaro arm linux gnueabihf 4 7 2013 04 20130415 linux tar bz2 C opt export ARCH arm export CROSS COMPILE opt gcc linaro arm linux gnueabihf 4 7 2013 04 20130415 linux bin arm linux gnueabihf 4 5 3 Install AT91Bootstrap Source and Compile 1 Install cd opt linux Bootstrap tar xvjf at91bootstrap tar bz2 cd at91bootstrap 2 Compile make mrproper make at91samabd3xeknf uboot defconfig make At91SAMA5D3Xek Nand Flashboot 3 1 bin in binary directory is AT91Bootstrap file Rename it to boot bin for automatic download AT91Bootstrap is a boot loader for ATMEL chip which initialize necessary hardware GPIO Clock SDRAM etc then copy uboot to SDRAM to run 42 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 4 5 4 Install uboot Source and Compile 1
36. tel file C Program Files Atmel sam ba_2 12 SAN BA exe main tcl line 6 It may be another SAM BA is running Stop SAM BA in task manager and then download it again 97 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Appendix 2 sales FAQ and technical support How to buy We accept paypal payment and bank wire transfer 1 Paypal payment Please select the products add into shopping cart the checkout web page will redirect to paypal com for you payment Shipment fee will calculated automatically by your location region 2 Bank wire transfer Please email or fax us with products list you want we will send you a pro invoice with order value total shipping cost and bank information Shipping details Please select the shipping area catalogue for you location If you have carrier account to pay the shipment fee please select Freight collect and email us the carrier account Please visit http www myirtech com support asp for more details Noted 1 The shipment will start in 3 biz days by Fedex Express it usually take 7 days to reach regular cities or regions 2 We will use DHL Express for West asia or middle east countries it usually take 7 days to reach regular cities or regions 3 The remote regions defined by Fedex DHL may cause delay 14 days in generally 4 Some countries have strict import policy we will help to make shipping invoice with you requirement like in
37. ttl 128 time 0 357 ms 64 bytes from 192 168 0 3 seq 3 ttl 128 time 0 359 ms 53 MYIR TECH LIMITED www myirtech com M iR Make Your Idea Real MYD SAM9X5 User Manual 64 bytes from 192 168 0 3 seq 4 128 time 0 447 ms 4 7 6 Telnet Test 1 Configure IP address ifconfig ethO 192 168 1 2 up 2 Configure Gateway Test connection with the gateway as follows ping 192 168 1 1 PING 192 168 1 1 192 168 1 1 56 data bytes 64 bytes from 192 168 1 1 seq 0 ttl 64 time 16 455 ms 64 bytes from 192 168 1 1 seq 1 ttl 64 time 2 391 ms 64 bytes from 192 168 1 1 seq 2 ttl 64 time 3 924 ms 64 bytes from 192 168 1 1 seq 3 ttl 64 time 2 254 ms 64 bytes from 192 168 1 1 seq 4 ttl 64 time 2 005 ms 3 Set 192 168 0 1 as the default gateway route add default gw 192 168 0 1 Test connection with 202 112 17 137 ping 202 112 17 137 PING 202 112 17 137 202 112 17 137 56 data bytes 64 bytes from 202 112 17 137 seq 0 ttl 54 time 32 202 ms 64 bytes from 202 112 17 137 seq 1 ttl 54 time 24 457 ms 64 bytes from 202 112 17 137 seq 2 ttl 54 time 22 918 ms 64 bytes from 202 112 17 137 seq 3 ttl 54 time 23 178 ms 64 bytes from 202 112 17 137 seq 4 ttl 54 time 29 341 ms 4 Configure DNS server View current DNS server address by ipconfig all command machine DNS is 202 103 24 68 Set target board s DNS depend on the circumstances echo nameserver 202 103 24 68 tee etc resolv conf Ping www baidu com to test extr
38. 200312 23PM DTBFi 4 11 200312 23PM DTBFi 4 11 200312 23PM DTBFi 4 11 201312 23PM DTBFi 4 11 200312 23PM DTB Fi sama5d34ek pda dtb 1223PM DTBFi r i Efasilig DIOCKS VALCI Erasing blocks batch 5 Erasing blocks batch 6 Erasing blocks batch 7 sam ba_2 12 1 NANDFLASH SendBootFilePmecc Sending boot file done sam ba_2 12 1 85 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Figure 5 14 9 Download Linux kernel ulmage to 0x0020 0000 Refer to figure 5 15 Look in Android 4 0 4 r2 1 sama5d3xnandboot Q Name logfile 6 7 2013 7 31PM Te D Size in byte s 0400 samaSd31 ek dtb 4 11 20131223 DTB Fi _ samaSd31 ek pda dtb 4 11 20131223 DTB Fi sama5d33ek dtb 4 11 2013 12 23 DTB Fi 000300010 sama5d33ek 4 11 20131223PM DTB Fi 0x00300020 3 4 11 2013 12 23PM DTB Fi 0 00300030 T 4 11 2013 12 23 DTB Fi ibrari 4 11 20131223 DITBFi system_ubifs SAMA5D3 ANDROID 4 0 4_ 4 11 2013 545 Disc In TempWmicBatchFile 6 3 2013 3 28 PM Windo ulmac 4 11 2013 12 21 PM File userdata ubifs SAMASD3 ANDROID 40 4 11 2013 5 45 PM Disc In Send Boot File Pm Execute U F Sen
39. 2c second id byte 0xda third id 0 90 fourth id 0 95 45 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual If executed successfully there will be mtd0 and mtd0r0 devices in dev directory Is dev mtd dev mtdO dev mtdOro 2 Erase mtdO partition the operation is as follows sudo flash eraseall dev mtdO Erasing 128 Kibyte ffe0000 100 complete 3 Load rootfs ubi to new mtdO partition Here used dd command to load as follows sudo dd if rootfs ubi of dev mtd0 94976 0 records in 94976 0 records out 48627712 bytes 49 MB copied 0 73911s 65 8MB s 4 Mount UBIFS system file After completing the above step load ubi modules and attach to mtd0 mount UBIFS file system like mounting ordinary mtd device Load ubi modules and attach to mtd0 equipment sudo modprobe ubi mtd 0 2048 Create a new mount point mkdir fsmount Mount it by the following command sudo mount t ubifs ubiO 0 fsmount 15 fsmount bin boot dev etc home lib media mnt proc sbin sys tmp usr var Now that mount UBIFS file system is successful 4 6 3 Modify UBIFS System Files After mount UBIFS file system successfully it can modify file contents such as add delete and modify files It should add compiled demo program helloworld to system root directory The operation is as follows sudo cp hellomyir fsmount 46 MYIR TECH LIMITED www myirtech com
40. 4 NandFlash NorFlash OTP One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name Receive File Address Size For Receive File 0 1000 byte s Compare sent file with memory 2 12 1 Yo INANUrFLAS5HR INalrlt ried uer vdlue MEAVER UXCUCUUSUD Ecc type is 2 Ecc Status is 2 F Configure trimffs 0 c0902405 to be Configured header configration successful F PMECC configure c0902405 sam ba_2 12 1 Figure 4 9 Download boot bin Refer to figure 4 10 and 4 11 File Script File Help at91sama5d3x Memory Display Start Address 0300000 Refresh Size in byte s ascii C 8 bit C 16 bit 32 bit 0x00300000 0 00000004 0 50 529 0 5085258 0 2695 1 0 00300010 0x34D1A951 0 821 10 Ox2CFF7AEB 0x819A7091 0x00300020 0x05B04910 OxD2D06583 OxBC4E4967 OxFBS9SBFOSD 0x00300030 0x804531B4 OxFC2A8002 OxABASC4F6 0 055 5 6 n nn onnnan lt la DDRAM DataFlash ATASDB DCB EEPROM 24 NorFlash OTP One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Receive File Name Address 50 Size For Receive File 04000 byte s
41. 5d34ek dtb at address 0x180000 GENERIC SendFile D SAMA5D3X Linux image sama5d34ek dtb at address 0x180000 F File size 0x50F3 byte s F Writing 0x50F3 bytes at 0x180000 buffer addr 0 2001052 F 0x20000 bytes written by applet sam ba_2 12 1 Board at91sama5d3x ek Figure 4 14 Download linux kernel ulmage to 0x0020 0000 Refer to figure 4 15 figure 4 16 Lookin j Linuximage Name Date modified rootfs ubi 6 6 2013 10 57 AM UBI Fil sama5d3x demo linux nandflash tcl 5 28 2013 11 15 AM TCL Fil 3 sama5d3xek demo linux nandflash 1 31 2013 9 47 Windo sama5d3xek_demo_linux_nandflash tcl 1 31 2013 9 47 AM TCL Fil 1 sama5Sd31ek dtb 1 31 2013 947 DTBFi sama5d33ek dtb 1 31 2013 9 47 AM DTBFi sama5d34ek dtb 5 28 2031219 PM DTBFi sama5d35ek dtb 1 31 2013 9 47 AM DTBFi 5 TempWmicBatchFile 6 14 2013 9 42 AM Windo u boot bin 5 28 2013 7 14 AM BIN Fil ubootEnvtFileNandFlash bin 6 14 2013 9 42 BINFil ulmag 6 5 201311 38 AM File 4 Figure 4 15 39 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual File Script File m at91sama5d3x Memory Display Start Address 0300000 Refresh Display format HAEC taces DEGUT Size in byte s 100 ascii C 8 bit C 16 bit 32 bit mos Apply 0x00300000 0 00000004 0 508
42. AM9X5 User Manual r Br SAMBA 2 12 tS _ kam File at91sam Applet traces on DBGU Start Ad Iz 32 bit infos Apply Size in b mam Avot DxE2695B1D E Number of sectors page 4 Dx819A7091 Sparesize 64 DxFB9BF09D Number of ECC bits require DxO55ASBC6 Size of the secto 512 1024 2 Ecc 5 Cancel 6 Receive Receive File 1 Address 0 800000 Size For Receive File 0x1000 byte s Compare sent file with memory Scripts Enable OS PMECC parameters m B UXZUUUU Written Uy Writing 0 20000 bytes at 0x4A0000 buffer addr 0x2001052C 0x20000 bytes written by applet Writing 0 1 5 8 bytes at 0x4C0000 buffer addr 0x2001052C 0x1F5A8 bytes written applet sam ba_2 12 1 NANDFLASH NandHeaderValue HEADER 0 0 00405 sam ba_2 12 1 r AUSBseriaN COM4 Board 915 543 Figure 4 17 3 Finally restart board to boot Linux system normally Linux use please refer to chapter 4 7 4 4 Linux Development Environment Structure The contents of this chapter please refer to description VirtualBox s Linux based development environment to build pdf 4 5 Installation and Compile 4 5 1 Create a Working Directory Linux in the working directory and CD of the copy of the folder on the opt linux the user can also customize your
43. D3x Linuxcimage u boot bi Receive se re Aqar s 040000 size For Receive File 01000 NH Compare sent file with memory Scripts Send Boot Files E DOLCI I Erasing blocks batch 5 F Erasing blocks batch 6 F Erasing blocks batch 7 sam ba 2 12 1 NANDFLASH SendBootFilePmecc Sending boot file done sam ba 2 12 1 96 Figure 5 12 84 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 7 Download ubootEnvtFileNand Flash bin to 0x000C 0000 Refer to figure 5 13 File Script File Help 0 00300000 0 00300010 0 00300020 0 00300030 n nn2nnnan 1 lt 543 Memory Display Start Address 0300000 Refresh a Size in byte s 05400 0x00000004 0x34D1A951 0x05B04910 0x804531B4 ascii C 8 bit 16 bit 32 bit 0 50 529 OxE821DB10 0 02006583 OxFC2A8002 A 02202334 Ox5D85258F Ox2CFF7AEB OxBC4E4967 OxABASC4F6 A O 022407t OxE2695B1D 0x819A7091 OxFB9BFO9D 0 055 5 6 J DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash NorFlash p Download Upload File Sue For Receive l0 tet OTP One wire EEPROM SRAM SerialFlash AT25 AT26 Scripts Execute
44. LUES 1 B LCDDAT3 fu 8 5 LCDDAT4 RR1 BLUES RRIOB LCDDATS 5 2 Fi LCDDAT6 10 _ 3 AYAYAY 6 BLUES T 4 RRIOD LCDDAT7 H i LCDDAT8 RRID 5 4 GREEN 1 6 RRMC LCDDATS 5 LCDDAT10 1 7 2 GREEN2 1 8 LCDDAT11 5 DAE ee LCDDATI2 RRI2A 1 EVN 8 GREEN 15 fW Y YT 2 RRI2B LCDDATI3 i DA do LCDDATI4 RR C 3 6 GREENS 7 GREENT 4 RR12D LCDDATIS 9 8 LCDDAT16 RR13B 5 4 REDO 23 RED 6 RR13C LCDDAT17 8 LCDDATIB RRID 7 9 2 RED2 25 RED3 1 8 RRI3A LCDDATIS i LCDDAT20 RRIJA 1 GAY Y B 7 RED4 2 REDS 1 7 AYAC 2 RRMB LCDDAT2I Hj ia LCDDAT22 RR1 REDS 9 RED 2 4 LCDDAT23 Hi 00 BL CN R 80 LCDPWM RESET R91 27R RESET DISP 27R R92 LCDDISP 12 INT R93 278 BH 278 894 GPIO TWCK0 278 3 278 9 R96 TWO lt 79 BH VOEN 8 T RR SA LCDDEN E pa LCDVSYNCRRISB 2 Pr 00 HSYNC 6 3 448 LCDHSYNC 9 9 PAD RRI5D 4 5 3 58 9 9 NM AD2 YP RRID 5 TP XR 4 gg TP XL 3 6 RRI6C AD3 YM lt gt 023 ADI XM RRI B 7 2 PYD 1 TEU 1 B RRI6A 200 XP PD21 gt ADSIR RI 278 5 00 lt gt PD20 2024 S 27 d ESW 120334 0 PD19 R98 NP 7 0 Figure 2 15 2 interface circuit is shown figure 2 16 5V 3V3 J3 12 TXD2 C RXD2 42 12 RTS2 CJ crs2 2 ESW 110 33 L D Figure 2 16 3 User interface circuit is shown in figure 2 17 5V 3V3 2 30 29 28
45. Link TimeoutMultiplier o Y Customize lowlevel Script File Help at91sama5d3x Memory Display Display format Applet traces on DBGU Start Address 0 300000 Refresh Size in byte s 0400 C ascii C 8 bit 16 bit 32 bit El Apply 0 00300000 0 00000004 0 50 529 Ox5D85258F 0 2695 1 0 00300010 Ox34D1A951 OxE821DB10 Ox2CFF7AEB 0x819A7091 0x00300020 0 05 04910 0 02006583 OxBC4E4967 OxFB9BFO9D 0x00300030 0x804531B4 OxFC2A8002 OxABASC4F6 0 055 5 6 Awernzante DDRAM DataFlash AT45DB DCB EEPROM 24 NandFlash NorFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Send File Receive File I Receive File Address Size For Receive File 0 1000 byte s Compare sent file with memory I Scripts Enable Serialflash SPIO CS0 m Execute loading history file 0 events added SAM BA console display active Tcl8 5 9 Tk8 5 9 sam ba 2 12 1 96 sam ba 2 12 1 NUSBseriaNCOMM Board at91sama5d3x ek Figure 4 5 2 Click Nand Flash tab and execute Enable Nand Flash Erase All Enable OS PMECC parameters in Scripts tab select an action and click next to Execute execution When Execute Enable OS PMECC Pop up dialog box click OK to use the default se
46. Linux Qt Arm CD catalogue 1 Establish a working directory cd mkdir qt arm cd qt arm 2 Compile tslib installation Unzip cp media cdrom 05 Linux_Source tslib tar gz tar xvzf tslib tar gz cd tslib 2 Compile installation If you haven t added the arm none Linux gnueabi cross compiler PATH to the PATH to look over the PATH Added to the PATH this article USES the cross compiler PATH is usr local GCC linaro arm inux linux gnueabihf 4 7 2013 04 20130415 bin perform the following command export PATH PATH opt gcc linaro arm linux gnueabihf 4 7 2013 04 20130415 linux bin Install automake libtool first two tools sudo apt get install automake libtool Configuration tslib installation path can set themselves up to usr local tslib installation autogen sh configure CC arm linux gnueabi gcc CXX arm linux gnueabi g prefix usr local tslib host arm linux func malloc 0 nonnullzyes Compile the installation make 72 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual sudo make install After installing the tslib to tslib etc ts The conf file the second line module raw input annotation into module raw input attention must thus 3 Compile install qt embedded D Unzip cp media cdrom 05 Linux Source Qt Arm Qt Source gt embedded linux opensource rc 4 5 3 tar gz tar xvzf qt embedded linux opensource src 4 5
47. M1 It indicates that port isn t right as above I argv 0 N USBserial COMS but connections list is E Connection list N USBserial COM13 COM which shows native port is COM13 not and it needs to modify COM port Note COM port is that your host use Q2 Download system successfully but can not start system Analysis and Answers If insert SD card to board system may not start For example download LINUX system if insert SD card to board HyperTerminal display the following error message Pulling out SD card can resolves the problem Q4 Automatic download for a long time HyperTerminal did not continue to output download information Analysis and Answers This may be stuck in automatic download process It can end sam ba exe process in task manager and then restart download If start SAM BA v2 11 Click Connect and pops up the following window when in automatic download 96 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Error in startup script Error h handle returned zero while executing TCL target connection invoked from within if 22 2 puts Retrieved arguments from command line puts I argv lindex argv 017 puts I argv 1 linde file C Program Files Atmel sam ba_2 12 sam ba exe lib tkcon tcl line 4924 invoked from within source file join starkit topdir lib tkcon
48. N C DNP 31 N 1013 VO14_N C l O15 N C 10 VDDIOM tN vcc 15 zg VCC_N C 23 N VCC_N C 51 _le 52 24 100nF T 100nF 35 21 22 38 Figure 2 7 2 2 6 LED System LED and User LED circuits are as shown in figure 2 8 3 7 PED3 31 Figure 2 8 13 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 2 2 7 ETHERNET Module ETHERNET s characteristics are as follows gt Single chip 10 100 1000Mbps IEEE compliant Transceiver RGMII1 3 Interface support 25MHZ crystal is used to generate all required clocks Power down and power saving modes MDO MDIO Management Interface 48 pin bmm x 5mm QFN package Vv Vv Y VY V WV Power supply e VCC core 1 2 V e VCCQ I O 3 3 V 2 5 V ETHERNET Module is shown in figure 2 9 AVDOL_PLL s C94 s css Tone 4 id 880 ZR Sus ms t RB3 12 1K 1 Leg dig R90 R95 R95 R97 ATKETKETKLTIKSSSS ties 10 100 1000M 75 48 pinQFN ats Figure 2 9 2 3 Base Board Introduction 2 3 1 Base Board Architecture amp power supply 1 Device power supply is shown in figure 2 10 14 MYIR TECH LIMITED www myirtech com MYR Make Your Id
49. TED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Graphics qt linuxfb multiscreen linuxfb Graphics plugin Decorations qt styled windows default Decorations plugin Keyboard driver qt tty usb Keyboard driver plugin Mouse driver qt pc linuxtp pc linuxtp tslib Mouse driver plugin OpenGL support no SQLite support qt qt 1 Install Qt cross compile tools to system set up under the usr local directory of Qt arm work directory copy Qt cross compile tools to this directory and unzip the mkdir qt arm cd qt arm cp media cdrom 05 Linux Source Qt Arm Qt 4 5 3 Tslib 1 4 tar gz sudo tar xvzf Qt 4 5 3 Tslib 1 4 tar gz C usr local Decompression is completed usr local directory will be more than two directories 69 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual qt4 5 3 arm and tslib including qt4 5 3 arm directory contains cross compilation Qt application use of tools libraries and header files etc Tslib test program directory contains the touch screen used link libraries configuration files etc 2 set the system environment variable D If you haven t added the arm Linux gnueabi PATH to the PATH of cross compiler this article USES the cross compiler PATH is usr local gcc linaro arm linux gnueabihf 4 7 2013 04 20130415 linux bin execute the following command export PATH PATH opt gcc linaro arm linux
50. Touch Screen RTC Real Time Clock On 6 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Board and backup battery 20 Pins User Extended Interface Extended 30 Pins User Interface Extended Interface 60 Pins User Extended Interface Power 5V Power Input 1 1 1 1 SD Card Micro SD Interface 1 1 1 1 SD MMC SD MNC Interface 1 1 1 1 Interface 0 0 2 2 RS485 RS485 Interface 1 1 1 1 User Button 1 1 1 1 Button System Button 3 3 3 3 Table 2 1 2 2 CPU module Introduction 2 2 1 CPU module architecture and CPU 1 CPU module architecture is shown in figure 2 1 7 MYIR TECH LIMITED www myirtech com Make Your Idea Real MYD SAM9X5 User Manual COM1 or On Board JTAG DBGU R 232 USB H Device Figure 2 1 2 CPU Audio Audio Out Modem In 211 NA LCD Part 2 The Atmel SAMA5D3 series is a high performance power efficient embedeed MPU based on the ARM Cortex A5 processor achieve 536MHZ with power consumption levels below 0 5mW in low power mode The device features a flexible size instruction and data caches memory management unit MMU and Floating Point Unit FPU The Cortex A5 processer implements the ARMv7 VFPv4 D16 architecture and runs 32 bits ARM instructions 16 bits Thumb instructions and 8 bit Java byte codes in Jaz
51. anet access 5 Use Telnet access to the BBS 54 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual telnet bbs scut edu cn BBS 1 10 15 0 00 0 00 0 00 Entering character mode Escape character is AX KK DK P lt DK DK X lt X lt lt DK X lt X lt X lt X lt X lt X lt X lt lt X lt X lt P lt lt X lt XXK Ke XK WATE X h HAE MEHREN CERNET 4E Bj Hi X Pal ri ry DX HEL bbs gznet edu cn 202 112 17 137 Warmly Welcome to Bulletin Board Service BBS of CERNET Southern Regional Center o O If you have any problems please send email to scutbbs scut edu cn CERNET H 01 BBS 1 Add after YourlD to login for BIG5 E35 9 25000 A Xiao 12970 UH TERN Telnet test successfully 4 7 7 Login board via telnetd 1 Configure IP ifconfig ethO 192 168 1 166 2 Start telenet service telnetd 3 Login board by telenet client Use telenet in windows telenet is available when adding system copments in Win7 as example type command as follows telnet 192 168 1 166 55 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Enter user name telenet user password telenet as diagram 4 19 show rum n Telnet 192 168 1 166
52. ars interface Refer to figure 5 5 Select the connection USBserial COM4 Select your board at91sama5d3x ek JLink speed default TimeoutMultiplier Customize lowlevel Connect Exit Figure 5 5 Click Connect to enter interface Refer to figure 5 6 80 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 0 00300000 0 00300010 0 00300020 0 00300030 n nnonnnan 0x00000004 Ox34D1A951 0 05 04910 0x804431B4 C ascii 8 bit 16 bit 32 bit Start Address 0300000 Refresh Size in byte s 0 100 OxDOBCC129 0x6821DB10 OxDAD06183 OxFC2A8002 0 5095058 OxE2695B1D Ox2CFF72EB 0x819A7091 OxFC4EC967 OxFB9BF09D 1 4 6 0 055 5 6 Acca 2Anntc lt m DDRAM DataFlash ATASDB DCB EEPROM AT24 NandFlash NorFlash OTP One wire EEPROM SRAM SerialFlash AT25 AT26 r Download Upload File Send File Name Receive File Address 6 0 Size For Receive File 61000 byte s Compare sent file with memory Scripts Enable Serialflash 5 50 Execute loading history file 0 events added SAM BA console display active Tcl8 5 9 Tk8 5 9 Figure 5 6 2 Select Nand Flash tab Enab
53. build and run Android 4 0 4 system in MYD SAMA5D3 X platform include the following main content 1 Build Android system 2 Compile Android 9 Android System use 5 2 Software Resources Software resources are shown in table 5 1 AT91Bootstrap Use to guide Uboot 1 Support Nand Flash Erase read and write Boot 2 Support network to download image program Uboot 3 Support settings save the environment variable 4 Support display contrast modify memory content 5 Support the bootm bootargs settings Develop Linux kernel for MYD SAMA5D3X Linux Kernel Linux 3 6 9 hardware Network port ETHO driver Serial port driver USART1 DBGU Device USB USB HOST 2 USB OTG Drivers SD card driver Micro SD SDCard LCD touch LCD driver GPIO driver Have been tested to provide the source System Files Android System Files Have been tested to provide binary image file Table 5 1 77 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 5 3 Build Android System This chapter describes how to use image to build Android system 5 3 1 Install Download Tool Install Atmel ISP download software SAM BA 2 12 or later Note If install SAM BA 2 11 and earlier versions it needs to first uninstall the all SAM BA and USB driver If need two or more SAM BA version coexistence different SAM BA versions use different USB interface 5 3 2 Connect Board a
54. buttons i key1 setup timer amp buttons i timer gpiokeys check unsigned long i gpio request check PIN MYD LED2 LED2 gpio request check PIN MYD LED3 gpio direction output PIN MYD_LED2 1 gpio direction output PIN MYD LEDS 1 ret input register device dev input if ret info error register input device d n ret input free device dev input return ret return misc register amp misc This function implements the exit function of the device y 64 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual static void _ exit gpiokeys exit void int i gpio free PIN MYD LED2 gpio free PIN MYD LED3 input unregister device dev input for i20 i sizeof buttons sizeof buttons 0 i int gpio buttons i gpio int irq gpio to irq gpio free irq irq void i del timer sync amp buttons i timer gpio free gpio misc_deregister amp misc module init gpiokeys init module exit gpiokeys exit MODULE LICENSE GPL MODULE AUTHOR Sherwin lee MODULE DESCRIPTION MYD SAMAGSDS gpiokeys device driver 4 8 3 Compile the Driver 1 After Install and Compile Linux kernel Source Code Modify Makefile s KDIR point to the linux source path Here is opt linux Linux at91 linux at91 cd opt linux gpio source tar xvjf gpioleds tar bz2 65 MYIR TECH LIMITED www myirtech com MYR Make Yo
55. d File D SAMA5D3X Android demo image Android 4 0 4_r2 1 sama5d3x nandboot sama5d34ek dtb at address 0x180000 GENERIC SendFile D SAMA5D3X Android demo image Android 4 0 4_r2 1 sama5d3x nandboot sama5d34ek dtb at address 0x180000 F File size 0x50F3 byte s F Writing 0x50F3 bytes at 0x180000 buffer addr 0x2001052C 0 20000 bytes written by applet sam ba_2 12 1 Figure 5 15 10 Download rootfs ubi to 0 0050 0000 Refer to figure 5 16 Note be sure to check Trimffs 86 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Ps eem qmm File Script File Ecc type at91sama5d3x Memory Display 4 pmecc software ecc noecc Start Address 300000 Refr Applet traces DEGU Pmecc boot header configuration infos 7 Apply Size in byte s 0 100 Number of sectors per page n E 0x00300000 0 00000004 Sparesize 64 1 0x00300010 0x34D1A951 Number of ECC bits required 5 CHKUSHUS UM Size of the ECC sector 6 512 1024 0x00300030 0x804431B4 Ecc ofiset s 2 n nnonnnan ns 4 DDRAM DataFlash AT45DB DCB Cancel r Download Upload File Send File CE SAMASD3X Android demo image Android 4 0 4 r2 s Receive File Receive File Address For Receive File 0 1000 byte s Compare sen
56. ddress 192 168 0 2 ifconfig ethO 192 168 0 2 ADDRCONF NETDEV UP 0 link is not ready macb f0028000 ethernet eth0 link up 1000 Full ADDRCONF NETDEV CHANGE eth0 link becomes ready 2 Test board to PC network by ping command here host IP 192 168 0 3 In PC ping development board ping 192 168 0 10 refer to Figure 4 18 C WINDOWS syst em32 cad exe Reply from 192 168 0 2 bytes 32 time lt ims Reply from 192 168 8 2 bytes 32 time lt ims Reply from 192 168 0 2 bytes 32 time lt ims Ping statistics for 192 168 0 2 Packets Sent 4 Received 4 Lost 0 loss fipproximate round trip times in milli seconds Minimum ms Maximum ms Average Gms C Documents and Settings Administrator gt ping 192 168 0 2 Pinging 192 168 0 2 with 32 bytes of data Reply from 192 168 8 2 bytes 32 time lt ims Reply from 192 168 0 2 bytes 32 time lt ims Reply from 192 168 8 2 bytes 32 time lt ims Reply from 192 168 0 2 bytes 32 time lt ims Ping statistics for 192 168 0 2 Packets Sent 4 Received 4 Lost loss Approximate round trip times in milli seconds Minimum ms Maximum ms Average Gms Figure 4 18 Ping the host in the development board ping 192 168 0 3 PING 192 168 0 3 192 168 0 3 56 data bytes 64 bytes from 192 168 0 3 seq 0 ttl 128 time 0 801 ms 64 bytes from 192 168 0 3 seq 1 ttl 128 time 0 377 ms 64 bytes from 192 168 0 3 seq 2
57. e buttons i gpio printk gpiokeys d count d value d n buttons i gpio buttons i count value if value button up if buttons i count gt 5 amp amp buttons i count lt 20 quick press 60 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual input event dev input EV KEY buttons i keyO 1 input sync dev input input event dev input EV KEY buttons i keyO 0 input sync dev input buttons i count 0 del timer amp buttons i timer else button down buttons i count buttons i count 1 if Duttons i J count gt 20 long press buttons i count 0 input event dev input EV KEY buttons i key1 1 input sync dev input input event dev input EV KEY buttons i key1 0 input sync dev input else mod timer amp buttons i timer jiffies msecs to jiffies 100 0 15 gpiokeys interrupt handler 61 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual static irqreturn_t gpiokeys int int irq void dev id int n int dev id gpiokeys check n return IRQ HANDLED static struct file operations dev fops owner THIS MODULE open dev open read read write write static struct miscdevice misc minor MISC DYNAMIC MINOR DEVICE NAME fops amp dev_fops static int gpio request check unsigned gpio const c
58. e command to the etc profile file so set these environment variables automatically when system login 4 Transplante Qt to development board D Copy library to the board Qt after installation is complete in order to solve the problems of the symbolic link can use package first then uncompress directly to the development board cd usr local qt4 5 3 arm tar zcf lib tar gz lib Copy lib tar gzto the development board and then unpack mkdir p usr local qt4 5 3 arm tar xzvf lib tar gz C usr local qt4 5 3 arm 2 Set up the development environment variable Environment variable is set in the development board has been written in the etc setqtenv file execute the following command on the development board Can complete the environment variables set source etc setqtenv Or manually input Settings export LD_LIBRARY_PATH lib LD_LIBRARY_PATH export QTDIR usr local qt4 5 3 arm export T_ROOT usr local tslib export PATH T_ROOT bin PATH export LD_LIBRARY_PATH T_ROOT lib QTDIR lib LD_LIBRARY_PATH export TSLIB CONSOLEDEVICE none export TSLIB_FBDEVICE dev fb0 export TSLIB TSDEVICE dev input eventO 74 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual export TSLIB_PLUGINDIR T_ROOTI lib ts export TSLIB_CONFFILE T_ROOT etc ts conf export TSLIB_CALIBFILE etc pointercal export QWS_KEYBOARD USB dev input event1 export QWS MOUSE PROTO Tslib dev eventO expor
59. ea Real MYD SAM9X5 User Manual VDDANA 5 313 Figure 2 10 2 Push button is shown figure 2 11 PUSH BUTTON VBAT 3 NRST NRST 3 0 WAKE UP WAKEUP 13 PB USER1 39 CS BOOT D SABLE 3 Figure 2 11 2 3 2 CAN SAMA5D34 and SAMA5D35 have CAN receive send interface Its characteristics are as follows gt Fully compatible with the ISO 11898 standard gt High speed up to 1Mbaud gt Very low Electro Magnetic Emission 15 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Y VY V V V WV Different receiver with wide common mode range for high Electro Magnetic Immunity An unpowered node does not disturb the bus lines Transmit Data TxD dominant time out function Silent mode in which the transmitter is disabled Bus Pins protected against transients in an automotive environment Input levels compatible with 3 3V devices Thermally protected Short circuit proof to battery and to ground At least 110 nodes be connected CAN receive send circuit figure 2 14 VODIOPO VDDSV 6143 jo Figure 2 12 2 3 3 RS485 RS485 receive send key feature gt gt gt gt gt gt gt Electrical data isolation Complaince to ANSI TIA EIA RS 485 A 1998 ISO 8482 1987 E Transfer spped reach high as 500kbps low power consumption current lt 2 5mA compatib
60. elle state The processor has the ARM Thumb ThumbEE Jazelle states controlled by the T bit and J bit in the CPSR 2 2 2 DDR2 SDRAM DDRAM device key features gt VDD 1 8V 0 1V VDDQ 1 8V 0 1V gt All inputs and outputs are compatible with SSTL_18 interface MYIR TECH LIMITED www myirtech com Make Your Idea Real gt gt gt gt Auto refresh and self refresh MYD SAM9X5 User Manual Organizational structure 8 blanks Page size 128 Meg x 16 16 Meg x 16 x 8 banks Programmable CAS latency CL Programmable CAS additive latency AL Programmable burst lengths 4 or 8 Adjustable data output drive strength DDRAM circuit peripheral is shown in figure 2 2 DD amp 20 31 3 DDR 13 a B 5 2 2 DDR BT 7 pin R2 2 2 5 DDR Re 54 RE 4 DDR DDR DOR 12 DOS DDR BAD 12 gap Dau D 1 5 Spore DOR 2 AT VDDIODDOR BA2 Bye Oe H WRN oor T R2 R 8 DORCKE 59 DOR ___ oe DDR CKE I doce DOR CLK J DOR 3 orek gt RRE E S DORICLEN DOR CUT x DDR CLKN DRCS gt DOR CS 18 DDR CS LB 5 17 DDR CAS 17 G EC Ras r EAE Tor RAS r SS DOR RAS
61. file system 4 6 1 Write Demo Program hellomyir Firstly write a simple program hellomyir 1 Creat and compile hellomyir c vi hellomyir c Enter the following in the hellomyir c save and exit include lt stdio h gt int main int argc char argv printf argc d n argc for i 0 i lt argc i 44 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual printf argv d s n i argv i return 0 2 Compile hello myir c Add cross compiler tools path to PATH export opt gcc linaro arm linux gnueabihf 4 7 2013 04 20130415 linux bin arm linux gnueabihf Use the cross compiler tool to compile arm none linux gnueabi gcc static o hellomyir hellomyir c hello myir application is generated 4 6 2 Mount UBIFS File System UBIFS is a new flash file system by nokia engineers under the help of Szeged University which is considered the next generation of JFFS2 files system UBIFS file system specifically for the large capacity FLASH embedded mobile devices mounting UBIFS file system must have mtd interface while Ordinary PC usually has no mtd manage disk So here needs nandsim simulator simulate mtd device with a RAM space then mount UBIFS file system The concrete steps are as follows 1 Load UBIFS drive mtd driver Enter the following command by turn sudo apt get install mtd utils sudo modprobe nandsim first byte 0x
62. har label int ret ret gpio request gpio DEVICE NAME if ret pr err gpio d request failed s n gpio label return ret 62 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual This function is called when the module is loaded static int init gpiokeys init void int i ret info gpiokeys init n dev input input allocate device if Idev input pr_err s not enough memory for input DEVICE return dev gt DEVICE NAME dev_input gt id bustype BUS HOST Enable auto repeat feature of Linux input subsyste Set bit EV REP dev input evbit Idev_input gt evbit 0 MASK EV KEY MASK EV REP for i20 i sizeof buttons sizeof buttons 0 i int gpio buttons i gpio int irq gpio to irq gpio gpio request check gpio KEY gpio direction input gpio at91 set gpio input gpio 1 input with pullup gpio set debounce gpio 10 1000 request irq irg gpiokeys int IRQF TRIGGER FALLING DEVICE void i 63 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual if ret pr_info request gpiokeys d irq d failed n i irq input_free_device dev_input return ret input set capability dev input EV KEY buttons i keyO input set capability dev input EV KEY
63. hort Circuit Protection Accurate Current Limit 0 75A min 1 25 A max Operating Range 2 7V to 5 5V 0 6 ms Typical Rise Time Deglitched Fault Report Bidirectional Switch Ambient Temperature Range 40 to 85 C ESD Protection Circuit is shown in figure 2 22 22 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 3V3 gt R151 47K u11 TPS2051BDBV RIS 47K BUS SENSE 2029 15pF Figure 2 22 2 3 9 ETHERNET Module ETHERNET s characteristics are as follows Y Y V Y V V V Single chip 10 100Mbps IEEE 802 3 compliant Ethernet Transceiver RGMII1 2 Interface support with 5 2 reference clock output to and option to input 2 reference clock Programmable interrupt output On chip termination resistors for the differential pairs Baseline Wander Correction Power down and power saving modes 32 QFN package 5 5mm MDC MDIO Management Interface for PHY register configuration Power supply e VCOC core 1 2 V e vCCQ I O 3 3 V 2 5 V ETH Module interface circuit is shown in figure 2 23 23 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real 2 3 10 HDMI Module Atthe De Assertion of Reset CONFIG 2 0 004 Mode RMII Duplex Mode Half Duplex Isolate Mode Disable Speed Mode 100Mbps Nway Auto Negotlatlon Enable HDMI key features gt
64. ic programming tools MS at91SAMA5D3Xek_demo_android_Nand Flash DOS batch the manual bat programming process does require this file Table 5 2 2 The principle of the system Power on when system starts form Nand Flash the start steps is as following D Fixed boot code in atsama5d3x internal rom and copy boot program at91 SAMA5D3Xek Nand Flashboot 3 1 bin Nand Flash to SRAM to run Boot loader initializes hardware basically such as setting CPU frequency config running uration PIO and then copy the secondary boot program uboot bin to DDRAM and begin to implement 2 Secondary bootloader uboot is mainly responsible for boot Linux including set Linux operating environment Load Linux image file ulmage pass startup parameters to Linux last boot Linux to start When boot Linux kernel Android file system will be mounted automatically At this point Android system is booted 5 4 2 Compile System Files We know that Android system is running Linux based system so if build Android 88 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual system set up a Linux based platform firstly 1 Decompression cross compiler tool to usr local compile AT91Bootstrap to at91 SAMA5D3Xek Nand Flashboot 3 1 bin compile u boot to u boot bin refer to 4 5 1 4 5 2 453 14 5 41 2 Compile Linux kernell used in Android system Unzip Linux kernel to working d
65. irectory cp media cdrom 06 Android Source Linux at91 linux at91 tar bz2 opt android opt android tar xvjf linux at91 tar bz2 linux at91 According to actual situation select appropriate configuration files renamed as config 5 android defconfig config Compile Linux kernel export ARCH arm export CROSS_COMPILE opt gcc linaro arm linux gnueabihf 4 7 2013 04 20130415 linux arm linux gnueabi make menuconfig pops up formulate box directly and save out make make ulmage make dtbs After compile kernel ulmage in directory arch arm boot is Linux kernel programming samabd31ek dtb sama5d33ek dtb sama5d34ek dtb samabd3b5ek dtb is Android device tree image file what we need 5 5 Android System Use 5 5 1 USB Keyboard Test Insert USB keyboard to J24 press the Num Lock key when the lights in the upper right corner turn green it shows usb keyboard can be used as far as on PC to input 89 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 5 5 2 Browse Picture Test 1 Select Gallery icon Refer to figure 5 15 APPS WIDGETS 91877 AndroidC alib Atmel Browser Calculator Camera OL Dev Tools Downloads Email Ethernet HelloM YIR oe eo se EX Jack OWL Messaging Figure 5 15 2 Click Gallery and select a picture folder Refer to figure 5 16 All pictures 6 sdcard 2
66. le 5v and 3v power supply VDD1 Bus device numbers 256 work temperature 40 C to 85 C RS485 circuit digram 2 13 16 MYIR TECH LIMITED www myirtech com MYD SAM9X5 User Manual Make Your Idea Real 12 RS485 RXD lt 12 RS485_TXD 12 RS485 RTS 3 GND_CAN GND CAN GND CAN Digram 2 13 2 3 4 HSMCI Module HSMCI Module is shown in figure 2 14 VDDIOP EU R19 1 8 nen 54 C16 10012 li DT mes Mcio WP m E s a gt gt 1 0 CK 13 200 C 5 3 204 lt gt gt 3 pos MCIO_DA4 pos 3 jj m Poe 2 RR4 RR5 RR42 near SODIMM place SDIMMCPlus CARD INTERFACE MCIO VDDIOP VDD E R24 RRS R25 Micro SD 10K 68k 10K 3 2 lt D co 8 8 P821 P820 RR1 RR2 near SODIMM place Figure 2 14 2 3 5 SODIMM Interface 1 LCD Hardware interface circuit is shown in figure 2 15 17 MCI1 VODIOP MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual EM ava sL 10uF 10uF 1 5V o v a LCDDATO RROD 5 4020 BLUE ME 6 RROC LCDDAT Ag LCDDAT2 RRB 7 2 BLUE B
67. le Nand Flash in Scripts tab and then click Execute Refer to figure 5 7 0 00300000 0 00300010 0 00300020 0 00300030 n nn02nnna4n 0x00000004 Ox34D1A951 0x05B04910 0x804431B4 8 bit C 16 bit 32 bit Start Address 0300000 Refresh e Size in byte s 0400 OxDOBCC129 0x6821DB10 OxDADO6183 OxFC2A8002 0x5D95058F OxE2695B1D Ox2CFF72EB 0x819A7091 OxFC4EC967 OxFB9BFOSD 1 4 6 0 055 5 6 DDRAM DatzFlash ATASDB DCB EEPROM AT2 NorFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name Receive File Name Address 00 Size For Receive File 0 1000 byte s Scripts Enable NandFlash 2 S TE NANUFLASM HU Loading applet applet nandflash sama5d3x bin at address 0 20000000 Memory Size 0 10000000 bytes F Buffer address 0x2001052C I Buffer size 0x20000 bytes F Applet initialization done sam ba 2 12 1 81 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Figure 5 7 3 Select Enable OS parameters in Scripts tab then click Execute using the default option click OK directly Note there
68. lloworld as follows hellomyir argc 1 argv 0 hellomyir 4 7 Linux Use After a Linux system running can be operated by touch screen can also through the terminal serial ports here is how to through the terminal Linux operating such as U disk SD card mount ETH test and how to play music and so on 4 7 1 Touch Screen Calibration Entering system will run the screen calibration procedure automatically Recalibrate the touch screen by the following steps if it requires 1 Open HyperTerminal baud rate 115200 Data bits 8 Parity None Stop bits 1 data flow control none After start Linux log in as root command 49 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual buildroot login root 2 Run the calibration procedure and click the five corresponding calibration points on the LCD screen The calibration can be carried out ts_calibrate xres 480 yres 272 Took 12 samples Topleft X2 767Y 178 Took 14 samples Topright X2 793 947 Took 13 samples Botright X2 309 934 Took 12 samples Botleft 308Y 169 Took 10 samples Center X 557 556 29 638855 0 011581 0 495638 331 720245 0 364475 0 006420 Calibration constants 1942412 758 32482 21739618 23886 420 65536 3 After calibration is complete it needs to restart system calibration to take effect The operation is as follows sync reboot 4 7 2 U disk U
69. nd SAM BA 1 Connect Board to PC Order cannot be reversed Specific steps are as follows Development board switch to 5 v power off position 2 Through the micro USB line connected to the PC and development board Disconnect the CPU module jumper JP1 JP2 backboard disconnect hold CS BOOT button At the same time development board switches to USB 5v IF first time the PC opportunities prompted to install driver development board Selected at this time SAM BA installation directory under the relevant position can be installed as shown in figure 5 2 ACIS ee5RC Adobe E Atmel 3 sam ba 2 12 applets 7 dry ee Figure 5 2 2 If there is figure 4 3 in my computer gt properties gt Management gt device manager gt 78 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual port which shows board driver has been installed According to the actual situation here for 4 File Action View Help 510069 S c Ne Computer Management Local a g lichuanmingt PC 4 System Tools Batteries 3 Task Scheduler Computer 1 Event Viewer Disk drives Shared Folders 8 Display adapters Local Users and Groups i DVD CD ROM drives 5 Performance 05 Human Interface Devices Device Manager IDE ATA ATAPI controllers 4 Storage Imaging devices Disk Manageme
70. nd input volume control 20 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual gt gt gt gt Highly Efficient Headphone Driver Playback only 3 0mW Analog Pass Through Power only 2 4mW 32 PIN QFN package 4 x 4mm 0 4mm pitch Circuit is shown in figure 2 20 HEADPHONE LINE IN Figure 2 20 2 3 8 USB Module 1 USB HOST mode and its characteristics are as follows gt Y V VY V V Y WV 110mO 5V Input High Side MOSFE Switch 500mA Continuous Load Current per Channel 110pA Typical On State Supply Current 1 Typical Off State Supply Current Current Limit Short Circuit Protection Thermal Shutdown Protection under Overcurrent Condition Under voltage Lockout Ensures that Switch is off at Start Up Output can be Forced Higher than Input Off State Open Drain Fault Flag 21 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual gt gt Slow Turn ON and Fast Turn OFF Enable Active High or Active Low USB HOST Interface circuit is shown in figure 2 21 USBC_OM 0 ae Sis 8 USB A D S W TH R Figure 2 21 2 mini USB Host Device and its characteristics are as follows gt gt gt V VY Y VY WV 70 mQ High Side MOSFET 500 mA Continuous Current Thermal and s
71. nt lt Keyboards Services and Applications Memory technology driver n Mice and other pointing devices Modems K Monitors Network adapters Ports COM amp LPT BD Processors SD host adapters Sound video and game controllers System devices Universal Serial Bus controllers Figure 5 3 5 3 3 Automatic Download Note please pull out SD card before download otherwise an error may occur After complete chapter 5 3 1 and 5 3 2 open CD ROM directory Android demo image double clickflash all bat Then will download Android automatically to board Entire download process takes about three minutes When pop logfile log file automatically reset board there will be Android start information 5 3 4 Manual Download All image files used in this chapter can be found in the directory MYIR SAM A5D3X 02 ImagesVAndroid image The Nand Flash content of Android system is divided as shown in figure 5 4 79 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Root FS UBIFS WS Linux Kernel Ox200000 Ox180000 Device Tree dtb U Boot Env Ox100000 Redundant U Boot Env OxC0000 rrx U Boot Ox40000 91 NAND FLASH Fiugre 5 4 Download Linux by SAM BA manually 1 Complete chapter 5 3 1 and 5 3 2 double click samba v2 11 there appe
72. of an external USB hub The following simple lists the basic features of MYD SAMA5D3X Electrical parameters Working temperature e Industrial level Temperature 40 C 85 C 2 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual non industrial level temperature 0 C 70 C gt Operating humidity 0 to 90 gt Electrical Specifications 5V power supply e Base Board 5V power supply CPU module 3 3V power supply gt Mechanical Dimensions Base Board 154 110 mm module 45 67 6 Processor gt SAMA5D31 D33 D34 D35 32 bits ARM v7 A Thumb2 processor runs at up to 536MHz gt 32 Data Cache 32KB Instruction Cache Memory gt 160 chip ROM 128KB chip SRAM 512MB DDR2 SDRAM 256MB Nandflash 16MB NorFlash 16 bits v Vv Y WV 4MB DataFlash Audio and Video Interface gt An Audio 3 5mm Input Interface gt AnMIC input interface ATwo channel Audio 3 5mm Output Interface Transmission Interface Standard JTAG Interface gt Micro SD Card Interface gt SD MMC Interface gt Serial Ports e 1x DBGU Port Debug Unit e 1xUSART 5 pin gt Two CAN Interfaces Only MYD SAM A5D34 and MYD SAMA5D35 have 3 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Interface gt 2High speed USB HOST Interfaces gt USB Host Device Interface gt Ethernet MAG SAMA5D3
73. ome analysis are as bellows Root FS UBIFS Linux Kernel Ox200000 0x180000 Device Tree dtb U Boot Env Ox100000 Redundant U Boot Env OxC0000 U Boot Ox40000 AT91Bootstrap NAND FLASH Figure 4 1 1 Boot Strap After power on system the first class boot program is copied automatically from NandFlash to internal SRAM and begins to implement by CPU The main role is to 28 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual initialize CPU and external RAM and u boot is copied from Nand Flash to external RAM and then jump to u boot entry and start u boot 2 u boot Secondary boot program which is used for kernel image updates load kernel and boot kernel starts 3 u boot Configure environment variables and provide u boot running parameters such as ip address start a command kernel boot parameters 4 sama5d3x dtb Describe hardware device tree U boot DTB in the start up will Flash when the address of the file as the inlet parameters are passed to the kernel 5 Linux Kernel Design Linux 3 6 9 kernel for MYD SAMA5D3X 6 Root FS The buildroot file system support QT graphical application 4 2 Software Resources Boot Boot Strap First boot program source code available program u boot Secondary boot program source code available Linux kernel only for MYD SAMASDSX hardware Linux kernel Linux 3 6 9 source code available
74. r sam ba_2 12 exe 4 3 2 Connect Board to PC 1 Connect Board to PC Order cannot be reversed Specific steps are as follows Development board switch to 5 v power off position 30 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 2 Through the mini USB line connected to the PC and development board 3 Disonnect the CPU module jumper JP1 JP2 backboard disconnect hold CS BOOT button At the same time development board switches to USB 5 IF first time the PC opportunities prompted to install driver development board Selected at this time SAM BA installation directory under the relevant position can be installed as shown in figure 4 2 AES PESE ACDSeeSRC B Adobe B B Atmel sam ba 2 12 applets 09 doc e drv Figure 4 2 2 If there is figure 4 3 computer gt properties gt Management gt device manager gt port which shows board driver has been installed According to the actual situation here for 4 31 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Dar rD REA BOM 888500 Em 9 pn HENE DVD CD ROM 385988 Gy IDE ATA ATAPI Felat EE uw MifilBzbss BRI com LPT DE rd Wife iE REF HEE RSA Eire amp BARTER HB eA
75. se 1 Enter Linux by terminal U disk is inserted to any of a USB host port and you can see the following information in the HyperTerminal usb 1 3 new high speed USB device number 2 using atmel ehci usb 1 3 New USB device found idVendor 13fe idProduct 3600 usb 1 3 New USB device strings Mfr 1 Product 2 SerialNumber 3 50 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual usb 1 3 Product DT 101 G2 usb 1 3 Manufacturer KINGSTON usb 1 3 SerialNumber C1690905 scsi0 usb storage 1 3 1 0 scsi 0 0 0 0 Direct Access KINGSTON DT 101 G2 8 07 PQ 0 ANSI 4 sd 0 0 0 0 sda 16076800 512 byte logical blocks 8 23 GB 7 66 GiB sd 0 0 0 0 sda Write Protect is off sd 0 0 0 0 sda Write cache disabled read cache enabled doesn t support DPO or FUA sda sda sd 0 0 0 0 sda Attached SCSI removable disk 2 Entering the following command to mount inserted U disk and view U disk contents mount t vfat dev sda1 mnt Is mnt usb MYD S5PV210 MYD SAMA5D3X Dev Res 22 27 222 2 9 2 Michael Jackson Beat It mp3 22222 Dangerous mp3 BOOTEX LOG Qt_Arm rar DSC04807 JPG 4222 FOUND 000 3 Unplug U disk directly when the use is completed system will uninstall automatically 4 7 3 SD Card Use 1 When Micro SD card is inserted HyperTerminal displays SD card information 0 host does not support reading read only switch assuming write enable mmc1
76. system startup Set system time date s 2013 06 07 15 51 00 hwclock w Jul 8 10 36 00 BST 2013 Query system time and hardware RTC time date Fri Jun 7 15 52 22 UTC 2013 hwclock r Fri Jun 7 15 53 22 2013 0 000000 seconds 4 8 Linux Driver Development Examples This chapter describes a simple character device driver development achieving the function to control LED 57 MYIR TECH LIMITED www myirtech com Make Your Idea Real 4 8 1 Hardware Schematic MYD SAM9X5 User Manual 3 7 PE 23 341 Q1 IRLML2502 Figure 4 20 Use PD21 interface control D2 by IRLML2502 When it is high LED turns on Port PB18 control D1directly When it is low LED turns on Refer to figure 4 20 4 8 2 Driver Source Code 1 Create driver file in new kernel Create driver files in driver char cd linux 3 6 9 vi drivers char ledtest c 2 Driver source code ledtest c is as follows include lt linux module h gt include lt linux interrupt h gt include lt linux gpio h gt include lt linux input h gt include lt linux miscdevice h gt include lt asm uaccess h gt define DEVICE gpiokeys static struct input_dev dev_input 58 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual define PIN MYD KEYS 91 PIN PE27 PB_USER1 define MYD LED2AT91 PE25 blue define MYD LED3AT91 PIN PE24
77. t QWS FONTDIR QTDIR Ilib fonts 75 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Chapter 5 Android System Guide 5 1 Overview Android is a Linux system based open source operating system mainly used in portable devices Android operating system originally developed by Andy Rubin development initially mainly support mobile phone In 2005 Android is acquainted by Google formatting the open mobile phone alliance to improvement it gradually extended to the tablet computer and other area Since its first release Welcomed by the majority of consumers Android s market shares around the world more than Symbian system for the first time in the first quarter of 2011 ranking first in the world The data shows that in February 2012 Android accounted for 52 596 of the share of the global smartphone operating system market Android system is running based on Linux system mainly made by Linux Kernel system libraries Dalvik virtual machine application framework and applications written mainly by JAVA Its framework is as shown in figure 5 1 APPLICATIONS APPLICATION FRAMEWORK DT MEE W MEME Sl rn Manager Providers ystem Manager E 1 0 d T Manager Manager dirmi LIBRARIES ANDROID RUNTIME E LINUX KERNEL 76 MYIR TECH LIMITED www myirtech com Make Your Idea Real Figure 5 1 MYD SAM9X5 User Manual This chapter describes how to
78. t file with memory Scripts Enable OS parameters M UXZUUUU DYLES Uy F Writing 0 18 58 bytes at 0x4E0000 buffer addr 0 2001052 0x18F58 bytes written by applet sam ba_2 12 1 NANDFLASH NandHeaderValue HEADER 0 0 00405 1 User canceled sam ba 2 12 1 NANDFLASH NandHeaderValue HEADER 0 0 00405 sam ba 2 12 1 96 NUSBserial COM Board at91sama5d3x ek Figure 5 16 At this point Android system image file download is completed and press K1 Reset key can restart Android system 5 4 Compile Android System Files This chapter will describe the compiled methods and steps of Android system files 5 4 1 Android System Principle 1 File description Boot program Compiled by AT91 boot bin Bootstrap source used to start u boot u boot bin The secondary boot for boot kernel u boot Env Configure the environment variables 87 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual provided u boot operation parameters Describe hardware device tree u boot DTB in the start up will Flash when sama5d3x dtb the address of the file as the entrance to the parameters passed to the kernel Linux kernel file compiled by Linux ulmage kernel source code rootfs ubi Android file system at91SAMA5D3xX tcl Writing log file and view it by notebook Automat
79. t string www baidu com Refer to figure 5 23 figure 5 24 93 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual www baidu com Figure 5 23 g Hs 1 AE F 155 ER haol2 HID Gk FF Figure 5 24 5 5 5 APK Test The contents of this chapter please refer to Android development environment and use Eclipse pdf 94 MYIR TECH LIMITED www myirtech com e M Y iR Make Your Idea Real MYD SAM9X5 User Manual Appendix 1 FAQ Q1 Report Connection USBserial COMxx not found XX port number and according to the situation such as host machine is COM13 then XX is 13 pop up logfile file contents As shown below Analysis and Answers This problem occurs because samba connection cannot be found USBserial COMxx D Development board switch to 5 v power off position Through the micro USB line connected to the PC and development board S Connect the CPU module jumper JP1 JP2 backboard disconnect hold CS BOOT button At the same time development board switches to USB 5v ress NRST reset board then turn SW2 on and then start download Display logfile file as follows 95 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 1 argv 2 samabd3xek demo linux nandflash tcl E Connection USBserial COM3 not found E Connection list USBserial COM13 CO
80. tail 2 Compile the Qt project qmake project qmake make If compilation error QtSql QtXml to a file or directory the need to manually edit after execution of qmake project masterdetail Pro file add in the file QT SQL XML After perform the above command the generated executable file masterdetail can copy to the development board to run on Is masterdetail chmod 0777 masterdetail masterdetail qws The results as shown in the figure 4 21 below Qt Music Archive File Help Artist Details lt all gt 17 Artist Ane Brun Number of Albums 2 Title Spending Time With Morgan 2003 Spending Time With Morgan A Temporary Dive Ane Brun 2005 Great October Sound Thomas Dybdah 2002 Stray Dogs Thomas Dybdah 2003 One day you dance for me New York City Thomas Dybdahl 2004 Ompa Til Du Der Kaizers Orchestra 2001 Evig Pint Kaizers Orchestra 2002 Maestro Kaizers Orchestra 2005 Figure 4 21 4 10 2 Qt development environment 71 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual This section describes how to compile from Qt Embedded source code generated Qt cross tool chain and related arm the Qt libraries When the CD provided in the Qt library can not meet the demand of actual development can through this method when making Qt development and runtime environment Qt source code and the Tslib source code in02 Im ages
81. tate OK Name rootfs Character device major minor 250 1 Then use ubinize tool to generate fsimage ubi file Firstly it needs to create configuration files of ubinize cfg vi ubinize cfg Enter the following save and exit ubifs mode ubi image ubifs img vol_id 0 vol_size 64MiB vol_type dynamic vol_name rootfs vol_flags autoresize vol_alignment 1 Enter the following command to generate final fsimage ubi file sudo ubinize m 2048 p 128 o fsimage ubi ubinize cfg Parameter description of ubinize m The size of minimum input output byte flash unit p erase block size of FLASH physical output file Here is different mkfs ubifs parameter p parameter represents the physical erase 48 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual block size UBI work in MTD layer so it needs the MTD parameters namely physical parameters UBIFS work in UBI so it needs the UBI parameters namely the logic parameter Now UBI image has been saved in the ubi img which not only contains UBIFS information but also contains UBI information After the completion generated fsimage ubi file can use the method described in chapter 4 3 4 to download to 0x800000 Reset board and input root to login there is added hellomyir file in the root directory buildroot login root cd Is bin etc lib proc tmp boot hellomyir media sbin usr dev home mnt Sys var Run he
82. ttings the specific operation is as follows in figure 4 6 33 MYIR TECH LIMITED www myirtech com Make Your Idea Real MYD SAM9X5 User Manual File Script File Hep Size in byte s 0 100 0 00300000 0 00300010 0 00300020 0 00300030 2 at9lsama5d3x Memory Display Start Address 0300000 Refresh 0x00000004 Ox34D1A951 0x05B04910 0 80453184 zane 8 bit 16 bit 32 bit 0 50 529 OxE821DB10 OxD2D06583 OxFC2A8002 0 5085258 Ox2CFF7AEB OxBC4E4967 OxABASC4F6 Awerazante OxE2695B1D 0 81947091 OxFB9BFOSD 0 055 5 6 4 DDRAM DataFlash ATASDB DCB EEPROM AT24 NorFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Send File Receive File Address Download Upload File Size For Receive File 01000 byte s Send File Compare sent file with memory Scripts le OS PMECC para Enable NandFlash F Figure 4 6 Select Enable Nand Flash in Scripts tab and then click Execute to Enable Nand Flash Refer to figure 4 7 File SciptFile Size in byte s 0100 at91sama5d3x Memory Display Start Address 0 300000 Refresh 0x00300000 0 00000004 0x00300010 0
83. ur Idea Real MYD SAM9X5 User Manual cd gpioleds sudo vi Makefile KDIR opt linux Linux at91 linux at91 Then using the command wq keep quit 2 Modify corresponding variable path export ARCH arm export CROSS COMPILE opt gcc linaro arm linux gnueabihf 4 7 2013 04 20130415 linu x bin arm linux gnueabihf 3 Compile and Is make 15 After compile gpioleds ko in home myir is Linux Driver that we need 4 9 Application Development Instance This chapter describes the upper layer of the Linux system application development and a simple instance tells the application development process and driver invocation Instance to achieve the function when run application board can control two bright LED and specific LED lights on or off is controlled by passed parameters 4 9 1 Download Driver into Board Copy gpiokeys ko to SD card or U disk which is loaded in the corresponding directory specific actions are as follows mount t vfat dev sda1 mnt cd mnt Is gpioleds ko insmod gpioleds At this point LED driver has loaded into kernel successfully 66 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 4 9 2 Driving test 1 Turn on blue LED echo 1 gt sys class leds blue brightness 2 Turnoff blue LED echo 0 gt sys class leds blue brightness 3 Turn on red LED echo 1 gt sys class leds red brightness 4 Turn off red LED echo 0 gt s
84. voice value trade term custom statements and H S code etc Please contact us with these shipment requirements if your country has strict custom affairs Support and maintains MYIR provides 12 months warranty for hardware products if the defects or failures were not caused by wrong use Return steps for defective products 1 Please email or call us get a Return Merchandise Authorization RMA by providing purchase details and reasons for return defective incorrect etc 2 MYIR will make a shipping invoice list value total item description etc for you return request China have strict limit on return products so please use MYIR s shipping invoice to return items to avoid custom delay Contact Tel 86 0755 22929657 Fax 86 0755 2553 2724 Mail to sales myirtech com support myirtech com Website www myirtech com 98 MYIR TECH LIMITED www myirtech com
85. ys class leds red brightness 5 System runs with red LED indicator light echo heartbeat gt sys class leds red trigger 4 10 Qt use Guide This section describe the methods and steps to using Qt GUI application development on the MYD SAMA5D3xX including two parts the first tells the CD provided in the use of the Qt cross compiler tool chain the general Qt application development use the CD provided in the Qt cross tool chain The second part tells how to compile from Qt Embedded source code generated Qt cross tool chain and related library file when the CD provided in the Qt library can t meet the demand of Qt development program only need to make Qt development environment Note on the development board to download 02 Im ages Linux directory of Images for example download specific steps refer to automatically download or 4 3 3 4 3 4 manually down load Here for Ubuntu10 04 PC environment 4 10 1 Using the Qt cross compiler tool chain For normal Qt application development can be directly use CD available in Qt cross tool chain in the disc 02 Im ages Linux Qt Arm directory file already contains the tool chain corresponding Qt libraries so use This tool chain compiled Qt applications can run 67 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual on the board directly Disc available in Qt cross tool chain configuration in detail Shown in the following table 68 MYIR TECH LIMI
Download Pdf Manuals
Related Search
Related Contents
WIWA Dual-Component Gel System TEMPS D`ACTIVITÉS PÉRISCOLAIRES ekey home contrôleur integra plus Inakustik 00424007 今月の商売のヒント:【お客様が望んでいる本当の商品 DUPONT ™ IMAZETHAPYR 240 SL herbicide TERMS AND CONDITIONS TSU FRONT-END Manual del calefactor Copyright © All rights reserved.
Failed to retrieve file