Home

MYD-SAM9G15/9G25 /9G35/9X25/9X35 User Manual

image

Contents

1. m at9isam9g15 Memory Display 11 Start Address ox300000 Refresh Zu E Gg e Size in byte s 0x 100 C asdi C 8bit C 16bit 32bit infos apply j 0x00300000 0xEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 0x00300030 0x00000000 0x00000000 0x00000000 0x00000000 0x00300040 0x00000000 0x00000000 0x00000000 0x00000000 e AvnanzannKn Depp avannanannna axvannanannan Avanananan 4 gt DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name Send File Receive Fie Name g Receive Fie Address 0x0 Size For Receive File 0x1000 byte s Compare sent file with memory Scripts ES Serialflash SPIO CSO SS Execute loading history file 2 events added SAM BA console display active Tcl8 5 9 Tk8 5 9 sam ba_2 11 3 sam ba_2 11 3 Figure 5 7 2 Select NandFlash tab Enable NandFlash in Scripts tab and then click Execute Refer to figure 5 8 kb SAM BA 2 11 at91sam9g35 ek S i 15 x i Fie Script File Link Help DEER Start Address 0x300000 Refresh isplay format E Size in byte s 0x100 C asdi C abit C 16bit 32bit infos Apel 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 4
2. M A step 3 loading history file 2 events added SAM BA console display active Tcl8 5 9 Tk8 5 9 sam ba_2 11 3 sam ba_2 11 3 USBserial COM13 Board at91sam9x35 ek _ Figure 3 22 After enabling dataflash appear sam ba_2 11 3 SERIALFLASH Init 0 and download dataflashboot bin Location 04 MDK_Source 01_ getting started Download 9x35 Specific operation is shown in figure 3 23 37 MYIR TECH LIMITED www myirtech com UI Met Make Your Idea Real MYD SAM9X5 User Manual sem ba_2 11 1 USBseriaCOMS Board stonn et Figure 3 23 After downloading dataflashboot file then download ddram bin Specific operation is shown in figure 3 24 38 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual Applet traces on DBGU ce aom step ize For Receive File 0x1000 byte s Compare sent file with memory Scripts e loading history file 0 events added SAM BA console display active Tcl 5 9 Tk8 5 9 Figure 3 24 Note Scripts item without changes are the same as provious step Lastly after sending ddram bin pressing NRST to reset board firstly open terminal and configure parameters referring to chapter 3 2 3 there will be terminal information and two lights flash alternately When firstly press character 1 only red light on And then press 1 two
3. Scripts Enable OS PMECC parameters sl Execute Writing 0x20000 bytes at 0x6640000 buffer addr 0x20010954 F 0x20000 bytes written by applet F Writing 0x20000 bytes at 0x6660000 buffer addr 0x20010954 SS 0x20000 bytes written by applet E Writing 0x20000 bytes at 0x6680000 buffer addr 0x20010954 F 0x20000 bytes written by applet sam ba_2 11 3 Figure 5 18 At this point Android system image file download is completed and press K1 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 at91sam9x5ek nandflashboot 3 1 bin AT91Bootstrap source is used to start u boot u boot bin The secondary boot for boot kernel Linux kernel file compiled byLinux kernel source code system_ubifs SAM9X5 ANDROID 2 3 5_r1 img Android file system system files ulmage 138 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual chapter A id Fil userdata ublis SAMSXSANDROIDSaSeriimg Fle Systems user data portion at91sam9x5 tcl Writing log file and view it by notebook Automatic programming tools MS DOS batch file the manual programming process does not require this file at91sam9x5ek_demo_android_nandflash bat
4. Size in byte s 0x100 C ascii C 8 bit 16 bit 32 bit 0x00300000 0xEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 Start Address 0x300000 Refresh Display format E traces on DBGU m DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name M9X5 DVD Contents 02 ees M9X5 DVD Contents 02 Images Linux 4 3 LCD x11 ulmage LCD x11 ulmage Receive File Name 2 Address 0x200000 Size For Receive File 0x1000 byte s Compare sent file with memory Scripts Send Boot File Z Execute GENERIC SendFile E Jakebo 4n34 MYD SAM9X5 DVD Contents 02 Images Linux 4 3 LCD x11 ubootEnvtFileNandFlash bin at addre ifi ss 0xC0000 E File size 0x20000 byte s Ee Writing 0x20000 bytes at 0xC0000 buffer addr 0x20010954 0x20000 bytes written by applet USBserial COM13 Board at91sam9x35 ek Figure 4 13 7 Program system files Angstrom x11 at91sam9 image eglibc ipk v20110624 at91sam9x5ek rootfs ub address 0x80000 Refer to figure 4 14 94 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual i on Eege a bg r em ege Pe sau ga 212 atd ou fe a C a File Script File Hl Ecc type
5. 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 i 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 li 0x00300030 0x00000000 0x00000000 0x00000000 0x00000000 0x00300040 0x00000000 0x00000000 0x00000000 0x00000000 i NYNNZANNNKN aAvyannanann ALANAANNNNANA ALANANNANNNA aAvanannann e 4 gt I DDRAM DataFlash AT45DB DCB EEPROM A 4 negen f wire EEPROM SRAM SerialFlash AT25 AT26 m Download Upload File Send File Name Gel Send File Address 0x0 Size For Receive File 0x 1000 byte s Compare sent file with memory e 2 3 p ee By default offset of the first ecc byte in spare zone is 2 To config pmecc parameter using NANDFLASH SetNandHeaderValue pmeccParam pmeccParamValue command Type NANDFLASH SetNandHeaderValue to dispaly current pmecc configuration Type NANDFLASH SetNandHeaderValue to get help for pmecc setting To active software ECC using Enable Software ECC command Recommand to erase all after the ecc mode switch between software ECC amp pmecc sam ba_2 11 3 Figure 5 8 130 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 3 Select Enable OS PMECC parameters in Scripts tab then click Execute using the default option click OK directly Note there cannot check Trimffs Refer to figure 5 9 0 00300030 00090000 F le To config pmecc parameter usi
6. Getting Started Example 2 0 SAM9XX5 EK Compiled Jul 9 2012 11 13 49 Configure PIT Configure TC Configure LED PIOs No push buttons uses DBG key 1 amp 2 instead Press 1 to Start Stop the blue LED D1 blinking Press 2 to Start Stop the green LED D2 blinking 1221221221221221221221221221221221221212212212 221221221222222222222222222212212212211111111111 111111111111111111112122122122122122122122122122 122122122122122122122122122122122122122122122122 122122122122122122122121221221221221221221221221 2212212212212212212212212212212212212212 3 3 2 adc_adc10 gt Purpose This example demonstrates ADC peripheral gt Functional description This example is aimed to demonstrate ADC with without DMA When working with 41 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual DMA it works as a big size buffer for ADC peripherals the data will be stored immediately without interfering with processor Steps Initialize ADC with expected parameters Configure and enable interrupt for ADC Enable DMA reception Checking the last converted channel in ADC interrupt handler if DMA is not used Procedures Download program into board press NRSRT to observe relevant terminal information oy Typing d in terminal enable disable DMA character s changes mode channel Figures 0 3 respectively represent 4 trigger modes three dates respectively show th
7. 7 Linker Configuration is shown in figure3 7 Hrtirermemm ey Es kees Target Output Listing User C C Asm Linker Debug Utilities J Use Memory Layout from Target Dialog Make RO Sections Position Independent R W Base Tr Tl Dont Search Standard Libraries D Bet leigh fal e as Een disable Wamings ae entry reset Handler Cancel Defaults Help Figure 3 7 1 28 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual Options for Target MYS SAM9X35 ke sn Device Target Output Listing User C C Asm Linker Debug Utilities Use Memory Layout from Target Dialog Make RW Sections Position Independent Make RO Sections Position independent I Dont Search Standard Libraries IV Report might fail Conditions as Errors click it you can change the pat of sct file path Sec Nibraries Nibboard_samSc5 ek resources mdk samx35 sram sct Misc entry reset Handler D controls S Linker cpu ARM926EJ S o strict scatter Nibraries Nibboard_samSac5 ek resources mdk sam amp x35 s a Figure 3 7 2 The Linker configuration of getting started project is shown in figure 3 7 1 generate ddram bin the most MDK routines generate ddram bin and the Linker configuration of pmc_clock_switching project is shown in figure 3 7 2 generate sram bin Both select sct file and just have a different name 8 Choose pro
8. Table 5 2 2 The principle of the system Power on when system starts form nandflash the start steps is as following Fixed boot code in at91sam9x5 internal rom and copy a boot program at91sam9x5ek nandflashboot 3 1 bin in nandflash to SRAM to run Bootloader 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 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 system set up a Linux based platform firstly Decompression cross compiler tool to usr local directory tar xvjf 05 Linux_Source CrossTool arm 2010q1 202 arm none linux gnueabi tar bz2 C usr local 2 Compile AT91 Bootstrap tar xjvf 05 Linux_Source AT91Bootstrap AT91Bootstrap 5series_1 2 tar bz2 cd AT91Bootstrap 5series_1 2 make at91sam9x5nf_defcontig make CROSS_COMPILE usr local arm 2010q1 bin arm none linux gnueabi Cd binaries In this directory at91sam9x5ek nandflashboot 3 1 bin is AT91 Bootstrap 139 MYIR TECH LIMITED www myirtech com
9. Basic HSMCI SD MMC Example 2 0 SAM9XX5 EK Compiled Jul 11 2012 09 48 44 l Cannot check if SD card is write protected l SdMmcldentify Cmd5 3 l SD MEM l Card Type 2 CSD_STRUCTURE 0 W SD 4 bit mode l HS Not Supported in SD Rev 0x0 l Set SD MMC clock to 22222K Intermediate omit MCI 0 code 1 clr 2 wr 3 rd l Testing block 783232 791423 3 3 17 smc_nandflash gt Purpose This example demonstrates s read write data from to nandflash SMC Functional description Configure interface between SMC NAND Flash then test Nandflash Procedures Download program into board turn SW1 on press NRSRT to observe relevant terminal information gt Phenomenon Indicates Terminal information SMC NandFlash Example 2 0 SAM9XX5 EK Compiled Jul 11 2012 10 37 14 60 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual l Nandflash ID is 0x9580DA2C Menu i Dump Nand flash information d Enable or disable DMA r Performance test Raw without ECC s Performance test Software ECC p Performance test PMECC h Display this menu P Input l Size of the whole device in bytes 0x10000000 l Size in bytes of one single block of a device 0x20000 l Number of blocks in the entire device 0x800 l Size of the data area of a page in bytes 0x800 l Number of pages in one block 0x40 I
10. PIO Input Filter Disable Register 0x0024 PIO Multi driver Enable Register 0x0050 PIO Multi driver Disable Register 0x0054 PIO Pull Up Disable Register Ox0060 PIO Pull Up Enable Register 0x0064 OMAN Oa A ON a PIO Peripheral ABCD Select Register 1 0x0070 48 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual b PIO Peripheral ABCD Select Register 2 Ox0074 c PIO Output Write Enable Register 0x00A0 d PIO Output Write Disable Register 0x00A4 e PIO Pad Pull Down Disable Register Ox0090 f PIO Pad Pull Down Enable Register 0x0094 The Write Protect is enabled Write protect violation is detected The offset of the write protected register is 0x0070 Write protect violation is detected The offset of the write protected register is 0x0094 The Write Protect is disabled No write protect violation is detected No write protect violation is detected 3 3 8 pmc_clock_switching gt Purpose This example demonstrates switch system clock PLLA UPLL SLCK MAINCk gt Functional description Upon startup program configures PlOs for DBUG PCK DBUG baud rate is configured as 1200 bps This example prints the current configuration and waiting input to switch system clock gt Procedures This program is different with others Firstly DBGU baud is configured as 1200 bps while others don t change Secondly manual download has a little c
11. F Buffer size 0x4000 bytes I Applet initialization done sam ba_2 11 1 GENERIC Send8ootFileGUI sam ba_2 11 1 F USBseriaNCOMS Board at91sam935 ek 50 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Figure 3 28 Download program into board press NRSRT to observe relevant terminal information and switch system clock by prompt gt Phenomenon Indicates Terminal information Switch to 1200 bps for DBG PMC Clock Switching example 2 0 SAM9XX5 EK Compiled Jul 6 2012 14 32 53 Current PMC clock from lowlevel pmc configuration he slow clock source is internal 32 kHz RC oscillator PLLA clock is 800 MHz PLLA clock is the source of Master clock MCK Master Clock is prescaler output clock divided by 3 l Select main clock as the master clock Please measure the clock on PCK to make sure it is 12000000 Hz l Press to switch next clock configuration l Select PLLA clock as the master clock Please measure the clock on PCK to make sure it is 12500000 Hz l Press to switch next clock configuration l Select UTMI PLL clock as the master clock Please measure the clock on PCK to make sure it is 7500000 Hz l Press to switch next clock configuration l Switch the XTAL 32K crystal oscillator to be the source of the slow clock Please measure the clock on PCK to make sure it is 32768 Hz l Debuging
12. K9F2G08U0B NAND FLASH Figure 2 6 MYD SAM9X5 User Manual NAND_FSH_DO NAND_FSH_D1 NAND_FSH_D2 NAND_FSH_D3 NAND_FSH_D4 NAND_FSH_D5 NAND_FSH_D6 NAND_FSH_D7 VDDIO e C80 _l c81 100n 100nF Serial EEPROM chooses AT24C512B Its characteristics are as follows 11 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual gt Low voltage and Standard voltage operation 1 8V Vcc 1 8V to 3 6V 2 5V Vcc 2 5V to 5 5V Internally organized 65 536 x 8 Two wire Serial interface Schmitt Triggers Filtered input for Noise suppression Bidirectional Data Transfer Protocol 1 MHz 2 5V 5 5V 400KHz 1 8V Compatibility Write Protect Pin for Hardware and Software Data Protection 128 byte Page Write Mode Partial Page Writes Allowed Self timed Write Cycle 5 ms Max Vv Vv yY VV WW V Y High Reliability Endurance 1 000 000 Write Cycles Data Retention 40 years gt Lead free Halogen free Devices gt 8 lead PDIP 8 lead JEDEC SOIC 8 lead TSSOP 8 ball dBGA2 8 lead Ultra Thin Small Array SAP Packages Serial EEPROM Circuit is shown in figure 2 7 VDDIOPO YVDDIOPO VDDIOPO Figure 2 7 2 2 7 LED System LED and User LED circuits are as shown in figure 2 8 12 MYIR TECH LIMITED www myirtech com o MYiR Make Your Idea Real MYD SAM9X5 User Manual 3V3 PD 5 21 lt Q1 IRLML2502 Figure 2 8 2 2 8 Encoding Switch Setting SW1 Enable N
13. MYR Make Your Idea Real MYD SAM9X5 User Manual MYD SAM9G15 9G25 9G35 9X25 9X35 User Manual Version V1 6 MYIR TECH LIMITED www myirtech com MYiR Version History Make Your Idea Real MYD SAM9X5 User Manual V1 0 Initial Version 2012 07 23 1 Modify JP6 description in chapter 2 4 V1 1 2 Modify program errors in chapter 4 8 2 2012 08 29 3 Modify program in chapter 4 9 1 yi2 Modify the description of serial port and SDCard in 2012 12 05 Table 2 1 modify the phenomenon explanation of usb_audio_looprec add a rs485 sample program add V1 3 7 0 inch sereen support correct the instructions of JP8 2013 02 22 for MDK and Linux downloadadd add two methods of u boot compiling screen calibration instructions etc V1 4 modify the contact infomation 2013 03 28 add Qt support modify the image path and the V1 5 meee download picture of Linux meen the SAMBA 2013 04 24 path in 4 3 1 Install download tool and 5 3 1 Install Download Tool V1 6 ARM cross compiler tool upgrade to 2010 version 2013 06 24 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Directory Chapter 1 Product OvervieW scsccssictesscecsnesssnscasseansaaanccznedancnnaannannanccatannianndanecenieancennaaateaana 1 1 1 Product Description E 1 1 2 Product TE 1 1 3 Product Feature Sisina aa a a 2 1 4 Product Configuratio EE 5 Chapter 2 Hardware Introduction ussus
14. 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 148 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual E Error in startup script xi D Error h_handle returned zero while executing TCL a opan pa ee gees A tee EE De t puts I Retrieved arguments from command line puts I argv E index argv OI puts I argv 1 file c ferogram Fi Files ATMEL Corporation sam ba_2 11 sam ba exe lib tkcon td line 4892 source hapa eng topdir lib tkcon GH file C Program Files ATMEL Corporation sam ba_2 11 sam ba exe main td line 6 It may be another SAM BA is running Stop SAM BA in task manager and then download it again Q5 MDK routines cannot debug online Analysis and Answers This problem occurs mainly caused by the following reasons 1 ULink2 connection or software does not recognize board 2 Max JTAG Clock clock configuration is not right In options menu Options for target XXX gt Debug gt ULINK2 ME Debugger setting gt Max JTAG Clock Max JTAG Clock should choose RTCK 3 Initialization File configuration has problem In debug interface as shown below location 149 MYIR TECH LIMITED www myirtech com Met Make Your Idea Real MYD SAM9X5 User Manual
15. route add default gw 192 168 0 1 Test connection with 202 112 17 137 root at91sam9x5ek 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 52 time 26 592 ms 64 bytes from 202 112 17 137 seq 1 ttl 52 time 25 140 ms 3 Use telnet to access BBS forum root at91sam9x5ek media telnet 202 112 17 137 Telnet 202 112 17 13 h HERAF GI JLP CERNET IE HHK pi h BTA HSE AAR ARs bbhs gznet edu cn 202 112 17 137 gt Warmly Welcome to Bulletin Board Service BBS gt of CERNET Southern Regional Center If you have any problems please send email to scutbbs scut edu cn after YourID to login for It shows telnet test is successful 4 Configure DNS server 107 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 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 root at91sam9x5ek echo nameserver 202 103 24 68 tee etc resolv conf Ping www baidu com to test extranet access root at91sam9x5ek ping www baidu com PING 119 75 217 56 119 75 217 56 56 data bytes 64 bytes from 119 75 21 7 56 seq 0 ttl 54 time 60 990 ms 64 bytes from 119 75 217 56 seq 1 ttl 54 time 59 644 ms Access extranet successfully 4 7 7 RTC Use 1 Install button battery to board 2 System will set initial value at first s
16. Press any key to return to menu gt Phenomenon Indicates Terminal outputs information in detail and headphone outputs audio 3 3 11 twi_eeprom 54 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual gt Purpose This example program demonstrates TWI peripheral accesses an external serial EEPROM chip gt Functional description This example is used to test EEPROM model gt Procedures Download program into board press NRSRT to observe relevant terminal information gt Phenomenon Indicates Terminal information TWI EEPROM Example 2 0 SAM9XX5 EK Compiled Jul 10 2012 16 46 29 l Filling page 0 with zeroes l Filling page 1 with zeroes l Read write on page 0 polling mode l 0 comparison error s found l Read write on page 1 IRQ mode l Callback fired l Callback fired I 0 comparison error s found 3 3 12 usart_serial gt Purpose This example demonstrates USART simulate DBUG gt Functional description On startup the debug information is printed by DBGU port USARTO will send back any character it receives from the HyperTerminal as well as text file gt Procedures Download program into board press NRSRT to observe relevant terminal information USART Serial Example 2 0 SAM9XX5 EK 55 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Compiled Jul 10 2012 17
17. 15 uA Deep 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 e 16 lead SOIC 300 mil wide Processor has two SPI SPIO controls data flash Refer to figure 2 5 VODIOPO Figure 2 5 2 2 5 NANDFLASH NANDFLASH chooses K9F2GO8UOB Its characteristics are as follows gt gt Organization Page size 2K 64 Bytes Block size 128K 4K Bytes 64 Pages Total size 256M 8M Bytes 2048 Blocks Read Operation 10 MYIR TECH LIMITED www myirtech com Mei Make Your Idea Real Random Read 25 us Serial Access 25 ns gt Fast Write Cycle Time Page Program time 200 us Typ Block Erase Time 1 5 ms Typ Power 2 7V 3 6V Data Retention 10 Years Hardware Data Protection Endurance 100 000 Program Erase Cycles Automatic Program and Erase NANDFLASH circuit is shown in figure 2 6 gt gt gt gt gt PD3 PD2 PDO PDT R53 VDDIO 5p5 GES VDDIO R55 2 2 6 Serial EEPROM CLE ALE RE WE CE 470K RB 470K 470K_ WP R56 DNP 16 Von 1 1 01 78 RE I 02 g W 1 03 1 04 Vos z 1 06 1 07 IS Ju 1 08_N C VOS NC I O10_N C gt N C1 011_N C N C2 012_N C 77 N C3 uo13 NC 5 N C4 1 014_N C 5 N C5 1 015_N C 30 N C6 qq N C7 14 N C8 15 N 20 23 24 35
18. Device Target Output Listing User l CACH l Asm l Linker Debug Utilities Settings Use JULINK2 ME ARM Debugger DN Settings mi Load eegen at Startup I Runto mam Dialog DLL Parameter Dialog DLL Parameter D ARMATSS DL p91SAM9X35 TARMA TS9 DU p91SAMSxX35 The following information that appears in the command window shows ddram axf load fails Please restore Initialization File in corresponding engineering as Initialization File tlocation 04 MDK_Source libraries debug_config_ini select 9g 15 9g25 9g35 9x25 9x35 configuration file and Initialization File in Debug tab directly 150 MYIR TECH LIMITED www myirtech com C 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 Pls 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 Pls 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 de
19. Disable CANO then DBGU is available Unavailable Table 2 3 Note 1 JP8 must be disconnected when downloading Program otherwise PC can t recognize board 22 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Chapter 3 MDK Routines 3 1 Overview MDK examples are programs without operating system and its development tool is MDK ARM 4 53 This chapter describes how to use and write test procedures which is as follows 1 MDK development environment to be built and configured 2 MDK sample program debugged compiled and downloaded 3 The test procedures introduce methods and phenomenon including board start DMA ADC LCD Storage System Ethernet and so on 3 2 Preparation 1 Install MDK ARM Version 4 53 development tool and license 2 Prepare for MYD_SAM9X5 development board kits MYD SAM9xX5 series development board includes gt MYD SAM9G15 MYD SAM9G25 MYD SAM9G35 MYD SAM9X25 Vv Vv V WV MYD SAM9X35 3 2 1 Configure and Compile Open test project and take getting started for example Firstly find 04 MDK_Source 01_getting started Project folder and double click project file getting started uvproj then configure project Steps are as follows Note Generally download program by default setting Program is necessary to be checked and stetted 23 MYIR TECH LIMITED www myirtech com UI MYR Make Your Idea Real MYD SAM9X5 User Manual when it can t
20. Jiao E S 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 0x00300030 0x00000000 0x00000000 0x00000000 0x00000000 Ox00300040 0x00000000 0x00000000 0x00000000 0x00000000 _AwanznnAnKA _NALNANNNANNANANA Daepnnnnnnn ALANNANNANNAN _oavanannano I Erasing blocks batch 6 I Erasing blocks batch 7 sam ba_2 11 3 NANDFLASH SendBootFilePmecc E No File Selected sam ba_2 11 3 NANDFLASH SendBootFilePmecc E No File Selected sam ba_2 11 3 Figure 5 11 133 MYIR TECH LIMITED www myirtech com UI Met Make Your Idea Real MYD SAM9X5 User Manual Date modified File name at91sam9x5ek nandflashboot 3 1 bin kd Files of type All Pest z Figure 5 12 6 Download u boot bin file to 0x40000 Department Refer to figure 5 13 134 MYIR TECH LIMITED www myirtech com Mei Make Your Idea Real at91sam9g15 Memory Display MYD SAM9X5 User Manual lay SAM BA 2 11 at91sam9g35 ek lel zl File ScriptFile Link Help pat9isam9g15 Memory Display Start Address 0x300000 Refresh EE E Size in byte s 0x100 C asdi C abit C 16bit 32bit Jinfos 7 Apy 0x00300000 0xEA000020 OxFFFFFFFF 0x00000000 0x08000000 2 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 T 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 0x00300030 0x00000000 0x000
21. Show 82 37 32x48 0 Show 164 76 64x192 0 Show 246 45 64x 192 0 Show 328 6 64x 192 0 Show 410 31 64x192 0 Show 339 70 32x48 0 Show 257 51 64x192 0 Show 175 12 192x64 90 47 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Show 93 135 192x64 90 Show 11 80 64x192 180 Show 70 42 192x64 270 Show 152 165 192x 64 270 Show 234 80 64x192 0 3 3 7 periph_protect gt Purpose This program demonstrates PIO controller behavior gt Functional description This application shows protective mechanism of PIO controller When the write protection is enabled any write attempt to write protected registers is abortted So register won t be modified Besides the write protect register save register offset address gt Procedures Download program into board press NRSRT to observe relevant terminal information i Typing mode gt Phenomenon Indicates Terminal information Peripheral Protect Example 2 0 SAM9XX5 EK Compiled Jul 9 2012 16 42 32 in terminal will into write protect mode while typing U will into unprotected Enter l to enable Write Protect and enter u to disable Write Protect Select the register to be written by a value 0x12345678 0 PIO Enable Register Ox0000 PIO Disable Register 0x0004 PIO Output Enable Register 0x0010 PIO Output Disable Register 0x001 4 PIO Input Filter Enable Register 0x0020
22. Stro NewReq Msdf Std gDesc Stro NewReq Mech Std gDesc Str3 NewReq Msdf Sid gDesc Str3 NewReq Msdf Std sCfg SetCfg 1 MSDFunCfg MSDReset NewReq Mscf gMaxLun Inquiry Sending Inquiry Sent Cplt SendCSW ok Inquiry Sending Inquiry Sent Cplt SendCSW ok W MSDD_ProcessCommand Unknown cmd 0x23 StalN Cplt Stallin WaitHALNewReg Msdf ClrFeat Hit Std cFeat Hit T SendCSW ok Part is omitted 81 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 SAM9X5 development board It includes the development environment to build compile source code image download and Linux application driver example and Qt transplantation tutorials The default startup is that NandFlash start the initial system Product is Linux system at the factory and the NandFlash content distribution and some analysis are as bellows Root FS UBIFS 0x800000 H Linux Kernel U Boot Env G U Boot 0x40000 AT91Bootstrap Us NAND FLASH Figure 4 1 1 BootStrap After power on system the first class boot program is copied automatically to internal SRAM and begins to implement by CPU The main role is to initialize CPU and external RAM and u boot is copied from NandFlash to external RAM and then jump to u boot entry 82 MYIR TECH LIMITED
23. Writing 0x20000 bytes at 0x37A0000 buffer addr 0x20010954 0x20000 bytes written by applet Writing 0x20000 bytes at 0x37C0000 buffer addr 0x20010954 0x20000 bytes written by applet Writing 0x20000 bytes at 0x37E0000 buffer addr 0x20010954 0x20000 bytes written by applet sam ba_2 11 3 Figure 5 17 11 Download userdata_ubifs SAM9X5 ANDROID 2 3 5_r1 img to 0x6400000 Refer to figure 5 18 137 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual ka SAM BA 2 11 at91sam9g35 ek pe eene Link ee p at9 Isam8g15 Memory Display Start Address 0x300000 Refresh Deet format Apolet Kee nea eaa C asci C Sbit C en 32bit ke ae Ox00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 9x00000000 0x00000001 0x00000020 i i 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 0x00300030 0x00000000 0x00000000 0x00000000 0x00000000 0x00300040 0x00000000 90x00000000 0x00000000 0x00000000 nwnn2nnnkn ALANANNNNN ALANNNNNANNA ALNANNNNNNNNA ALAANNNNNN eR eres ere ca R z DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File 2 3 Send File Name C Documents and Settings Administrator MYIR 9X5 A br Gl Receive File Name sl 1 Address tloxspoo00 P ze For Receive File 0x1000 byte s
24. at91sam9g15 Me Te pmecc software ecc no ecc Start Address 0x3d Pmece boot header configuration Applet traces on DBGU ewen 4 Infos v Appl Size in byte s Geif Number of socors per page a l sed Spare size 64 j 0x00300000 poo a as Number of ECC bits required 2 z E 0x00300010 Ko Size of the ECC sector 512 C 1024 0x00300020 poo 0x00300030 Ecc offset 48 5 Bee i n xnnznnnan d a isi 4 r 6 DDRAM Dataflash NIM SRAM SerialFlash AT25 AT26 Download Upload File l T V Send File Name am9 image eglibc ipk v20110624 at91sam9xSek rootfs ubi Receive File Name 2 E Receive File Address ox800000 Size For Receive File 0x1000 byte s Compare sent file with memory Scripts oa jee sam ba_2 12 1 NANDFLASH NandHeaderValue HEADER Oxc0c00405 a lj Ecc type is 2 Ecc Status is 2 F Configure trimffs 0 E PMECC c0c00405 to be Configured I Pmecc header configration successful Lt PMECC configure c0c00405 sam ba_2 12 1 NANDFLASH NandHeaderValue HEADER 0xc0c00405 i Sam ba_2 12 1 USBserial COM13 Board at91sam9x35 ek Figure 4 14 Note Select Enable OS PMECC parameters and click Execute to select Trimffst 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 Virt
25. automatically Refer to figure 3 46 3 Batteries a Y Ports COM amp LPT USB SERIAL CH340 COM1 ca Computer E Monitors s Z Keyboards 2 Standard PS 2 Keyboard 4 U Other devices fm ATMEL AT91 HID TRANSFE a D Human Interface Devices Da USB Input Device Figure 3 46 After installing driver new USB device and HID compliant device are added to human input device Refer to figure 3 47 4 Floppy drive controllers a Ha Human Interface Devices DS HID compliant device QA USB Input Device QA USB Input Device ca IDE ATA ATAPI controllers 72 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual Figure 3 47 Open software 04_MDK_Source 25_usb_hid_transfer hidTest exe and click Read to read HID ID Clicking LED1 LED2 respectively control blue light and red light Refer to figure 3 48 Sample cant opp i EE m Device Information HID Device Device 260 UsagePage Off Usage Off DI ltem Type DEVICE ATTRIBUTES SG Output Pipe OUT Enter Output HID Device ID Input Pipe IN Monitor BUTTONs E Hex 80 C7 1C 02 00 3A 32 31 63 63 37 3A 31 33 38 34 33 39 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BUTTON 1 BUTTON 2 JI mot Is Figure 3 48 Terminal information USB Device HID Transfer Project 2 0 SAM9XX5 EK Compiled Jul 13 2012 11 20 38 DBG key 1 2 used as buttons 1st press to push 2nd press to releas
26. waiting 2 3 minutes it will popup logfile log file automatic which represents automatic writing is completed 5 3 4 Manual Download Note Here to use the 4 3 inch screen image as an example if you are using a different screen sizes please download the corresponding directory image All image files used in this chapter can be found in the directory 02 Images Android 4 3 LCD The NandFlash content of Android system is divided as shown in figure 5 5 128 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual NANDFLASH__ userdata_ubifs SAM9X5 ANDROID 2 3 5_rl ime DadaFs 0x06400000 system_ubifs SAM9X5 ANDROID 2 3 5_rl img SystemFs 0x00500000 ulmage Linux Kernel 0x00200000 ous en andFlas U Boot Env 0x000c0000 u boot bin U Boot 0x00040000 at9 lsam9x5ek Boat nandflashboot 3 1 bin ootsttap Fiugre 5 5 Download Linux by SAM BA manually 1 Complete chapter 5 3 1 and 5 3 2 double click samba v2 11 there appears interface Refer to figure 5 6 ioixi Select the connection USBserial COMS Select your board Jats isam9q35 ek sl JLink speed default Se T Customize lowlevel Figure 5 6 Click Connect to enter SAM BA interface Refer to figure 5 7 129 MYIR TECH LIMITED www myirtech com C M Y iR Make Your Idea Real MYD SAM9X5 User Manual ka SAM BA 2 11 at91sam9g35 ek File ScriptFile Link Help
27. ADC_Touchscreen Example 2 0 SAM9XX5 EK Compiled Jul 9 2012 14 52 50 l cache is already enabled l PO 154 872 l P1 916 388 l P2 958 227 l P3 167 217 l Slope 2070 1916 l TP 542 469 gt 239 242 W X 239 Y 242 Diff 1 106 E Error too big Retry l PO 156 782 l P1 940 876 l P2 957 366 l P3 172 219 l Slope 2091 2520 l TP 548 438 gt 239 166 l Calibration successful SS woe a WH Pressed 236 192 10219 43 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Move 236 192 10219 Release 236 192 Pressed 177 145 4147 Move 213 179 3087 Release 213 179 3 3 4 can gt Purpose The CAN example demonstrates CAN peripheral gt Functional description This example is aimed to demonstrate CAN Test the following CAN operations Simple CAN test CANT Mailbox 5 sends data to CANO Mailbox 1 Messages to 1 Mailbox test CAN1 Mailbox 5 and 6 send data 6 goes first CANO Mailbox 2 receives them but last one is discarded Messages to 1 Mailbox test CAN1 Mailbox 6 and 5 sends data in sequence with ID 0x40 and 0x41 that both can accepted by CANO Mailbox 3 The last data overwrites previous one Remote data request test CANT Mailbox 5 sends remote request to CANO Mailbox 4 to get response data gt Procedures This example can be used in MYD SAM9X25 MYD SAM9X35 board Disconnect JP8 and con
28. C MYR Make Your Idea Real MYD SAM9X5 User Manual 3 Compile u boot Note U boot compiled by default has no debug function u boot directly guild the kernel after starting without time consuming operations such as configuring the network Please refer to 4 5 4 compile u boot for detailed description of u boot compiling tar xjvf 05 Linux_Source U Boot u boot 2010 06 tar bz2 cd u boot 2010 06 make at91sam9x5ek_nandflash_config make CROSS_COMPILE usr local arm 2010q1 bin arm none linux gnueabi There will be u boot bin in u boot 2010 06 directory when compilation is complete 4 Compile Linux kernell used in Android system Unzip Linux kernel to working directory tar xvjf 06 Android_Source Linux_Kernel_For_Android linux 2 6 39 tar 6z2 cd linux 2 6 39 Configure file Select a different configuration file depending on the LCD size LCD_4 3 myir_ MYD SAM9X5_4 3LCD_Android_defconfig LCD_7 0 myir_ MYD SAM9X5_7 0LCD_Android_defconfig LCD_10 2 myir_ MYD SAM9X5_10 2LCD_Android_defconfig According to actual screen size select appropriate configuration files renamed as config cp arch arm configs lt configure file gt config For example 4 3 inch LCD should execute the following command cp arch arm configs myir_MYD SAM9X5_4 3LCD_Android_defconfig config Enter following command to compile Linux kernel make ARCH arm menuconfig pops up formulate box directly and save out make ulmage ARCH
29. DDR2 D10 D3 DDR2 D11 D1 DOR2 D12 Da DDR2 D13 B1 DOR2 D14 B9 DOR2 D15 VDDIOM 1007F dH foor sme E elt Ferber lm ea ca E Jone son J2 _ _DDR_VREF ER VSS TES sl Ce J3 100nF Figure 2 1 5 a i mg 1 Internal clock choose 12 MHz crystal Clock Circuit is shown in figure 2 2 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual Figure 2 2 2 RTC clock chooses 32 768 KHz crystals Circuit is shown in figure 2 3 XIN32 XOUT32 Figure 2 3 3 RMII mode chooses 50MHz clock Circuit is shown in figure 2 4 R70 VDDANA 10K Figure 2 4 2 2 4 Serial DATAFLASH DATAFLASH chooses AT25DF321 Its characteristics are as follows gt Single 2 7V 3 6V Supply gt Serial Peripheral interface SPI Compatible Support SPI Modes 0 and 3 gt 70 MHz Maximum Clock Frequency gt Flexible Uniform Erase Architecture 4 Kbyte Blocks 32 Kbyte Blocks 64 Kbyte Blocks Full Chip Erase gt Individual Sector Protection with Global Protect Unprotect Feature 64 Kbyte Physical Sectors 9 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Vv Vv V WV Hardware Controlled Locking of Protected Sectors Flexible Programming Byte Page Program 1 to 256 Bytes Automatic Checking and Reporting of Erase Program Failures JEDEC Standard Manufacture and Device ID Read Methodology Low Power Dissipation 7 mAActive Read Current Typical
30. Fo Pro Ae nn ae eee Pee eee ne ene EAE A a E A aE ae ey eee ee 51 3 3 10 SSC_ CIMA audio 52 33 11 E E 54 E EE LE ER 55 DG 10 CMACD EE 56 Po Re ET E 57 3 3 15 ASMCI_MUITIMEDIA Car 58 3 3 16 hsmei lee EE 59 3 39 17 SMC NANGHMASMs EE 60 3 39 18 SPI SUT E 62 ay USE audio JEE eebe 63 3 3 20 ueb cd serial 64 3 921 USD CONG s 5icis5dos5 9ssatesecePas saceseaasteyes dont sasesssitouevs lt d sqassveszs EE aa A E Er Eri 65 3 39 22 USD Mid keyboard iscissi nienia i E ERa 66 3 3 29 USD Nid MOUS Eees ae OEE OE ESA 67 3 3 24 USD Mid MS EE 68 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 3 3 25 USD MIG E Lu EC 71 3 93 26 USD IAG Ee 74 3 38 27 USD ilad cde NIG geesde dee Eege 75 3 39 28 USD JAG Cd NSO BEE 77 339 WISE MASSS OrAJE acs a sersacennsseestentpnadeh tad Basstnanadenuaes adealtiaantendndndoameancdsuiaceateieatons 79 Chapter 4 Linux System Gunde sscicscsccsscisicnctsiscsiaasincsacasincncenntaisatshaantenctansantcsaasiaastaneiaten 82 4 e 10 errr ere emer aR remem a oem Lee ee eee 82 4 2 Software Resources as oats aoys cance csesin povxrecin ateabvadeste sevecenvanano sao eeeeneesorades 83 43 Start LINUX SYSTE sisisi errea setae oaens ad aetna deter aa ear aaaeei 84 4 3 1 Install download he E 84 4 3 2 Connect Board and PC sssssssssesssesessssesesrsrsrsrssssssssssssrererensnenenrsrsrsnsnnenenesesrntene 84 4 3 3 Automatical Download EE 85 4 3 4 Manual Download ee 85 4 4 Linux De
31. O0xda third_id_byte 0x10 fourth_id_byte 0x95 If executed successfully there will be mtdO and mtdOrO devices in dev directory Is dev mtd dev mtdO dev mtdOro 2 Erase mid partition the operation is as follows sudo flash_eraseall dev mtd0O flash_eraseall has been replaced by flash_erase lt mtddev gt 0 0 please use it Erasing 128 Kibyte ffeQ000 100 complete 3 Load Angstrom x11 at91sam9 image eglibc ipk v20110624 at91sam9x5ek rootfs ubi to new mtd0 partition Here used dd command to load as follows 99 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual sudodd if Angstrom x11 at91samg image eglibc ipk v20110624 at91sam9x5ek roottfs ubi of dev mtd0 100864 0 records in 100864 0 records out 51642368 bytes 52 MB copied 0 323121 s 160 MB 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 mtdO equipment sudo modprobe ubi mtd 0 2048 Create a new mount point mkdir fsmount Mount it by the following command sudo mount t ubifs ubi0 0 fsmount Is fsmount bin boot dev etc home lib media mnt proc sbin sys tmp usr va Now thate 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 modi
32. PC P Computer cm Disk drives By Display adapters el DVD CD ROM drives aad Floppy drive controllers HS Human Interface Devices Ca IDE ATA ATAPI controllers a Srn Junge af Disk Management Keyboards By Services and Applications A Mice and other pointing devices ke Monitors K Network adapters rO pan A SL YP AT91 USB to Serial Converter COM4 angr IS WRAN COMI Figure 4 3 Here COM8 is machine connection port determined by actual situation here is COM8 SW1 switch is ON and switch 2 is kept OFF 4 Connect J18 to PC by serial cable set up HyperTerminal COM1 115200 8 none 1 COM port number is set by actual situation 4 3 3 Automatic Download Note 1 please pull out SD card before download otherwise an error may occur 2 Here to use the 4 3 inch screen s X11 image as an example If you are using a different size screen or to download Qt image please download the image under the corresponding directory After complete chapter 4 3 1 and 4 3 2 open CD ROM directory 02 Images Linux 4 3 LCD X11 double click at91sam9x5ek_demo_linux_nandflash bat Then SAM BA will download Linux image automatically to board Entire download process takes about 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 85 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 Us
33. and so better able to manage these files Add the path of cross compiler tools to PATH export PATH PATH usr local arm 2010q1 bin Use the cross compiler tool to compile arm none linux gnueabi gcc o ledtest_app ledtest_app c After the above operation if no error is generated in the current directory an executable file named ledtest_app will be generated 4 9 3 Application Use After compilation is completed it will generate executable file ledtest_app copyed to development board by SD card or U disk and then run file in terminal Need to pass two parameters when running applications parameters is used to control two bright LED the first parameter controls LED O is ON the 1 is OFF The second parameter controls 117 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual which LED lights 0 is blue led 1 is red led the specific operation is as follows root at91sam9x5ek media sda4 lediest_app 1 0 MYD SAM9X5 lediest Driver Open Called MYD_SAM9X5_LED Driver Release Calle After the above operation blue LED is off 4 10 Qt Tutorial This section describes the development methods and procedures for GUI application useing Qt in MYD SAM9X8 including two parts The first part describes how to use the Qt cross compiler tool chain provided by the CD ROM general Qt application development only need to use the CD ROM supplied Qt cross tool chain The second part desc
34. arm CROSS_COMPILE usr local arm 2010q1 bin arm none linux gnueabi After compile kernel ulmage in directory arch arm boot is Linux kernel programming file 5 5 Android System Use 140 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 5 5 1 USB Keyboard Test Insert USB keyboard to J15 press the Num Lock key when the lights in the upper right corner turn green it shows usb keyboard can be used 5 5 2 Browse Picture Test 1 Select Gallery icon Gallery interface will pop up if insert SD card Refer to figure 5 19 Figure 5 19 2 Select a picture folder Refer to figure 5 20 All pictures 3 sdcard 3 Figure 5 20 3 View picture the results are shown in figure 5 21 141 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual Figure 5 21 5 5 3 Play Audio Test 1 Select Music icon will pop up music player interface Refer to figure 5 22 Figure 5 22 2 Select Songs option Refer to figure 5 23 142 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 01 What Are Words Unknown artist Bad Romance Lady Gaga Figure 5 23 3 Select a song to play The effect is as shown in figure 5 24 A 00 45 N E Lady Gaga Bad Romance gp Figure 5 24 5 5 4 Ethernet Test 1 Enter interface and select icon Ethenet Refer to figure 5 2
35. be 115 2 Download program into board press NRSRT to observe relevant terminal information 3 Open a terminal application and type the following command line ping 192 168 2 115 gt Phenomenon Indicates Terminal information EMAC Example 2 0 SAM9XX5 EK Compiled Jul 11 2012 08 35 19 MAC 0 45 56 78 9a bc IP 192 168 2 115 l Valid PHY Found 0 l AutoNegotiate complete P Link detected Input the command in terminal ping 192 168 2 115 Refer to figure 3 13 C Wsers MSL gt ping 192 168 2 115 Pinging 192 168 2 115 with 32 bytes of data Reply from 192 168 2 115 bytes 32 time lt ims Reply from 192 168 2 115 bytes 32 time lt ims Reply from 192 168 2 115 bytes 32 time lt ims Reply from 192 168 2 115 bytes 32 time lt ims Ping statistics for 192 168 2 115 Packets Sent 4 Received 4 Lost z loss Approximate round trip times in milli seconds Minimum ms Maximum Ams Average Gms Figure 3 33 3 3 14 emac1 gt Purpose This example demonstrates Ethernet MAC EMAC and Ethernet transceiver 57 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 User Manual gt Functional description Upon startup configure board by a default IP 192 168 2 115 and MAC address test IP by ping command gt Procedures The program can be used in MYD SAM9X25 and requires Network port J11 1 Connect board to network or to PC by crosswire Then set
36. be compiled and downloaded 1 Select project and click right button then select Option for target MYD SAM9X35 or press Alt F7 The Setting window is shown in figure 3 1 EA Options for Target MYS SAM9X35 l esm Device Target Output Listing User C C Asm Linker Debug Utilities Atmel SAMSX35 m Code Generation Xal MHz 12 0 ARM Mode M Operating system None DI T Use Cross Module Optimization System Vi File Sfr IT Use MicroLIB T Big Endian m Read Only Memory Areas default off chip Start Startup rou Oe bes rom CE Figure 3 1 2 Choose SAM9X35 in Device Note The modes are similar to SAM9X35 Steps are shown in figure 3 2 24 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Device tarzet Output Listing User C C Asm Linker Debug Utilities Database Generic CPU Data Base b Device SAMSX35 a SAM4S8A ARMS26EJ S based High performance 32 bit RISC Microcontroller with 1 SAM4S8B A SAM4S8C 0 SAM9G10 Timer Real Time Timer Real Time Clock Two dual port 8 channel DMA Ca Controller Management LCD Controller USB High Speed Host Controller USB High Speed Device Figure 3 2 When default Configuration is completed Target option will have a default configuration automatically Refer to figure 3 1 3 Output options include intermediate file Refer to figure 3 3
37. driver device manger adds COM and keyboard devices gt Procedures Download program into board press NRSRT to observe relevant terminal information When connect to PC by USB cable the LED blinks and host reports a new USB device attachment After installing driver AT91 USB to Serial Converter and HID keyboard on Device is added to device manger Typing 1 make terminal continuously print a while oly typing 1 again make terminal stop printing a gt Phenomenon Indicates After starting board the host will report a new device attachment and install driver automatically After installing driver new device can be found in device manger Refer to figure 3 51 a 1P Ports COM 0 LPT 1 USB SERIAL CH340 COM1 cb Computer Ka Monitors 4 lt Keyboards Z Standard PS 2 Keyboard 4 ta Human Interface Devices Da HID compliant device Figure 3 51 Note If the driver is not installed successfully in figure 3 49 install it manually Loation 04__MDK_Source libraries The installation method can refer to chapter 3 23 Terminal information USB CDCHID Device Project 2 0 SAM9XX5 EK Compiled Jul 13 2012 14 15 47 DBG key 1 2 used as buttons 1st press to push 2nd press to release l CDCDSerial_Initialize l CDCDSerialPort_Initialize l HIDDFunction_Initialize USBD_Init 76 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 U
38. figure 3 42 D Mice and other pointing devices T Monitors S Network adapters 4 Un Other devices iy Atmel Ports COM amp LPT D Processors Figure 3 42 After installing driver there will pop up a dialog box that whether to format disk Refer to figure 3 43 zB Computer Aa Disk drives sy ATMEL Mass Storage MSD USB Device i La WDC WDS000AADS 00S9B0 ATA Device KS Display adapters 23 DVD CD ROM drives RR Floppy drive controllers 5 Human Interface Devices e IDE ATA ATAPI controllers gt S Jungo 69 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 User Manual You need to format the disk in drive J before you can use it Do you want to format it Figure 3 43 Choose to format disk and pop up dialog of formatting removable disk Refer to figure 3 44 Format options Quick Format _ Create an MS DOS startup disk Figure 3 44 After formatting it there is a 10M removable disk Refer to figure 3 45 4 Devices with Removable Storage 3 2 Removable Disk UI Ca DVD Drive F BD ROM Drive OI ee S Wl 597 MB free of 9 97 MB 70 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Figure 3 45 Terminal information USB HIDMSD Device Project 2 0 SAM9XX5 EK Compiled Jul 13 2012 11 03 53 DBG key 1 2 used as buttons 1st press to push 2nd press to release l LUN init RamDisk 22000000 siz
39. gt include lt mach gpio h gt include lt linux device h gt define DEVICE_NAME MYS SAM9X5 ledtest static int LED_Major 0 109 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual struct cdev cdev define LED OFF 0 define LED ON 1 static unsigned long led_table AT91_PIN_PB18 led_blue AT91_PIN_PD21 led_red e static int MYS_SAM9X5_ledtest_open struct inode inode struct file file printk MYS SAM9X5 ledtest Driver Open Called n return 0 static long MYS_SAM9X5_ledtest_ioctl struct file filp unsigned int cmd unsigned long arg if cmd 1 amp amp cmd 0 arg 1 amp amp arg 0 return 1 switch cmd case LED ON if arg at91_set_gpio_value led_table arg 1 else at91_set_gpio_value led_table arg 0 break case LED_OFF if arg at91_set_gpio_value led_table arg 0 else at91_set_gpio_value led_tablefarg 1 110 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual break default return EINVAL return 0 static int MYS_SAM9X5_ledtest_release struct inode inode struct file file printk MYS_SAM9X5_LED Driver Release Called n return 0 static struct file_operations MYS_SAM9X5_ledtest_fops owner THIS MODULE open MYS_SAM9X5 ledtest_open release MYS SAM9X5 ledtest_release
40. host IP 192 168 2 XX Note XX can t be 115 2 Download program into board press NRSRT to observe relevant terminal information 3 Open terminal and type the following command line ping 192 168 2 115 gt Phenomenon Indicates Terminal information EMAC Example 2 0 SAM9XX5 EK Compiled Jul 25 2012 11 36 30 MAC 0 45 56 78 9a bc IP 192 168 2 115 l Valid PHY Found 0 l AutoNegotiate complete P Link detected Input the command in terminal ping 192 168 2 115 Refer to figure 3 14 C Wsers MSL gt ping 192 168 2 115 Pinging 192 168 2 115 with 32 bytes of data Reply from 192 168 2 115 bytes 32 time lt ims Reply from 192 168 2 115 bytes 32 time lt ims Reply from 192 168 2 115 bytes 32 time lt ims Reply from 192 168 2 115 bytes 32 time lt ims Ping statistics for 192 168 2 115 Packets Sent 4 Received 4 Lost z loss Approximate round trip times in milli seconds Minimum ms Maximum ms Average Gms Figure 3 34 3 3 15 hsmci_multimedia_card gt Purpose This example demonstrates HSMCI interface on SAM microcontrollers gt Functional description Open HyperTerminal before running this program run this program HyperTerminal 58 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual will print the test information which includes initialization and performance gt Procedures Download program into board pre
41. j Max JTAG Clock iMHz SE M usenTRST ada m Download Options Verify Code Download M Download to Flash a o e Figure 3 11 IV Use Reset at Startup 4 Click Ctrl F5 or shortcut icon or select Debug gt Start Stop Debug Session to start debug Refer to figure 3 12 DI D work_myir SAMBXS3E SAM9XS MDK Source 01_getting started Project getting starteduvproj pVisiond File Edit View Project Flash T Peripherals Tools SVCS Window Help NIE y a l iiz mes Jarg Im SI MYS Q Reset CPU Project H sl Run F5 SCH MYS SAM9X35 x Stop H startup P Step _ Figure 3 12 3 2 3 Super Terminal Configuration Super Terminal Configuration Opening super terminal configuration configuration parameter is as follows Port comX Serial com1 then X is 1 Baud Rate 115200 Data Bits 8 Parity Bit None Stop Bit 1 31 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual Note if there are no special instructions serial cable is connected to DBUG in MDK program test Download 1 Install samba software version 2 11 or above the installation package in 03 Tools SAM BA file folder If install samba below version 2 11 uninstall it cleanly 2 Connect board to PC by mini USB and power on 3 TurnSW1 SW2 off Note to disconnect the baseboard JP8 jump line otherwise the computer will not r
42. lights flash alternately The above description is that the whole processes of manual download 3 2 5 Automatic Download The example of getting started describes operation and automatic download Location 04 MDK_Source 01_getting started Download 9x35 Directory files are shown in figure 3 25 39 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Name Date modified Type Size __ at9lsam9x5ek dataflashboot bin 2012 07 03 19 13 BIN File at9lsam9x35ekes_test_demo tcl 2 07 03 19 13 TCL File 1 KB L ddram bin 2012 07 09 9 39 BIN File 8 KB L logfile log 2012 07 06 16 11 Text Document 3 KE amp SAM9X35_MDK_dataflash bat 2012 07 06 15 47 Windows Batch File 1 KB Figure 3 25 Firstly click right and edit SAM9X35_MDK_dataflash bat then COM port modified is shown in figure 3 26 J SAM9X35_MDK dataflash bat Notepad N 1 bien File Edit Format View Help samba exe USBserial Elan 91sam9x35 ek atSlsam9x35ekes_test_demo tcl gt logfile log 2 gt 81 ma logfile log Figure 3 26 Native port is COM13 so change COM3 to COM13 if don t know which prots to use please refer to chapter 3 2 3 and save it Note the other doesn t change Then turn SW1 SW2 off Note to disconnect the baseboard JP8 jump line otherwise the computer will not recognize the development board press NRST to reset board After reset it turn SW2 on and double click SAM9X35 MDK_dataflash bat then start t
43. mount a USB device sda fails this error can be ignored Because sda is not a valid partition sda4 in red font above is an effective partition that we mount 2 The system will mount inserted U disk automatically entering the following command to view U disk contents root at91sam9x5ek Is media sda4 9x5 rar GHOSTXP GHO NTLDR helloworld 22222222 TXT MYD S5PV210 PETOOLS rootts tar BOOT NTDETECT COM WXPE sam ba_2 11 exe 3 Unplug U disk directly when the use is completed system will uninstall automatically 4 7 3 SD Card Use 1 MicroSD card is plugged into MicroSD card interface and system will mount automatically 2 When MicroSD card is inserted HyperTerminal displays SD card information mmcoO host does not support reading read only switch assuming write enable mmco0 new high speed SD card at address e624 mmeblk0 mmc0 e624 SU02G 1 84 GiB mmcblk0 detected capacity change from 0 to 1977614336 mmeblkO retrying using single block read 3 View SD card contents root at91sam9x5ek Is media mmcblk0 MyHeartWillGoOn wav 3 Pull out SD card directly system will uninstall it automatically 104 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 4 7 4 Play MP3 Music Before playing music connect headphones or stereo to J7 U disk storages an mp3 music and is inserted into USB interface play music in U disk by mplayer command in terminal root at91sam
44. www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 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 Env Configure environment variables and provide u boot running parameters such as ip address start a command kernel boot parameters 4 Linux Kernel Design Linux 2 6 39 kernel for MYD SAM9X5 5 Root FS Angstrom X11 GUI system file Angstrom Qt no desktop file system 4 2 Software Resources Boot Boot Stram First boot program program u boot Secondary boot program Linux kernel Linux 2 6 39 Linux kernel only for MYD SAM9X5 hardware USB Host driver supports the mode of OHCI and EHCI USB Host transmission USB Device USB Device Driver Gadget Ethernet Ethernet driver MMC SD MMC SD Card driver Device NandFlash NandFlash SmartMedia driver Drivers TWI I2C 12C driver SPI SPI driver AC97 AC97Audio driver LCD Controller LCD driver support 4 3 inch 7 inch 10 2 inch RTC RTC clock driver TouchScreen 4 wire resistive touch screen driver 83 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual PWM PWM pulse width modulation driver UART Serial port driver LED LED driver including GPIO LED PWM LED driver Angstrom X11 X11 file system with a graphical interface System Files Angstrom Qt no
45. 00000 0x00000000 0x00000000 0x00300040 0x00000000 0x00000000 0x00000000 0x00000000 a aAwnn2nnnsn Awyannnnnann Awyanannann ALAANANNANN ALANNNNNNA DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 r Download Upload File SCH SCH Send File Name C Documents and Settings Administrator MYIR 9X5 4 Ki Receive File Name 1 g ses Size For Receive File 0x1000 byte s Scripts Send Boot File M Execute Writing 0x20000 bytes at 0x40000 buffer addr 0x20010954 0x20000 bytes written by applet Writing 0x20000 bytes at 0x60000 buffer addr 0x20010954 0x20000 bytes written by applet Writing OxED2C bytes at 0x80000 buffer addr 0x20010954 OxED2C bytes written by applet sam ba_2 11 8 Figure 5 13 7 Download ubootEnvAndroidNandFlash bin to 0xc0000 Refer to figure 5 14 iy SAM BA 2 11 at91sam9g35 ek JI xi File ScriptFile Link Help Start Address 0x300000 Refresh Display format Applet traces on DBGU Size in byte s 0x100 e asci C an C 16bit 32bit infos 7 Apoy 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 gt 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 0x00300030 0x00000000 0x00000000 ox00000000 0x00000000 0x00300040 0x00000000 0x00000000 0x00000000 0x00000000 lee e D EEET NANNINA
46. 08 53 Start to echo serial inputs Unplug the serial cable from DBUG J18 and insert UARTO J16 The terminal displays Start waiting data by using DMA 1 At this point pressing the keyboard will echo the corresponding character Start waiting data by using DMA aa21dsdgfjhtcgfhdtrasrasssssssssssss 2 Send a txt document Build a text document and send it Refer to figure 3 31and 3 32 File Edit Format View Help TEST MYS SAM9X5 Figure 3 31 Serial COM1 SecureCRT M N File Edit View Options Transfer Script Tools Window Help dod EISES K Enter hos Serial COM1 x Receive ASCI Figure 3 32 Terminal information USART Serial Example 2 0 SAM9XX5 EK Compiled Jul 10 2012 17 08 53 Start to echo serial inputs Start waiting data by using DMA TEST MYD SAM9X5 gt Phenomenon Indicates The phenomenon is explained above 3 3 13 emacO gt Purpose This example demonstrates Ethernet MAC EMAC and Ethernet transceiver gt Functional description 56 MYIR TECH LIMITED www myirtech com C Met Make Your Idea Real MYD SAM9X5 User Manual Upon startup configure board by default IP 192 168 2 115 and MAC address test IP by ping command gt Procedures This example can be used in MYD SAM9G25 G35 X25 X35 and requires Network port J11 1 Connect board to network or to PC by crosswire Then set host IP 192 168 2 XX Note XX can t
47. 25 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual Options for Target MYS SAM9X35 Device Target Output Listing User c Ct Asm Linker Debug Utilities Select Folder for Objects Name of Executable Ze Create Executable amp Je Debug Informatio I Create HEX File Folder IA 9x35 D 4 c EM I Browse Informatio Name S Date modified Create Library 3 aic crf 2012 07 09 8 4 _jaicd 2012 07 09 8 4 _ aic o 2012 07 09 8 4 _ board_cstartup_keil d 2012 07 09 8 4 m 0K Cancel Defaults Help Figure 3 3 Click Select Folder For Objects Popup a dialog box which can select storage path click OK and then user can define executable file name 4 The generated intermediate file folder can be selected in the listing tab Refer to figure 3 4 26 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 User Manual Options for Target MYS SAM9X35 I et Device Target Output Listing se C Ctt Asm Linker Debug Utilities ron EZ asp Assembler Listing Name Date modified _Jaic erf 2012 07 09 8 4 Jaic d 2012 07 09 8 4 LJaico 2012 07 09 8 4 _ board_cstartup_keil d 2012 07 09 8 4 ni OK Cancel Defaults Help Figure 3 4 5 User configuration is shown in figure 3 5 EJ Options for T MYS SAM9X35 z Devic
48. 5 143 MYIR TECH LIMITED www myirtech com Met Make Your Idea Real MYD SAM9X5 User Manual AndroidCalib Atmel Browser Calculator Sm e am Camera Clock Contacts Dev Tools Fiugre 5 25 2 Open Ethernet Refer to figure 5 26 Ethernet Turn off Ethernet Ethernet configuration Configure Ethernet devices Figure 5 26 3 Configure Ethernet Refer to figure 5 27 144 Calendar Downloads MYIR TECH LIMITED www myirtech com e MYR Make Your Idea Real MYD SAM9X5 User Manual Ethernet Turn off Ethernet Figure 5 27 4 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 28 Configure Ethernet device Ethernet Devices ethd Connection T ype S Dbcp Cancel Figure 5 28 5 After configuration is successful input string www baidu com Refer to figure 5 29 145 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual 00 58 Bai as BE F xE AR HB FH WH KP REI WIR haoi BS Figure 5 29 146 MYIR TECH LIMITED www myirtech com 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 Ans
49. 9x5ek media sda4 mplayer thelastone mp3 At this point it can hear music from headphones Terminal prints information as shown below enter Ctrl C to end playing music MPlayer UNKNOWN 4 5 3 C 2000 2010 MPlayer Team Playing thelastone mp3 Alignment trap mplayer 1091 PC 0x002560a0 Address 0x40a1c455 FSR 0x001 Alignment trap mplayer 1091 PC 0x002560a0 Address 0x40a1c455 FSR 0x001 Audio only file format detected Clip info Title Artist Album Year Comment Genre Unknown Forced audio codec mad Opening audio decoder libmad libmad mpeg audio decoder Instr 0xe1d130b0 Instr 0xe1d130b0 AUDIO 44100 Hz 2 ch s16le 224 0 kbit 15 87 ratio 28000 gt 1 76400 Selected audio codec mad afm lipmad lib MAD MPEG layer 1 2 3 AO alsa 48000Hz 2ch s16le 2 bytes per sample Video no video Starting playback A 1 5 01 4 of 239 0 03 59 0 19 7 4 7 5 Network Port Test Note MYD SARM9G15 don t support network MYD SAM9G25 G35 X35 supports a network port used to connect J11 MYD SAM9X25 supports two Ethernet ports and it is used to connect J11 and J10 105 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Connect board to PC by crosswire or a switch or router by straight through cable Please note the method using a crosswire c if board access Internet it requires PC has dual card Connect network card 1 to board network card 2 to network And the
50. BSerial Ports COM amp LPT D Processors Figure 3 36 Updating driver location 04 _MDK_Source libraries usb device there will be additional AT91 USB to Serial Converter COM18 in the device Refer to figure 3 37 amp Network adapters 47 Ports COM amp LPT JJ AT91 USB to Serial Converter COM4 Figure 3 37 Terminal information USB Device CDC Serial Project 2 0 SAM9XX5 EK Compiled Jul 11 2012 11 44 04 l CDCDSerial_Initialize l CDCDSerialPort_Initialize USBD_Init ESC to Enable Disable ECHO on cdc serial TAB to Enable Disable DEBUG log output l VBus configuration l conn 3 3 21 usb core gt Purpose This example demonstrates UD interface on AT91SAM microcontroller gt Functional description Connect PC by USB cable and host will notice USB device attachment gt Procedures Download program into board press NRSRT to observe relevant terminal information connect to PC by USB cable the host reports a new USB device attachment Note some computers maybe not report it The device manger is shown in figure 3 38 gt Phenomenon Indicates New hardware USB device can be found in device manger Refer to figure 3 38 65 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual amp Network adapters 4 Up Other devices Dp Unknown device 1I Ports COM amp LPT D Processors Figure 3 38 Specially Note the left is t
51. Converter and ATMEL Mass Storage MSD USB Deice PC will add a new added 10M removable disk which can be used as a common disk if it is formatted 77 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual gt Phenomenon Indicates After starting board and installing driver host will add a COM device Refer to figure 3 52 a 1P Ports COM 0 LPT fee p AT91 USB to Serial Converter COM22 7 Microsoft Windows You need to format the disk in drive J before you can use it Do you want to format it da Disk drives ca WDC WD3200BPVT 22JJ5TO ATA Device Batteries a 17 Ports COM 0 LPT USB SERIAL CH340 COM1 cb Computer L Monitors a a at Figure 3 52 Terminal information USB CDCMSD Device Project 2 0 SAM9XX5 EK Compiled Jul 6 2012 15 36 27 l LUN init RamDisk 22000000 size 10485760 l RAM Disk init l LUN init LUN blkSize 1 size 20480 l CDCDSerial_Initialize l CDCDSerialPort_Initialize l MSDFun init MSDReset USBD_Init l VBus configuration l conn Rsm Susp Rsm NewReq Cdcf Msdf Std gDesc Dev NewReq Cdcf Msdf Std sAddr SetAddr 5 NewReq Cdcf Msdf Std gDesc Dev NewReq Cdcf Msdf Std gDesc Cfg 78 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual NewReq Cdcf Msdf Std gDesc StrO NewReq Cdcf Msdf Sid gDesc Stri NewReq Cdcf Msdf Std gDesc Dev NewReq Cdcf Mecht Std gDesc Cf
52. E initialized n return 0 fail_create_class cdev_del amp cdev fail_cdev_add unregister_chrdev_region devno 1 return 1 static void exit MYS_SAM9X5_ledtest_exit void printk MYS_SAM9X5 LED DRIVER MODULE EXIT n device_destroy MYS_SAM9X5_ledtest_class MKDEV LED_Major Ou class_destroy MYS_SAM9X5_ledtest_class cdev_del amp cdev unregister_chrdev LED_Major DEVICE_NAME 112 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual module_init MYS_SAM9X5_ledtest_init module_exit MYS_SAM9X5_ledtest_exit MODULE_LICENSE GPL MODULE_AUTHOR Alvin MODULE_DESCRIPTION This is an example of MYS_SAM9X5_LEDTEST drivers MODULE_ALIAS A simplest module 4 8 3 Compile the Driver 1 Modify Kconfig and Makefile in driver char directory Kconfig Use vi to open Kconfig file vi drivers char Kconfig The last of document before endmenu plus the following config LEDTEST tristate ledtest for MYD SAM9X5 default n help this is a driver for MYD SAM9X5 Then save it and exit Makefile Use vi editor to open Makefile vi drivers char Makefile At the end of file add the following obj CONFIG_LEDTEST ledtest o Then save it and exit 2 Configure driver as module to be compiled make ARCH arm menuconfig Select Device Drivers gt Character devices gt the lt M gt ledtest for MYD SAM9X5 in pop up configuration t
53. FIG_MACB 1 Modify to define CONFIG_MACB 1 Run the following command to compile make distclean make at91sam9x5ek_nandflash_config make CROSS_COMPILE usr local arm 2010q1 bin arm none linux gnueabi Is After compiling the u boot bin with debug function will be generated under u boot linux directory 4 5 5 Install and Compile Linux kernel Source Code 1 Install cd 05 Linux_Source Linux_Kernel tar xvjf linux 2 6 39 tar oz2 C cd linux 2 6 39 2 Compile 97 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Compile make_image sh script in source root directory directly sudo chmod a x make_image sh make_image sh 4 3 4 3 represent a 4 3 inch screen Or execute the following command to compile make ARCH arm myir_ MYD SAM9X5_4 3lcd_defconfig make ARCH arm ulmage CROSS_COMPILE usr local arm 2010q1 bin arm none linux gnueabi Note make ulmage command requires compile mkimage tool which has been installed or use a command to install tool sudo apt get install uboot mkimage After compile kernel ulmage file in arch arm boot directory is Linux image files that we need 4 6 Make Linux File System Angstrom x11 at91sam9 image eglibc ipk v20110624 at91sam9x5ek rootfs ubi can be made a simple formulation and revision in system file provided by CD Here take helloworld for an example add an application to file system root directory sh
54. H then you should do it first The path of arm none linux gnueabi used in this article is usr local arm 2010q1 bin you can use the follow command to add path export PATH PATH usr local arm 2010q1 bin Set Qt application development related environment variables The decompressed file setenv contains the setting of environment variables you 120 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual can use the follow commands to compelet setting source usr local Qt setenv Or you can enter the settings manually export PATH PATH usr localQt bin export LD LIBRARY _PATH LD_LIBRARY_PATH usr local Qt lib 3 Burn the image with Qt library Burn the image in the directory of 02 lmages Linux 4 3 LCD Qt in the CD ROM referring to 4 3 4 for the automatically download procedure and 4 3 3 for the manually download This image has already established Qt environment and contained all the needed libraries and function modules which are showed in table 4 2 If the function provided by image can t match the actual needs please refer to next section 4 10 2 establish Qt development from source code to configure our needed function module 4 The compiling and running of Qt application program There are several sample programs under the CD ROM directory 05 Linux_Source Qt_Arm Qt_Examples Here we use masterdetail as an example to tell how to use Qt cross compile tool chain t
55. IKIDI Pr B B H z lag ECC configuration ioj x 0x00300020 0x000000 Ecc type 0x00300030 0x000000 TS pmecc C softwareecc noecc 0x00300040 0x000000 nynnannnsn nynnnnnn Pmecc boot header Number of sectors page 4 d Spare size 64 DDRAM DataFlash AT45DB DCB E Number of ECC bits required 2 Download Upload File Size of the ECC sector 512 1024 Send File Name Ecc offset 48 Receive File Name Vin Address Type NANDFLASH SetNandHeaderValue to get help for pmecc setting To active software ECC using Enable Software ECC command Recommand to erase all after the ecc mode switch between software ECC amp pmecc sam ba_2 11 4 NANDFLASH NandHeaderValue HEADER 0xc0c00405 I User canceled 4 NANDFLASH NandHeaderValue HEADER 0xc0c00405 4 Figure 5 16 10 Download system_ubifs SAM9X5 ANDROID 2 3 5_r1 img to 0x500000 Refer to 136 MYIR TECH LIMITED www myirtech com UC Met Make Your Idea Real MYD SAM9X5 User Manual figure 5 17 kb AM BA 2 11 at91sam9g35 ek Ox00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 Ox00300020 0x00000000 0x00000000 9x00000000 0x00000000 Ox00300030 0x00000000 0x00000000 0x00000000 0x00000000 Ox00300040 0x00000000 0x00000000 0x00000000 0x00000000 Documents and Settings Administrator MYIR 9X5 t
56. NIS support yes CUPS support no Iconv support no Glib support no GStreamer support no Large File support yes GIF support plugin TIFF support plugin qt JPEG support plugin qt PNG support yes qt MNG support plugin qt zlib support yes Session management no Embedded support arm 119 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual Freetype2 support yes 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 OpenSSL support no K 4 2 1 Install Qt cross compile tool to the system directory usr local Create Qt working directory qt arm copy Qt cross compile tool to this directory and decompression GE 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 After decompression two new directories Qt and tslib will appear in usr local The Qt directory contains cross compile tool library and header files The tslib directory contains touch screen test procedures libraries and configuration files 2 Set system environment variables If you have not add the path of arm none linux gnueabi to PAT
57. NNAN NNANNNANNANNA Dapp Dapp gt DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File gt Send File Name fc Documents and Settings Administrator Z MYIR 9x5 4 Receive File Name 1 Gel Address f oxocbooo gize For Receive File 0x1000 byte s Scripts Send Boot File w Execute Compare sent file with memory I Send File C Documents and Settings Administrator SI MYIR 9X5 4 3 LCD ubootEnvAndroidNandFlash bin at address 0x0C0000 GENERIC SendFile C Documents and Settings Administrator A H MYIR 9X5 4 3 LCD ubootEnvAndroidNandFlash bin at address 0xC00 00 I File size 0x20000 byte s Sb Writing 0x20000 bytes at 0xC0000 buffer addr 0x20010954 0x20000 bytes written by applet sam ba_2 11 8 USBserial COM9 Board at91sam9g35 ek Figure 5 14 8 Download Linux kernel ulmage to 0x200000 Refer to figure 5 15 135 MYIR TECH LIMITED www myirtech com Mei Make Your Idea Real MYD SAM9X5 User Manual ka SAM BA 2 11 at91sam9g35 ek i File Script Fie Lik Help m at9isam9g15 Memory Display 11 Start Address 0x300000 Refresh pat ee 1 Size in byte s 0x100 C asdi C shit C 16bit 32bit infos 7 App 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 i 0
58. OM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name Gi Receive File Name Gi Address 0x0 Size For Receive File 0x1000 byte s Compare sent file with memory Scripts Enable Serialflash SPIO CSO e Execute loading history file 0 events added SAM BA console display active Tcl8 5 9 Tk8 5 9 USBserial COM13 Board at91sam9x35 ek Figure 4 5 87 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual 2 Click NandFlash tab and execute Enable NandFlash 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 settings the specific operation is as follows Select Enable NandFlash in Scripts tab and then click Execute to Enable NandFlash Refer to figure 4 6 P SAM BA 2 11 at91sam9x35 e File Script File Link Help at91sam9g15 Memory Display Start Address ox300000 Refresh Display format Applet traces on DBGU ii bii bi bi infos ei A Size in byte s 0x100 C ascii 8 bit 16 bit 32 bit ppl Ox00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x98000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 m a DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EE
59. PROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name S Receive File Name E Receive File Address Size For Receive File 0x1000 byte s Compare sent file with memory Scripts 7 3 Enable NandFlash H Execute To config pmecc parameter using NANDFLASH SetNandHeaderValue pmeccParam pmeccParamValue command Type NANDFLASH SetNandHeaderValue to dispaly current pmecc configuration Type NANDFLASH SetNandHeaderValue to get help for pmecc setting To active software ECC using Enable Software ECO command Recommand to erase all after the ecc mode switch between software ECC amp pmecc N sam ba_2 11 1 z USBserial COM13 Board at91sam9x35 ek Figure 4 6 Select Enable OS PMECC parameters in Scripts tab and then click Execute click OK to use the default settings Refer to figure 4 7 88 MYIR TECH LIMITED www myirtech com Mei Make Your Idea Real MYD SAM9X5 User Manual Size in byte s 0x00300000 OxEA0OOd Pmecc boot header configuration 0x00300010 0x003008 EI Number of sectors per a X 0x00300020 0x00000 EE Spare size 64 Number of ECC bits required 2 T i sector G c DDRAM DataFlash AT45DB D Size ofthe EOL sector ae age SerialFlash AT25 AT26 Ecc offset 48 pmecc software ecc no ecc E traces on DBGU Download Upload File I Trimffs
60. Send File Name 3 Receive File Name SEH Address Scripts 1 2 Enable OS PMECC parameters Z Type NANDFLASH SetNandHeaderValue to dispaly current pmecc configuration Type NANDFLASH SetNandHeaderValue to get help for pmecc setting To active software ECC using Enable Software ECO command Recommand to erase all after the ecc mode switch between software ECC amp pmecc USBserial COM13 Board at91sam9x35 ek _ Figure 4 7 Select Erase All in Scripts tab then click Execute format NandFlash Refer to figure 4 8 89 MYIR TECH LIMITED www myirtech com Mei Make Your Idea Real MYD SAM9X5 User Manual File Script File Link Help m at91sam9g15 Memory Display Size in byte s 0x100 0x00300000 OxEA000020 0x00300010 0x00000000 0x00300020 0x00000000 Start Address 0x300000 Refresh Pe format C ascii 8 bit 16 bit 32 bit E traces on DBGU OxFFFFFFFF 0x00000000 0x08000000 0x00000000 0x00000001 0x00000020 0x00000000 0x00000000 0x00000000 a DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name Receive File Name Address Size For Receive File 0x1000 byte s ei SI Compare sent file with memory L Erasing blocks batch 3 E Erasing blocks ba
61. X5 User Manual Aa Disk drives kega ATMEL Mass Storage MSD USB Device i a WDC WDS5000AADS 00S9B0 ATA Device Sy Display adapters 4 amp 3 DVD CD ROM drives RR Floppy drive controllers Figure 3 53 The host pops up a dialog box that whether to format the removable disk Refer to figure 3 54 and 3 55 r 7 Microsoft Windows You need to format the disk in drive J before you can use it Do you want to format it Figure 3 54 4 Devices with Removable Storaq 4 Devices with Removable Storage 2 Go d DVD RW Drive H aa DVD RW Drive H lt aia S Removable Disk E Removable Disk I mm n WW 1 87 GB free of 1 87 GB Figure 3 52 Before format Figure 3 53 Right After format Figure 3 55 Terminal information USB Device Mass Storage Example 2 0 SAM9XX5 EK Compiled Jul 11 2012 14 27 44 l LUN init RamDisk 22000000 size 10485760 l RAM Disk init l LUN init l LUN blkSize 1 size 20480 l MSDFun init 80 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual MSDReset USBD_Init l VBus configuration l conn Hem Susp Rsm NewReg Msdf Std gDesc Dev NewRegq Mech Std sAddr SetAddr 5 NewReq Msdf Std gDesc Dev NewReq Msdf Std gDesc Cfg NewRegq Msdf Std gDesc Sir3 NewReq Msdf Std gDesc Gi NewReg Msdf Std gDesc Str2 NewReq Msdf Std gDesc Dev NewReq Msdf Std gDesc Cfg NewReq Msdf Std gDesc Cfg NewReq Msdf Std gDesc
62. able then press M which is said as a module Specific operating screenshot is in figure 4 16 figure 4 17 and figure 4 18 113 MYIR TECH LIMITED www myirtech com Met Make Your Idea Real MYD SAM9X5 User Manual Figure 4 16 Figure 4 17 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual virtual terminal Enable character translations in console pe Support for console on virtual terminal E Support for binding and unbinding console drivers Unix98 PTY support J Support multiple instances of devpts Legacy CBSD PTY support 8 Maximum number of legacy PTY in use Non standard serial port support lt gt GSM MUX line discipline support CEXPERIMENTAL dev kmem virtual device support Serial drivers gt TTY driver to output user messages via printk ARM JTAG DCC console lt gt IPMI top level message handler gt lt gt Hardware Random Number Generator Core support lt gt Timer IOMEM Hw Random Number Generator support lt gt Siemens R3964 line discipline lt gt RAW driver C dev raw r awn lt gt TPM Hardware Support gt 3a R buffer Figure 4 18 3 Compile driver module Operation as follows touch drivers char ledtest c make ARCH arm modules CROSS_COMPILE usr local arm 2010q1 bin arm none linux gnueabi After complete the compilation it will generate driver file ledtest ko in drivers char 4 8 4 Doadl
63. andflash Disable Nandflash SW2 Enable Dataflash Disable Dataflash Table 2 2 2 3 Base Board Introduction 2 3 1 Universal Serial Serial circuit is shown in figure 2 9 VDDIOPO c70 71 100nF 100nF VDDIOPOVODIOPO eL C72 c73 d C74 100nF 100nF 13 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Figure 2 9 2 3 2 CAN BUS SAM9X35 and SAM9X25 have two CAN interface which choose TJA1050 chip Its characteristics are as follows gt Vv V WV gt gt gt gt gt gt gt gt CAN Bus circuit is shown in figure 2 10 GND_CAN Fully compatible with the ISO 11898 standard High speed up to 1Mbaud Very low ElectroMagnetic Emission EME Different receiver with wide common mode range for high ElectroMagnetic Immunity EMI 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 and 5V devices Thermally protected Short circuit proof to battery and to ground At least 110 nodes can be connected SMBJ7 0CA L 3 2X21 GND_CAN GND_CAN GND_CAN 14 MYIR TECH LIMITED www myirtech com UI MYR Make Your Idea Real MYD SAM9X5 User Manual GND_CAN GND_CAN GND_CAN GND_CAN Figure 2 10 2 3 3 JTAG Interface JTAG interface which has 20 pi
64. ault without any modification has no debug function Compiling command is as follows make at91sam9x5ek_nandflash_config make CROSS_COMPILE usr local arm 2010q1 bin arm none linux gnueabi Is After compiling the u boot bin without debug function will be generated under u boot linux directory 3 Compile the u boot with debug function 96 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual U boot operation mode can be immediately entered using u boot debug bin by press the Space key or Enter key in the case of connecting serial port after the start of development borad This mode can do tftp download update the image set u boot environment variables etc It will continue to guild the system when no key action is detected As the u boot with debug function will do a series of operations to initialize the network when the system starting the startup speed will greatly slow down ahout 10 to 15 seconds So we strongly recommend to use the u boot without debug function in actual product Modifying the document of u boot linux include configs at91sam9x5ek h is needed to pen debug function Modify CONFIG_BOOTDELAY to be 1 second in the 91th line There will be 1 second s waiting for the input from the keyboard define CONFIG_BOOTDELAY OAI Modify to define CONFIG_BOOTDELAY 1 Cancle the note to CONFIG_MACB in the 168th line thereby opening the network support define CON
65. before transfer 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a l The Source Buffer content after transfer 00 01 02 03 04 05 06 07 08 09 Oa Ob Oc Od Oe Of 00 02 04 06 08 Oa Oc Oe 10 12 14 16 18 1a ic de 00 03 06 09 Oc Of 12 15 18 1b te 21 24 27 2a 2d 46 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 00 04 08 Oc 10 14 18 1c 20 24 28 2c 30 34 38 3c l The Destination Buffer content after transfer 00 01 02 03 5a 5a 5a ba 5a 5a ba 5a 5a 5a 5a ba 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ba 5a ba 5a 5a 5a 5a ba 5a ba 5a ba 5a ba 5a Da 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a Done 3 3 6 Iced gt Purpose This example demonstrates LCD Controller LCDC Note here use 4 3 inch screen as an example gt Functional description This example configures LCDC for LCD to display and then draw test patterns on LCD gt Procedures This package can be used in MYD SAM9G15 G35 X35 Download program into board press NRSRT to observe relevant terminal information Then test pattern image is displayed on the LCD gt Phenomenon Indicates Terminal information LCD Example 2 0 SAM9XX5 EK Compiled Jul 9 2012 16 17 36 l cache is already enabled Test Pattern 480 x 272 80 x 68 Test Cursor 32 x 32 LCD ON
66. bit Word Lengths Master or Slave Clocking Mode Stereo sound output and input The output and input volume control Highly Efficient Headphone Driver Playback only 18mW Analog Pass Through Power only 9mW Available in 28 lead SSOP or 28 lead QFN package WM68731 circuit is shown in figure 2 14 17 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual 7 w AGND AUDIO Ze Kei UPS we 21 RIS An SSR R18 Ann EE SE BAT gp D GAS SAS EE E Figure 2 14 2 3 USB Module 1 USB HOST mode chooses AIC 1526 Its characteristics are as follows 110mQ 5V Input High Side MOSFE Switch 500mA Continuous Load Current per Channel 110A Typical On State Supply Current 1A Typical Off State Supply Current Current Limit Short Circuit Protection gt gt gt gt gt gt Thermal Shutdown Protection under Overcurrent Condition gt Under voltage Lockout Ensures that Switch is off at Start Up gt Output can be Forced Higher than Input Off State gt Open Drain Fault Flag gt Slow Turn ON and Fast Turn OFF gt Enable Active High or Active Low USB HOST Interface circuit is shown in figure 2 15 18 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual lt gt IER of 2 e gt see _ OM 2 1 ENSV HOB aig 2 L Ki CUR USB m pey 2 4 ENV HOCH eno Tam TEE l putat Oe 2 Figure 2 15 2 USB OTG Mo
67. de chooses TPS2051BDBV Its characteristics are as follows 70 mQ High Side MOSFET 500 mA Continuous Current Thermal and short 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 C to 85 C Vv Vv VV VV V Y WV WV ESD Protection USB OTG interface circuit is shown in figure 2 16 19 MYIR TECH LIMITED www myirtech com UI Mei Make Your Idea Real MYD SAM9X5 User Manual 3515 09010101 00 Figure 2 16 20 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 2 3 8 Telephone Interface o o Ki KH z Ta Si DE WD ONS Wwe Ouer ww om mirs SL SPOECSWN OND Wwe ZEL PODIERL Figure 2 17 21 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual 2 4 Jumper Setting JP1 Boot from External Memory Boot from Internal ROM Default JP2 Force Power on Normal Mode 1 2 Connect ADC Reference voltage use analog power 3 3V Defult JP3 2 3 Connect ADC Reference voltage use regulated power 3 0V Disconnect the Backup Battery Power JP4 Backup Battery Support Power P eg Supply JPG Set USARTO as RS485 function Set USARTO as RS232 Function and and output from J19 Output from J16 JP7 Enable CAN1 Disable CAN1 Enable CAN then DBGU is f Jpgitl S
68. ded to human input device in the device manger gt Phenomenon Indicates Anew USB device is added in device manger Refer to figure 3 39 Terminal information USB Device HID Keyboard Project 2 0 SAM9XX5 EK Compiled Jul 13 2012 10 33 42 DBG key 1 2 used as buttons 1st press to push 2nd press to release l HIDDFunction_Initialize USBD_Init I VBus configuration l conn on Typing 1 make terminal print character a continuously while typing 1 again make ow terminal stop printing character a l Key 0 pressed aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Key 0 released l Key 0 pressed aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa l Key 0 released l Key 0 pressed aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaa l Key 0 released 3 3 23 usb hid mouse gt Purpose 67 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual This Example demonstrates UDP and PIO interface on AT91SAM microcontrollers as well as USB Framework gt Functional description This example achieves the function that the USB model control mouse Connect host by USB cable the host report a new device attachment Then control cursor by pressing wsad gt Procedures Download program into board press NRSRT to observe relevant terminal information The host reports a new
69. desktop file system of Qt library transplanted Table 4 1 4 3 Start Linux System 4 3 1 Install Download Tool Here installing Atmel ISP download software SAM BA requires version 2 11 above the software s position in the disc is 03 Tools SAM BA Note to uninstall samba v2 10 and the previous versions SAM BA software and development board USB drive before the installing If you need two or more versions of SAM BA coexist then the different versions of SAM BA should use a different USB port on the PC 4 3 2 Connect Board to PC 1 Board J17 will be connected to PC by micro USB cable and power on by USB 2 Turn SW1 1 2 OFF and disconnect jumper JP8 then restart board the order is not reversed Firstly connect to board it will be prompted to install board driver Then select SAM BA installation directory which can be installed as shown in figure 4 2 ATMEL Corporation O AT91 I5P v1 13 5 sam ba_2 11 D applets CH doc J examples tel_lib Figure 4 2 3 If there is figure 4 3 in my computer gt properties gt Management gt device manager gt port which shows board driver has been installed 84 MYIR TECH LIMITED www myirtech com Mei Make Your Idea Real MYD SAM9X5 User Manual File Action View Help e 26 of Computer Management Local a i System Tools Task Scheduler Bi Event Viewer E Shared Folders amp Local Users and Groups Device Manager an MSL
70. device and installs it automatically and there will be new device in device manger Pressing w a s d respectively represent up down left right can move host cursor Note cursor is in terminal window gt Phenomenon Indicates New USB device can be found in device manger Refer to figure 3 41 E Floppy drive controllers 4 05 Human Interface Devices USB Input Device 5 USB Input Device ca IDE ATA ATAPI controllers S Jungo Figure 3 41 Terminal information USB Device HID Mouse Project 2 0 SAM9XX5 EK Compiled Jul 13 2012 10 52 08 Press W SAD to move cursor l HIDDFunction_Initialize USBD_Init I VBus configuration l conn 3 3 24 usb_hid_msd gt Purpose This example demonstrates USB Device Port UDP interface and other interfaces as well as USB Framework 68 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual gt Functional description This example simulates a USB composite device and Keyboard Connect to host by USB cable and host will notice USB device attachment After installing it there is a 10M removable disk gt Procedures Download program into board press NRSRT to observe relevant terminal information Connect to host by USB cable and host will notice USB device attachment After installing it there is a 10M removable disk gt Phenomenon Indicates After starting board new USB device can be found in the device manger Refer to
71. e Target Output Listing User Joao Asm Linker Debug Utilities r Run User Programs Before Compilation of a C C File Pant TI lr pose Stop Build Rebuild 1 on Exit Code Not Spectied af lr posi Stop Build Rebuild 2 on Ext Code Not Specied x m Run User Programs Before Build Rebuild a a a aa IT Run 1 Jr nosie Gaam rr r Run User Programs After Build Rebuild Io Beet Den M pes Jr Goen IV Beep When Complete Start Debugging ai Cancel Defaults Help Figure 3 5 27 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual The command marked by red box specifies the storage path of generated executable file and user can modify it 6 C C configuration user can add or delete compile files path Refer to figure 3 6 E Options for Target MYS SAM9X35 mm LS Device Target Output Listing User C C Aen Linker Debug Utilities RRR RRR RRR RRR RRR kkrk Preprocessor Symbols BEER Undefine f Language Code Generation I Enable ARM Thumb Interworking T Strict ANSI C Wamings Optimization Level0 00 v I Enum Container always int eunspeciied gt x I Optimize for Time IT Plain Charis Signed Ronee TC Split Load and Store Muttiple I Read Only Position Independent I One ELF Section per Function IT Read Write Position Independent OK Cancel Defaults Help Figure 3 6
72. e l HIDDFunction_Initialize USBD_Init l VBus configuration l conn 81 4f 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00 01 73 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Data In 32 83 4f 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00 01 Data In 32 82 4f 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00 01 Data In 32 83 4f 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00 01 3 3 26 usb_iad_cdc_cdc gt Purpose This example demonstrates UDP interface and other interfaces USB Framework that is used for USB drivers such as USB CDC as well as combination between two USB and single composite device such as Dual CDC port gt Functional description This example simulates USB to RS 232 Serial Port Converter Connect to host by USB cable and host will notice USB device attachment gt Procedures Download program into board press NRSRT to observe relevant terminal information When connecting to PC by USB cable LED blinks and host reports a new USB device attachment Send data to port and observe it in other HyperTerminal connected to USART or USB gt Phenomenon Indicates After starting board the host will report a new device attachment and install driver automatically 74 MYIR TECH LIMITED www myirtech c
73. e 10485760 l RAM Disk init l LUN init l LUN blkSize 1 size 20480 l HIDDFunction_Initialize l MSDFun init MSDReset USBD_Init l VBus configuration l conn Inquiry Sending Inquiry Sent Cplt SendCSW ok Inquiry Sending Inquiry Sent Cplt SendCSW ok W MSDD_ProcessCommand Unknown cmd 0x23 StalN Cplt Stallln WaitHALNewReg Kbd T SendCSW ok ReqSense ReqSense Cplt SendCSW ok 3 3 25 usb_hid_transfer gt Purpose This example demonstrates UDP and PIO interface on AT91SAM microcontrollers as well as USB Framework that is used for USB drivers such as HID 71 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual gt Functional description This example simulates a customized HID device that includes customized data stream of LEDs and buttons Connect to host by USB cable and host will report a new device attachment gt Procedures 1 Download program into board press NRSRT to observe relevant terminal information 2 Connect to PC by USB cable the LED blinks Open hidTest exe Location 04 MDK_Source 25_usb_hid_transfer hidTest exe to test new device information 3 Find HID Device whose VID is 03EB and PID is 6201 select item type and item to see its attributes 4 Type what you want to send in output edit box terminal data displays information gt Phenomenon Indicates After starting board host will report a new device attachment and install driver
74. ecognize the development board press NRST to reset board and you will see tips of installing driver after a certain period of time The device is shown in figure 3 13 a IFP Ports COM amp LPT 9 AT91 USB to Serial Converter COM13 TS USB SERIAL CH340 COM1 Figure 3 13 If driver is not installed correctly install it manually Right click it to update driver software program Note the sample has been properly installed and choose to install it manually Refer to figure 3 14 and 3 18 32 MYIR TECH LIMITED www myirtech com o MYR Make Your Idea Real MYD SAM9X5 User Manual et ae Unknown Devic How do you want to search for driver software gt Search automatically for updated driver software Windows will search your computer and the Internet for the latest driver software for your device unless you ve disabled this feature in your device installation settings gt Browse my computer for driver software Locate and install driver software manually Figure 3 14 Choose to find and install driver software manually Oee Browse for driver software on your computer Search for driver software in this location C Program Files ATMEL Corporation sam ba_2 11 drv Include subfolders gt Let me pick from a list of device drivers on my computer This list will show installed driver software compatible with the device and all driver software in the same category as the device Figure 3 15 Cl
75. ectory Refer to figure 5 2 O ATMEL Corporation AT91 I5P v1 13 O sam ba_2 11 D applets doc ILJ examples O tel_lib Figure 5 2 4 If there is prompt in device manager in figure 5 3 it shows board driver has been Ports COM amp LPT d AT91 USB to Serial Converter COM9 Figure 5 3 installed COMS is connection port determined by actual situation here for COM9 5 3 2 Connect Board and SAM BA 1 Install MYD SAM9X5 USB driver Please refer to 03 Tools SAM BA the board driver install pdf 2 Connect board The specific steps are as follows Connec board to PC by USB line Disconnect jumper JP8 dial switch 1 2 down Press NRST button to reset board and then switch1 2 ON 127 MYIR TECH LIMITED www myirtech com M Y iR Make Your Idea Real MYD SAM9X5 User Manual At this point there will be USB equipment 5 3 3 Automatic Download Note Here to use the 4 3 inch screen image as an example if you are using a different screen sizes please download the corresponding directory image Complete chapter 5 3 1 and 5 3 2 open the disk directory 02 Images Android 4 3 LCD and edit at91sam9x5 bat file Refer to figure 5 4 sam ba exe USBserial Hii AT91SAN9X35 EK at91sam9x5 tcl gt logfile log 2 gt amp 1Enotepad logfile logill Figure 5 4 The original COMx changes correspondence connection port as COM9 Double click at91sam9x5 bat Android image begins to download board automatically
76. er S starts transporting and displays 45 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 User Manual menu gt Phenomenon Indicates Terminal information DMA Example 2 0 SAM9XX5 EK Compiled Jul 9 2012 16 01 08 Menu 1 9 A B Programming DMAC for Multiple Buffer Transfers 1 Single Buffer or Last buffer of a multiple buffer transfer Multi Buffer transfer with contiguous DADDR Multi Buffer transfer with contiguous SADDR Multi Buffer transfer with LLI support Multi Buffer transfer with DADDR reloaded Multi Buffer transfer with SADDR reloaded Multi Buffer transfer with BTSIZE reloaded and contiguous DADDR Multi Buffer transfer with BTSIZE reloaded and contiguous SADDR 9 Automatic mode channel is stalling BTsize is reloaded A Automatic mode BTSIZE SADDR and DADDR reloaded B Automatic mode BTSIZE SADDR reloaded and DADDR contiguous s Start DMA transfer h Display this menu ON OO P WwW bh Programming DMAC for Multiple Buffer Transfers in row 1 Programming DMAC for Multiple Buffer Transfers in row 2 Programming DMAC for Multiple Buffer Transfers in row 10 l Start DMA transfer l The Source Buffer content before transfer 00 01 02 03 04 05 06 07 08 09 Oa Ob Oc Od Oe Of 00 02 04 06 08 Oa Oc Oe 10 12 14 16 18 1a ic ie 00 03 06 09 Oc Of 12 15 18 ib te 21 24 27 2a 2d 00 04 08 Oc 10 14 18 ic 20 24 28 2c 30 34 38 3c l The Destination Buffer content
77. er Manual Note 1 please pull out SD card before download otherwise an error may occur 2 Here to use the 4 3 inch screen s X11 image as an example If you are using a different size screen or to download Qt image please download the image under the corresponding directory Use SAM BA to download Linux manually 1 Complete chapter 4 3 1 and 4 3 2 turn switch SW1 SW2 off restart board and then turn SW1 on open SAM BA to set corresponding parameters Connection is the USBserial COMXX XX is each computer s COM port choose it by actual situation here selected COMS8 board select at91sam9x35 ek And then click Connect specific settings and connected results are shown in figure 4 4 4 5 Select the connection USBserial COM8 si Select your board at91sam9x35 ek JLink speed default Customize lowlevel Connect Exit Figure 4 4 86 MYIR TECH LIMITED www myirtech com 7 MYiR Make Your Idea Real MYD SAM9X5 User Manual File Script File m at9lsam9g15 Memory Display Eau GE Display format Applet traces on DBGU SSC S e RI OAE ig SE infos v A Size in byte s ang ascii C 8 bit C 16 bit 32 bit ppl 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 lt m DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPR
78. er Manual lut Tools Window Help send A e ei Start Zmodem Upload e OF P By Date modified Type 2013 4 1 22 12 File folder 2013 4 1 22 12 File folder J Readme 2013 4 1 22 12 File folder User 2013 4 1 22 12 File folder L i ple wav 2013 4 2 13 36 Wave Sc Figure 3 30 Starting xmodem transmission after clicking OPEN press Ctrl C to cancel transfer and wait end prompt 53 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 100 274 KB 5 KB s 00 00 49 0 Errors ssc_dma_audio Menu W Play the WAV file loaded l Display the information of the WAV file x Receive WAV file with XModem Protocol X Receive WAV file through DBGU Input W to choose WAV file and I to output audio ssc_dma_audio Menu W Play the WAV file loaded l Display the information of the WAV file Pressing W mounts WAV audio and the terminal display ssc_dma_audio Menu l Display the information of the WAV file S Stop playback Pressing I outputs Audio WAV file 22000000 Wave file header information Chunk ID 0x46464952 Chunk Size 281028 Format 0x45564157 SubChunk ID 0x20746D66 SubchunNRST Size 16 Audio Format 0x0001 Num Channels 2 Sample Rate 48000 Byte Rate 192000 Block Align 4 Bits Per Sampl 16 Subchunk2 ID 0x61746164 Subchunk2 Size 280992
79. fy files It should add compiled demo program helloworld to system root directory The operation is as follows sudo cp helloworld fsmount Sync Is fsmount bin boot dev etc helloworld 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 Using the following command if not install mkfs ubifs tools sudo apt get install mtd utils Enter the following command to generate a new UBIFS file system sudo mkfs ubifs r fsmount m 2048 e 126976 c 2024 100 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual o ubifs img mkfs ubifs Parameter Description r Establish the system file directory m Minimum UO transfer unit size e Logical size of erase block c The largest number of erase logic blocks o Specify the output file View smallest I O transfer unit size and logical erase block size by the following command ubinfo dev ubi0 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 Present volumes 0 View e
80. g NewReq Cdcf Msdf Std gDesc Cfg NewReq Cdcf Mech Std sCfg SetCfg 1 MSDFunCfg MSDReset l USB Connect NewReq Cdcf Msdf Std gDesc Stri NewReq Cdcf Msdf Std gDesc Stri NewReq Cdcf Mecht Std gDesc Stri NewReq Cdcf Msdf Std gDesc Stri NewReq Cdcf Cdcs gLineCoding NewReg Cdcf Cdcs sControlLineState 0 0 NewReq Cdcf Cdcs Msdf gMaxLun Inquiry Sending Inquiry Sent Cplt SendCSW ok Inquiry Sending Inquiry Sent Cplt SendCSW ok More information is not a comprehensive display 3 3 29 usb_massstorage gt Purpose This example demonstrates UDP as well as USB Framework that is used for USB drivers such as USB MSD gt Functional description This example simulates a 10M bytes USB disk When connect to host by USB cable board is as USB disk If board with SDRAM the disk can be up to 10M so that read write speed can be tested If there is no SDRAM but only internal flash the disk is about 30K and only small file can be tested gt Procedures Download program into board press NRSRT to observe relevant terminal information When connect to PC by USB cable the host reports a new USB device attachment and Disk installation Then ATMEL Mass Storage MSD USB Device appears in hardware device list and host pop up a dialog box that whether to format removable As shown in figure 3 52 gt Phenomenon Indicates The device manger adds a new device Refer to figure 3 53 79 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9
81. hange please accord to the following steps Turn SW1 SW2 off press NRST to reset board and open samba 2 11 software The same as manual download in chapter 3 24 Then turn SW2 on enable SerialFlash and download sram bin file Specific operation is shown in figure 3 27 3 28 49 MYIR TECH LIMITED www myirtech com 7 MYiR Make Your Idea Real MYD SAM9X5 User Manual File ee ae m at91sam9g15 Memory Display Start Address 0x300000 Refresh Display format Size in byte s 0x100 C ascii C 8 bit C 16 bit 32 bit Ox00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 H m DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM Download Upload Fle Send File Name E Receive File Name Address ai Size For Receive File 0x1000 byte s Compare sent file with memory Scripts Ge E Loading applet applet serialflash sam9g15 bin at address 0x20000000 E Memory Size 0x400000 bytes I Buffer address 0x20009A14 E Buffer size 0x4000 bytes E Applet initialization done sam ba_2 11 4 USBserial COM13 Board at91sam9x35 ek E LUGUNIY Appel Oppie Sel ianiasit Saris UME OL G S UxZuuuUuUUU e I Memory Size 0x400000 bytes F Buffer address 0x20009A14
82. has a high data bandwidth architecture based on 12 layer bus matrix Next generation Memory LPDDR DDR2 support ensures supply and cost efficiency In addition these MPUS feature MLC SLC NAND Flash support 24 bit error code correction Low Power and Low System Cost In backup mode power consumption is only 300UW MHz at 400MHz operation and 8uA 3 3V IOs eliminate the need for external level shifter while 0 8mm ball pitch packages reduce PCB design complexity and cost The following simple lists the basic features of MYD SAM9X5 Electrical parameters gt Operating Temperature 40 C 85 C gt Electrical Specifications 5V power supply gt Mechanical Dimensions Base Board 150 mm x 108 mm CPU module 86 mm x 68 mm Processor gt AT91SAM9G15 G25 G35 X25 X35 32 bits ARM RISC processor runs at up to 400MHz gt 16KB Data Cache 16KB Instruction Cache Memory 2 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual gt gt gt 32KB Chip SRAM 64KB Chip ROM 256MB NandFlash 4MB DataFlash A 128MB DDR2 SDRAM Audio and Video Interface gt gt An Audio 3 5mm Input Interface A Two channel Audio 3 5mm Output Interface LCD Touch Screen Interface gt gt 24 True Color Resolution Current 4 3 inch 480x272 and 7 0 inch 800x480 the highest can reach up to 1280 x 860 Note Only MYD SAM9G15 MYD SAM9G35 MYD SAM9X35 have graphical output func
83. he test result of Winows7 system while the right is the test result of Windows XP system Terminal information USB Device Core Project 2 0 SAM9XX5 EK Compiled Jul 13 2012 09 06 43 l USB initialization USBD_Init l Connecting device l VBus configuration l conn Hem Susp Rsm Std gDesc Dev Sid sAddr SetAddr 5 Std gDesc Dev Std gDesc Cfg Std gDesc Cfg Std gDesc Cfg 3 3 22 usb_hid_keyboard gt Purpose This example demonstrates UDP and PIO interface on AT91SAM microcontrollers USB Framework that is used for USB driver such as USB HID gt Functional description This example simulates a simple keyboard Connect to host by USB cable host reports a new hardware attachment Refer to figure 3 39 SF Network adapters 4 Up Other devices fm ATMEL AT91 HID KEYBOARD 1 Ports COM amp LPT DI Processors a Sound video and game controllers Figure 3 39 After installing driver new USB Device appears in the hardware device list As shown in figure 3 40 66 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual a Floppy drive controllers 4 D Human Interface Devices Q USB Input Device DS USB Input Device ca IDE ATA ATAPI controllers Sr Jungo Keyboards Figure 3 40 gt Procedures Download program into board press NRSRT to observe relevant terminal information PC reports new device and installs it automatically After installing it a new USB device is ad
84. ick on red box to enter driver list Refer to figure 3 16 33 MYIR TECH LIMITED www myirtech com UI Met Make Your Idea Real MYD SAM9X5 User Manual Datemodified Type Gia Network 2012 3 21012 Setup Infe Select the device driver you want to install for this hardwarg Select the manufacturer and model of your hardware device and ti GH disk that contains the driver you want to install click Have Disk T Show compatible hardware BD ROM Dive H Come sl Figure 3 16 Click OK to install driver Refer to figure 3 17 When installation is finished it can be seen in figure 3 18 Figure 3 17 34 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual r ls e meng w Q Update Driver potbware AT91 USB to Serial Converter COM4 ON Windows has successfully updated your driver software Windows has finished installing the driver software for this device AT91 USB to Serial Converter Figure 3 18 After installing samba driver download program into board There are two ways download automatically and manually The below will describe it in detail 3 2 4 Manual Download Getting started program introduces download process Firstly turn on SW1 SW2 Note to disconnect the baseboard JP8 jump line otherwise the computer will not recognize the development board and press NRST to reset board Then open samba sof
85. in EWARM IAR C_SPY the JLINK will disconnect on some PC l Press to switch next clock configuration 3 3 9 pwm gt Purpose This example demonstrates PWM channel configuration Functional description Two PWM channels channel 0 1 are configured to generate two PWM signals Procedures 51 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Download program into board press NRSRT to observe relevant terminal information 1 Connecting pin 7 in J2 to pin 8 in J2 blue LED start glowing repeatedly at f1 2 Connecting pin 7 in J2 to pin 10 in J2 blue LED start glowing repeatedly at f2 gt Phenomenon Indicates Two connection ways led LEDs flashing at different frequencies 3 3 10 ssc_dma_audio gt Purpose This example demonstrates output an audio stream by WM8731CODEC gt Functional description This example plays a pre loaded WAN file into flash The audio stream is outputted by WM873 SSC interface Audio format Format WAV Sample rate 48 kHz gt Procedures Download program into board press NRSRT to observe relevant terminal information ssc_dma_audio Menu x Receive WAV f F e with XModem Protocol X Receive WAV file through DBGU Input x in terminal Transfer wav file with 1K XModem Cir D to cancel Operation can be done in figure 3 29 and 3 30 52 MYIR TECH LIMITED www myirtech com 7 MYiR Make Your Idea Real MYD SAM9X5 Us
86. in e HF SRE CT 91 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 User Manual Figure 4 10 4 Download u boot bin to 0x40000 Refer to figure 4 11 ge Script File Link Help at91sam9g15 Memory Display C ascii C 8 bit C 16 bit 32 bit infos as Apply Size in byte s 0x100 Start Address 0x300000 Refresh Ee format pe traces on DBGU Ox00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 m DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 m Download Upload File 3 1 Send File Name X5 DVD Contents 02 Images Linux 4 3 LCD x11 u boot bin Receive File Name 9 Gi Receive File Address Size For Receive File 0x1000 byte s Compare sent file with memory m Scripts Send Boot File Z Execute 0x20000 bytes written by applet Writing 0x20000 bytes at 0x60000 buffer addr 0x20010954 0x20000 bytes written by applet Writing OxE2B0 bytes at 0x80000 buffer addr 0x20010954 OxE2B0 bytes written by applet sam ba_2 11 1 T USBserial COM13 Board at91sam9x35 ek Figure 4 11 5 Download ubootEnvtFileNandFlash bin to 0xC0000 Refer to figure 4 12 92 MYIR TECH LIMITED www my
87. irtech com Met Make Your Idea Real MYD SAM9X5 User Manual File Script File Link Help m at91sam9g15 Memory Display Start Address 0x300000 Refresh Pe format E traces on DBGU ee Li Li C Li infi v A Size in byte s 0x100 C ascii C 8 bit C 16 bit 32 bit infos ppl Ox00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 Ox00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 a m DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 m Download Upload File 1 Send File Name 3 s 02 Images Linux 4 3 LCD x11 ubootEnvtFileNandFlash bii Gi Receive File Name 2 S Address foxcoooo Size For Receive File 0x1000 byte s Compare sent file with memory Scripts Send Boot File Z Execute 0x20000 bytes written by applet Writing 0x20000 bytes at 0x60000 buffer addr 0x20010954 0x20000 bytes written by applet Writing OxE2B0 bytes at 0x80000 buffer addr 0x20010954 OxE2B0 bytes written by applet sam ba_2 11 1 USBserial COM13 Board at91sam9x35 ek Figure 4 12 6 Download Linux kernel ulmage to 0x200000 Refer to figure 4 13 93 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 User Manual File Script File Link Help m at91sam9g15 Memory Display
88. is added helloworld file in the root directory at91sam9x5ek login root root at91sam9x5ek cd root at91sam9x5ek Is bin etc lib proc tmp boot helloworld media sbin usr dev home mnt sys var Run helloworld as follows root at91sam9x5ek helloword reen pelle Woe argc 1 argv 0 helloword 4 7 Linux Use After running Linux system it can be operated by touch screen operation and carried out by terminal serial Here s how to operate Linux such as U disk SD card mount terminal operation network interface testing and how to play music 4 7 1 Touch Screen Calibration 102 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual Note MYD SAM9X25 and the MYD SAM9G25 board don t have touch screen Entering system will run calibration parameters configuration at the first time If there is still a deviation after using the default calibration parameters recalibrate the touch screen by the following steps 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 at91sam9x5ek login root 2 Run the calibration procedure and click the five corresponding calibration points on the LCD screen The calibration can be carried out root at91sam9x5ek ts_calibrate xres 480 yres 272 Took 33 samples Topleft X 804Y 178 Took 40 samples Topright X 790Y 953 To
89. ject gt Rebuild all target files project or click on shortcut icon to compile The e are shown in page 3 8 SAM9X5 MDK Source 01_getting started Project getting started uvproj pVisiond File Edit View Ce S ch Gad Si New pVision Project ergi gt New Multi Project Workspace eS Se Open Project Project Close Project SCH MYS SAM9 ebe startup Export gt ij chiplibre Manage gt Es boardih E for Target MYS SAM9 G5 DE user Py Remove Item i ER ES main __ d e erm N Options for Target MYS SAM9 35 Alt F7 a read Clean target amp Batch Build Figure 3 8 29 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual There will be executable bin file in the directory of output option or can find a prompt of execute command Refer to figure 3 9 T5 command 1 fromelf exe bin Download 9x35 ddram bin 9x35 ddram axf 9x35 ddram axf 0 Error s 0 Warning s ad Find In Files Build Output i EE S Figure 3 9 At this point the configuration and compilation of MDK routine have been completed 3 2 2 MDK Routine Debug The following is MDK program configuration and it needs a hardware emulator ULink2 in advance If need it please contact company to purchase it 1 After opening project file open the setting dialog box and select Debug Refer to figure 3 10 Options for Target MYS SAM9X35
90. lFlash AT25 AT26 m Download Upload File Send File Name Receive File Name Address Size For Receive File 0x1000 byte s Compare sent file with memory Scripts Enable Serialflash SPIO CSO ze Execute loading history file 2 events added SAM BA console display active Tcl8 5 9 Tk8 5 9 sam ba_2 11 3 sam ba_2 11 3 USBserial COM13 Board at91sam9x35 ek Figure 3 21 After entering the main interface turn SW2 on Refer to figure 3 22 Firstly choose 36 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual SerialFlash AT25 AT26 then set the script as Enable SerialFlash lastly perform Execute PS SAM BA 2 11 at91sam9x35 e ge oh cea file Sine Gk Help m at91sam9g15 Memory Display EE 0x300000 Refresh Display format Applet traces on DBGU l Size in byte s 0100 ascii C 8 bit 16 bit 32 bit Fr 7 Apply Ox00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x900000000 Se gel DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM m m Download Upload File Send File Name Gi Send File Receive File Name E Receive File Address doo O Size For Receive File 0x1000 byte s Compare sent file with memory
91. linux opensource src 4 5 3 tar gz cd qt embedded linux opensource src 4 5 3 Specifies the cross compiler Open mkspecs qws linux arm g qmake conf vi mkspecs qws linux arm g qmake conf Open qmake conf with vi enter the following commands to replace all the arm linux with arm none linux gnueabi then save and exit s arm linux arm none linux gnueabi g Configure Qt configure prefix usr local Qt xplatform qws linux arm g release opensource qt zlib qt libtiff qt libpng qt libmng qt libjoeg make libs nomake docs embedded arm little endian qt freetype depths 8 16 24 qt gfx linuxfb qt kod usb qt mouse pc qt mouse linuxtp qt mouse tslib qt sql sqlite qt3support l usr local tslib include L usr local tslib lib confirm license You can run configure help to view detailed description of parameters configure the appropriate parameters according to the needs Compile and install make 123 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual sudo make install Set the environment variables Run the following command in the current terminal export PATH PATH usr local Qt bin export LD LIBRARY _PATH LD_LIBRARY_PATH usr local Qt lib Or add the above commands to etcprofile file so that the system will automatically set these environment variables when logging 3 Transplant Qt to the development board Copy the library t
92. 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 5 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 Window Cemen View Notification Manager Providers Sys ystem Manager Resource ca MPP Service ANDROID RUNTIME LINUX KERNEL 125 MYIR TECH LIMITED www myirtech com Mei Make Your Idea Real MYD SAM9X5 User Manual Figure 5 1 This chapter describes how to build and run Android 2 3 5 system in MYD SAM9X5 platform include the following main content 1 Build Android system 2 Compile Android 3 Android System use 5 2 Software Resources Software resources are shown in table 5 1 AT91Bootstrap Use to guide Uboot 1 Support NandFlash Erase read and write Boot 2 Support network to download image program Uboot 3 Support settings save the environment variable 4 Sup
93. n in table2 1 AT91SAM9G15 9G25 9G35 9X25 9X35 ARM926EJ Processor S Core frequency at up to 400MHz Memory 128MB SDRAM Flash 256MB nandflash 4MB serial dataflash EEPROM 64KB serial eeprom USB HOST 2 2 2 2 2 USB USB OTG 1 1 1 1 1 Audio Input 1 1 1 1 1 Audio oe Audio Output 1 1 1 1 1 Network ETH Port 2 1 0 1 1 DBGU Serial 1 1 1 1 1 Serial UARTO 1 1 1 1 1 JTAG JTAG Interface 1 1 1 1 1 Support 4 3 7 0 Inch LCD Sp Ge 0 1 1 0 1 Touch Screen Real Time Clock On RTC Board and backup 1 1 1 1 1 battery Extended 20 Pins User 3 3 3 3 3 Interface Extended Interface Power 5V Power Input 1 1 1 1 1 SD Card Micro SD 1 1 1 1 1 CAN CAN Interface 2 2 0 0 0 RS485 RS485 Interface 1 1 1 1 1 User Button 2 2 2 2 2 Button System Button 2 2 2 2 2 Telephone Interface 1 1 1 1 1 Table 2 1 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 2 2 CPU module Introduction 2 2 1 CPU The ARM926EU S processor features a Jazelle technology enhanced 32 bit RISC CPU flexible size instruction and data caches tightly coupled memory TCM interfaces and memory management unit MMU It also provides separate instruction and data AMBA AHB interfaces suitable for Multi layer AHB based systems The ARM926EJ S processor implements the ARMv5TEJ instruction set which includes an enhanced 16x32 bit multiplier capable of single cycle MAC opera
94. nectPin7 CAN1H to Pind CANOL Pin8 CAN1L to Pin10 CANOL serial cable to UARTO press NRSRT to observe relevant terminal information gt Phenomenon Indicates CAN Example 2 0 SAM9XX5 EK Compiled Jul 16 2012 10 59 15 Test start DBGU not available now l 0 210000 CANO Sync OK l 1 210000 CAN1 Sync OK l 0 20a00002 44 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual l 1 a00060 l 0 20a00006 l 1 a00060 l 1 40a00040 CANO 1 Simple test data received CANO 2 Messages to 1 Mailbox received I 0 a0000e CANO 3 Messages to 1 Mailbox OVR received l 1 20a00060 I 0 a0001e CAN1 5 Remote requested data received l 1 20a00062 I 0 a0007e l 1 20a00066 I 0 a0007e l 0 40a0005e CAN1 1 Simple test data received CAN1 2 Messages to 1 Mailbox received l 1 a0006e CAN1 3 Messages to 1 Mailbox OVR received l 0 20a0007e l 1 a0007e CANO 5 Remote requested data received l 0 10007e l 1 10007e Press any key to test again 3 3 5 dma gt Purpose This example demonstrates Atmel s AT91SAM9X5 microcontrollers gt Functional description This example demonstrates DMA data transfer Switch multiple DMA buffers transfer by the corresponding buttons gt Procedures Download program into board press NRSRT to observe relevant terminal information 0 9 A B are transmission choices of DMA buff
95. network card1 and 2 are set to bridge pattern The following test is the mode of crosswire and PC Dual LAN bridg 1 In Network Connections window select two network adapters right click and select bridge to bridge two network cards 2 Configure a current LAN IP address not occupied by other devices by HyperTerminal in this case use address 192 168 0 2 root at91sam9x5ek ifconfig ethO 192 168 0 2 up 3 Test board to PC network by ping command here host IP 192 168 0 3 Ping board ficrosoft Wind C Copyright 1 C Documents and Settings Administrator gt ping 192 Pinging 192 168 0 2 with 32 bytes of data Reply 92 168 0 2 by 2 time time Minimum 2 Documents and Settings Administrator Ping board root at91sam9x5ek 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 64 time 3 767 ms 64 bytes from 192 168 0 3 seq 1 ttl 64 time 0 458 ms 106 MYIR TECH LIMITED www myirtech com C Met Make Your Idea Real MYD SAM9X5 User Manual 4 7 6 Telnet Test 1 Configure IP address root at91sam9x5ek ifconfig ethO 192 168 0 2 up 2 Configure Gateway Test connection with the gateway as follows root at91sam9x5ek ping 192 168 0 1 PING 192 168 0 1 192 168 0 1 56 data bytes 64 bytes from 192 168 0 1 seq 0 ttl 64 time 5 776 ms 64 bytes from 192 168 0 1 seq 1 ttl 64 time 0 484 ms Set 192 168 0 1 as the default gateway root at91sam9x5ek
96. ng NANDFLASH SetNandHeaderValue pmeccParam pmeccParamValue command Type NANDFLASH SetNandHeaderValue to dispaly current pmecc configuration Type NANDFLASH SetNandHeaderValue to get help for pmecc setting To active software ECC using Enable Software ECC command Recommand to erase all after the ecc mode switch between software ECC amp pmecc sam ba_2 11 3 NANDFLASH NandHeaderValue HEADER Oxc0c00405 sam ba_2 11 3 Figure 5 9 131 MYIR TECH LIMITED www myirtech com UC Met Make Your Idea Real MYD SAM9X5 User Manual 4 Select Erase All in Scripts tab and then click Execute Refer to figure 5 10 lay SAM BA 2 11 at91sam9g35 ek Ox00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 Ox00300020 0x00000000 0x00000000 0x00000000 0x00000000 Ox00300030 0x00000000 0x00000000 0x00000000 0x00000000 Ox00300040 0x00000000 0x00000000 0x00000000 0x00000000 ININANKA AwAAANAAAAA_AvAAAAAAAA_A vAAAAAAAA NLANNNNNNN I Erasing blocks batch 2 I Erasing blocks batch 3 I Erasing blocks batch 4 I Erasing blocks batch 5 I Erasing blocks batch 6 I Erasing blocks batch 7 sam ba_2 11 3 Figure 5 10 132 MYIR TECH LIMITED www myirtech com UC Met Make Your Idea Real MYD SAM9X5 User Manual 5 Download at91sam9x5ek nandflashboot 3 1 bin Refer to figure 5 11 5 12 ka SAM BA 2 11 at91sam9g35 ek voam Refresh
97. nput d l Initialize DMA done l Disable DMA done l Initialize DMA done l Disable DMA done DIR Input r l Erase block 10 l Write block 10 l Raw block write speed 4228K s l Read block 10 l Raw block Read speed 6553K s Menu i Dump Nand flash information d Enable or disable DMA r Performance test Raw without ECC s Performance test Software ECC p Performance test PMECC h Display this menu oa Input s l Disable PMECC using Software ECC l Erase block 10 l Write block 10 l Raw block write speed 1506K s l Read block 10 l Raw block Read speed 1899K s Menu 61 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual i Dump Nand flash information d Enable or disable DMA r Performance test Raw without ECC s Performance test Software ECC p Performance test PMECC h Display this menu Input p l Initialize PMECC l Erase block 10 l Write block 10 l Raw block write speed 3542K s l Read block 10 l Raw block Read speed 5041K s Menu i Dump Nand flash information d Enable or disable DMA r Performance test Raw without ECC s Performance test Software ECC p Performance test PMECC h Display this menu Inputting h will display menu 3 3 18 spi_serialflash gt Purpose This example demonstrates set up SPI and read w
98. ns is shown in figure 2 11 VDDIOPO NNNNNNN 15 MYIR TECH LIMITED www myirtech com M Y iR Make Your Idea Real MYD SAM9X5 User Manual Figure 2 11 2 3 4 LCD Interface LCD Hardware interface circuit is shown in figure 2 12 d C35 10uF RN RE PRR RNR NNER NNN ND mum in mm Figure 2 12 2 3 5 User Interface User interface circuit is shown in figure 2 13 5V 3V3 J1 1 a SCk1 PC29 PAS TXD1 KS RXD1 PAG P RTS1 7 1 PC PC22 TXDS Er H RXD3 PODS PC24 RTS3 HM SS SE PA12 SPIO MOSI Pa SEI MISO PATI PA14 SPIO_NPCSO 17 SPIO SPCK PA1 PA30 TWDO EE aa TWCKO PASI ESW 110 33 L D ADVREF 5V 3V3 J2 1 TXD2_232 SS RXD2 232 PB18 ADTRG PWO ECH PB15 AD4 Es PWM PCT PB17 AD6 ia aa SAM PC20 cn PS eh PA22 SP MOSI 715 ge SET MS PAZI SAS SPI NPCSO 17 SPI SPCK PA PCO TWD1 EE TWCKI EC ESW 110 33 L D 16 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual 5V 3V3 _ ESW 110 33 L D Figure 2 13 2 3 6 Audio Module WM8731 Vv Vv V WV Vv Vv Y V V WV Audio Performance e 97dB SNR A weighted 48kHz ADC 100dB SNR A weighted 48kHz DAC 1 42 3 6V Digital Supply Operation 2 7 3 6V Analogue Supply Operation ADC and DAC Sampling Frequency 8KHz 96kHz Selectable ADC High Pass Filter 2 or 3 Wire MPU Serial Control Interface Programmable Audio Data interface Modes e Te Left Right Justified or DSP 16 20 24 32
99. o download program automatically It will pop up a logfile which records steps and information Information is recorded if download fails After downloading program and pressing K1 to reset board program starts to run At this point the process of automatic download has ended The effective of automatic download and manual download is the same so it is recommended to use the automatic download which can save time 3 3 MDK Routine Introduction MDK sample programs are rich which cover board test and use Special Note As to download steps and terminal configuration please refer to chapter 3 2 The following programs are no longer describing how to download and configure terminal Program test requires relevant preparatory work 40 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 3 3 1 getting started gt Purpose This example demonstrates chip startup sequence and core peripherals gt Functional description This program makes two LEDs blink at a fixed rate then type 1 or 2 to control LEDs gt Procedures Download program into board press NRSRT to observe relevant terminal information Typing 1 in terminal make LED1 stop amp restart blinking there will be 1 2 or all 2 in terminal Typing 2 in terminal make LED2 stop amp restart blinking there will be 1 2 or all 1 in terminal gt Phenomenon Indicates Terminal information
100. o compile Qt application program and run in the target board Copy the sample program to Qt working directory qt arm and decompress it cd_ qt arm cp media cdrom 05 Linux_Source Qt_Arm Qt_Examples masterdetail tar gz tar xvzf masterdetail tar gz cd masterdetail Compile the Qt program Before compiling you should ensure that the Qt cross compile chain has been installed and you have already set the environment variables qmake make After executing the above command copy the generated executable file masterdetail to development board to run Is masterdetail chmod 0777 masterdetail masterdetail qws The result is shown below 121 MYIR TECH LIMITED www myirtech com Mei Make Your Idea Real MYD SAM9X5 User Manual Qt Music Archive File Help Artist Details lt all gt ly Album Artist Ane Brun Number of Albums 2 Spending Time With Morgan A Temporary Dive The Great October Sound Stray Dogs One day you ll dance for me New York City Ompa Til Du Der Evig Pint Maestro Ane Brun Ane Brun 2005 Thomas Dybdah 2002 Thomas Dybdahl 2003 Thomas Dybdahl 2004 Kaizers Orchestra 2001 Kaizers Orchestra 2002 Kaizers Orchestra 2005 Title Spending Time With Morgan 2003 4 19 4 10 2 Establish Qt development environment by cross compiling the source code This section tell how the Qt cross to
101. o the development board After installing Qt in order to solve the problem of symbolic links you can first package and then directly extracted it to the development board cd usr local Qt tar zcf lib tar gz lib Copy the packaged compressed file lib tar gz to the development board and then extract it to usr local Qt mkdir p usr local Qt Zar xzvf lib targz C usr local Qt Set the environment variables of the development board The setting of development board environment variables have been written to the etc setqtenv file the environment variable s setting can be completed as long as execute the following command on the development board sourch etc setqtenv Or you can manually enter the settings export QT _QWS_FONTDIR usr local Qt lib fonts export QWS_MOUSE_PROTOstslib dev input touchscreenO export LD _LIBRARY_PATH LD_LIBRARY_PATH usr local Qt lib 4 The compiling and running of Qt application program Please refer to 4 10 1 4 Qt The compiling and running of Qt application program 124 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
102. oad Driver into Board ledtest ko file compiled successfully is copied to SD card or U disk which is loaded in the corresponding directory specific actions are as follows 1 Cancel the trigger by other drivers root at91sam9x5ek cd sys class leds d1 root at91sam9x5ek sys class leds d1 echo none gt trigger root at91sam9x5ek sys class leds d1 cd_ d2 root at91sam9x5ek sys class leds d2 echo none gt trigger 2 load driver module into kernel root at91sam9x5ek cd media sda4 MYD SAM9X5 root at91sam9x5ek media sda4 MYD SAM9X5 Is ledtest ko ledtest_app root at91sam9x5ek media sda4 MYD SAM9X5 insmod _ledtest ko MYD_SAM9X5_LEDTEST DRIVER MODULE INIT register MYD_SAM9X5_ledtest Driver OK Major 249 MYD SAM9X5 lediest initialized 115 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual At this point LED driver has loaded into kernel successfully In the next chapter we will write a simple application to test the driver verifying that the driver is working properly 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 Source Code Compilation Create a ne
103. oard the host will report a new USB device attachment and install it automatically USB Audio Device appears in hardware device list Refer to figure 3 35 63 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual 3 Driver Software Installation E Xe Installing device driver software Desktop speaker 4 Searching preconfigured driver folders ege 4 DS Human Interface Devices 4 Sound video and game controllers Realtek High Definition Audio Figure 3 35 Terminal information USB Device Audio LoopREC Example 2 0 SAM9XX5 EK Compiled Jul 13 2012 10 02 27 USBD_Init 3 3 20 usb_cdc_serial gt Purpose This example demonstrates USB Device Port UDP and USART interface on AT91SAM microcontrollers as well as USB Framework gt Functional description This demo simulates a USB to RS 232 Serial Port Converter Procedures Download program into board press NRSRT to observe relevant terminal information host will report a new USB device attachment Note it may be not appeared in some computers There will be additional serial port after installing driver gt Phenomenon Indicates There will be device in the figure 3 26 64 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual D Mice and other pointing devices amp Monitors Sr Network adapters 4 Un Other devices iy ATSLUS
104. ok 31 samples Bot right X 301 Y 950 Took 34 samples Botleft X 306Y 172 Took 30 samples Center X 550Y 562 33 023254 0 004476 0 489318 330 122131 0 348463 0 004259 Calibration constants 2164212 293 32067 21634884 22836 279 65536 3 After calibration is complete it needs to restart system calibration to take effect The operation is as follows root at91sam9x5ek sync root at91sam9x5ek reboot 4 7 2 U disk Use 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 scsiO usb storage 1 2 1 0 scsi 0 0 0 0 Direct Access Kingston DT 101 G2 PMAP PQ 0 ANSI 0 CCS sd 0 0 0 0 sda 7669824 512 byte logical blocks 3 92 GB 3 65 GiB sd 0 0 0 0 sda Write Protect is off sd 0 0 0 0 sda Assuming drive cache write through 103 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual sd 0 0 0 0 sda Assuming drive cache write through sda detected capacity change from 0 to 3926949888 sda sda4 sd 0 0 0 0 sda Assuming drive cache write through sd 0 0 0 0 sda Attached SCSI removable disk FAT invalid media value 0x01 VFS Can t find a valid FAT filesystem on dev sda EXT2 fs sda error can t find an ext2 filesystem on dev sda FAT invalid media value 0x01 VFS Can t find a valid FAT filesystem on dev sda Note The above orange error system attempting to
105. ol chain and associated library files be generated by compiling Qt Embedded source code Qt s source code and Tslib s source code are in the CD ROM under the directory 05 Linux_Source Qt_Arm Qt_Source Q Establish a working directory cd mkdir qt arm cd qt arm 2 Compile and install tslib Decompress cp media cdrom 05 Linux_Source tslib tar gz tar xvzf tslib tar gz cd tslib Compile and install If you have not add the path of arm none linux gnueabi to PATH then you should do it first The path of arm none linux gnueabi used in this article is 122 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual usr local arm 2010q1 bin you can use the follow command to add path export PATH PATH usr local arm 2010q1 bin Install the two tools automake and libtool firstly sudo apt get install automake libtool Configure tslib you can set up the installation path yourself here install it into usr local tslib autogen sh configure CC arm none linux gnueabi gcc CXX arm none linux gnueabi g prefix usr local tslib host arm linux ac_cv_func_malloc_O_nonnull yes Compile and install make sudo make install 2 Compile and install qt embedded Decompress In the working directory qt arm execute the following commands cp media cdrom 05 Linux_Source qt embedded linux opensource src 4 5 3 tar gz d tar xvzf qt embedded
106. om C MYR Make Your Idea Real MYD SAM9X5 User Manual D Mice and other pointing devices E Monitors S Network adapters a Up Other devices fp Atmel Figure 3 49 If driver is not installed successfully in figure 3 49 install it manually Loation 04 MDK_Source libraries The installation method can refer to chapter 3 23 If the installation is completed there will be two new COM devices Refer to figure 3 50 47 Ports COM amp LPT 127 AT91 USB to Serial Converter COM19 F AT91 USB to Serial Converter COM20 If USB SERIAL CH340 COM1 jai Computer K Monitors Figure 3 50 Terminal information USB Dual CDC Device Project 2 0 SAM9XX5 EK Compiled Jul 13 2012 11 43 44 l DUALCDCDDriver_Initialize l CDCDSerialPort_Initialize l CDCDSerialPort_Initialize USBD_Init l VBus configuration l conn 3 3 27 usb_iad_cdc_hid gt Purpose This example demonstrates USB Device Port UDP interface and other interfaces as well as USB Framework that is used for USB driver such as USB CDC and combination between two USB and a single composite such as CDC HID gt Functional description This example simulates a USB composite device that has USB to Serial RS232 Converter and USB HID Keyboard functions When connect to host by USB cable host 75 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual will notice USB device attachment After installing
107. ow the detailed steps of making file system 4 6 1 Write a Demo Program helloworld Firstly write a simple program helloworld 1 Creat and compile helloworld c vi helloworld c Enter the following in the helloworld c save and exit include lt stdio h gt int main int argc char argv printf Hello World n printf argc d n argc for i 0 i lt argc i printf argv d s n i argv i return 0 98 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 2 Compile helloworld c Add cross compiler tools path to PATH export PATH PATH usr local arm 2010q1 bin Use the cross compiler tool to compile arm none linux gnueabi gcc o helloworld helloworld c Helloworld 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 mid interface while Ordinary PC usually has no mid 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 mid driver Enter the following command by turn sudo modprobe nandsim first_id _byte Oxec second_id_byte
108. port display contrast modify memory content 5 Support the bootm bootargs settings Linux Kernel Linux 2 6 39 Develop Linux kernel for MYD SAM9X5 hardware N Sr port ETHO driver Serial port driver USARTO DBGU USB USB_HOST 2 USB_OTG SMD driver Only provide hardware interface Device SD card driver MicroSD SDCard Dri ane LCD touch LCD driver SPI driver Provide source TWI driver Two Wire Interface that 12C DMA driver Have been tested to provide the source GPIO driver Have been tested to provide the source Android System System Files Files y Have been tested to provide binary image file Table 5 1 5 3 Build Android System This chapter describes how to use image to build Android system 126 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual 5 3 1 Install Download Tool 1 Install Atmel ISP download software SAM BA 2 11 or later CD ROM location 03 Tools SAM BA Note If install SAM BA 2 10 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 2 Power on and connect board J17 to PC by micro USB cable 3 Turn SW1 SW2 down disconnect backplane jumper JP8 and then press NRST button reset board the order is not reversed Firstly connect PC prompts to install driver then can select the location to install SAM BA installation dir
109. rase block number by using the following command ubinfo dev ubi0_0O Volume ID 0 on ubi0 Type dynamic Alignment 1 Size 2024 LEBs 256999424 bytes 245 1 MiB State 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 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 101 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual vol_name rootfs vol_flags autoresize vol_alignment 1 Enter the following command to generate final fsimage ubi file sudo ubinize m 2048 p 128KiB o fsimage ubi ubinize cfg Parameter description of ubinize m The size of minimum input output byte flash unit p The erase block size of FLASH physical o output file Here is different mkfs ubifs parameter p parameter represents the physical erase 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
110. ree AD sampling data values gt Phenomenon Indicates Terminal information ADC12 Example 2 0 SAM9XX5 EK Compiled Jul 9 2012 13 34 14 d DMA Enable Disable s Channel sequence switch 0 1 2 3 TRIGGER mode SW EXT Periodic Continuous Refresh slow gt fast DMA Enabled Trigger mode 0 Sequence 09 00 02 d DMA Enable Disable s Channel sequence switch 0 1 2 3 TRIGGER mode SW EXT Periodic Continuous Refresh slow gt fast DMA Disabled Trigger mode 0 Sequence 09 00 02 Vols mV 09 3300 00 3300 02 3232 42 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 3 3 3 adc_touchscreen gt Purpose This example demonstrates touchscreen events gt Functional description This example firstly initializes LCD and touchscreen controller Then let user do calibration After calibration is done the pen positions and pressure will be outputted in terminal by touching LCD gt Procedures The package can only be used with MYD SAM9G15 G35 X35 Download program into board press NRSRT to observe relevant terminal information Touching the dots on the LCD to calibrate touchscreen the calibration results will be outputted in terminal and LCD Touching LCD the pen position will be outputted in terminal If it isn t calibrated ok and calibrate it again until it succeed gt Phenomenon Indicates Terminal information
111. ribes how the Qt cross tool chain and associated library files be generated by compiling Qt Embedded source code Making one s own Qt development environment is only needed when the Qt library provided by the disc can not meet the needs of Qt development Note Here the image downloaded from 02 lmages Linux 4 3 LCD Qt is taken as an example Please refer to 4 3 4 for the specific automatically download procedure and 4 3 3 for the manually download The PC environment is Ubuntu 10 04 4 10 1 Qt Cross Tool Chain Use General Qt development only need to use the CD ROM supplied Qt cross tool chain The image of the CD ROM in 02 Images Linux 4 3 LCD Qt has already contained the Qt library corresponding to the tool chain thus the Qt proguam complined from the tool chain can directly run on the board Detailed configuration of the Qt cross tool chain provided by the CD ROM is as follow Build libs Debug no Qt 3 compatibility yes 118 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual QtDBus module no QtScriptTools module yes QtXmIPatterns module no Phonon module no SVG module yes WebKit module yes STL support yes PCH support yes MMX 3DNOW SSE SSE2 no no no no iWMMxXt support no IPv6 support yes IPv6 ifname support yes getaddrinfo support yes getifaddrs support yes Accessibility yes
112. rite serial data flash gt Functional description This example tests serial data flash by erasing writing each pages and read write bandwidth gt Procedures Download program into board press NRSRT to observe relevant terminal information Note Turn SW2 on gt Phenomenon Indicates Terminal information SPI with Serialflash Example 2 0 SAM9XX5 EK 62 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Compiled Jul 11 2012 11 02 31 DMA driver initialized with IRQ SPI and AT25 drivers initialized ID read 471f AT25DF321 serial flash detected Flash unprotected Chip is being erased After a certain period of time Checking erase Checking page 16383 Erase successful Programming a walking 1 on all pages Programming page 16383 Walking 1 test successful 3 3 19 usb _audio_looprec gt Purpose This example demonstrates UDP and DACC on AT91SAM microcontrollers as well as USB framework gt Functional description Input loop back sound to a simulated USB Desktop Speaker connect board to host by USB cable and then play music the audio stream is sent to board At the same time the audio stream received is also sent back to host for recording gt Procedures Download program into board press NRSRT to observe relevant terminal information connect PC by USB cable the host reports a new USB device attachment gt Phenomenon Indicates Start b
113. rvice and technical support een SIE ME 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 SAM9X5 series boards which are based on Atmel AT91SAM9X5 series processor AT91SAM9G15 25 35 AT91SAM9X25 35 based on the ARM926E J S kernel Running at up to 400 MHz MYD SAM9X5 have 256MB NandFlash 4MB DataFlash 128MB DDR2 SDRAM and supports Linux 2 6 39 as well as Android 2 3 5 operating system which also provides relevant sources and have rich peripheral interfaces High speed USB2 0 Audio input Audio output LCD interface CAN interface 10 100Mbps Ethernet MAC JTAG debug interface Serial port and Micro SD card interface 1 2 Product Preview DO W H V x Power Switch OP a O g E CH J H f IER PRI poaae RRR Na 4 J ee E es 3 O DIP Switch WKUP EXT Interface Mirco SDCard EXT Interface CPU Board Audion In Audio Out 1 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Figure 1 1 1 3 Product Features Based on AT91SAM9X5 processor MYD SAM9X5 integrates all the chip functions and features The main features are as follows gt Extensive Peripherals for Connectivity Include Ethernet USB2 0 Device USART SD Card and so on High performance Data Speedway Running at up to 400MHz Atmel SAM9X5 series microprocessor
114. s Device Target Output Listing User C C Asm Linker Debug Utilities Use Simulator Settings f Use ULINK2 MEARM Debugger v Limit Speed to Real Time Je Load Application at Startup Jh Run to main T Load Application at Startup V Run to main Initialization File Initialization File TT a Noreres ieboard_somSaSekvesour Ear rm Restore Debug Session Settings r Restore Debug Session Settings Iw Breakpoints MV Toolbox Iw Breakpoints JW Toolbox Je Watch Windows amp Performance Analyzer Je Watch Windows V Memory Display V Memory Display CPU DLL Paramet Driver DLL Paramet SAM DLL Goss SARM DLL Dialog DLL Parameter Dialog DLL Parameter DARMATSS DL L tze TARMATSS DLI Lee 0K ci ie Figure 3 10 2 Check hardware emulator ULink2 30 MYIR TECH LIMITED www myirtech com C MYR Make Your Idea Real MYD SAM9X5 User Manual When connecting ULink2 to board the indicator lights of RUN and COM change blue and then turn off while the indicator lights change red and then remain the same Thus it indicates ULink2 is no problem 3 Clicking Setting in figure 3 10 there will be connection status of ULink2 and development board as well as kernel identification Refer to figure 3 11 ULINK USB JTAG Adapter Serial No v0000145 e ULINK Version Device Family ARM Fimware Version Mi 42 Automatic Detection Manual
115. ser Manual l VBus configuration l conn ol Typing 1 make terminal print a continuously while typing 1 again make terminal stop outputting a l Key 0 pressed aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaa l Key 0 released l Key 0 pressed aaaaaaaaaaaaaaaaaaaaaaaaa l Key 0 released l Key 0 pressed aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa l Key 0 released l Key 1 pressed l Key 1 released l Key 0 pressed aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa l Key 0 released 3 3 28 usb_iad_cdc_msd gt Purpose This example demonstrates UDP interface and other interfaces as well as USB Framework that is used for USB drivers such as USB CDC and combination between two USB and one CDCMSD device such as CDC MSD gt Functional description This example simulates a USB composite device that integrates USB CDC Serial RS232 Converter function and USB Disk function When connect to host by USB cable host will notice USB device attachment After installing the driver there is a COM device and a 10M removable disk gt Procedures Download program into board press NRSRT to observe relevant terminal information When connect to PC by USB cable the LED blinks and host reports a new USB device attachment After installing the driver there will be AT91 USB to Serial
116. ss NRSRT to observe relevant terminal information and then insert a SD card gt Phenomenon Indicates Terminal information Without insertting a SD card Basic MultiMedia Card Project 2 0 SAM9XX5 EK Compiled Jul 11 2012 09 09 37 l Cannot check if SD card is write protected Insert a SD card l SdMmcldentify Cmd5 3 l SD MEM l Card Type 2 CSD_STRUCTURE 0 W SD 4 bit mode l HS Not Supported in SD Rev 0x0 l Set SD MMC clock to 22222K l SD MMC card initialization successful Press Enter l MCK is 133MHz Buffer 2000b754 size 0x400000 i l Re initialize card t Disk R W Verify test T Disk performance test p Change number of blocks in one access for test m Change MCI interface used Input the corresponding command for different operations Input t Test code 1 clr 2 wr 3 rd l Testing block 783232 791423 3 3 16 hsmci_sdcard gt gt Purpose This example demonstrates HSMCI interface Functional description 59 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual gt This example detects initializes SD MMC memory card and performs R W test on it Procedures Download program into board press NRSRT to observe relevant terminal information When prompted that Please insert a card start to initialize and test SD card gt Phenomenon Indicates Terminal information
117. sunsensenrnnnnunnunnennnnnnunnunnunnnnnnunnnnnunnnnnnnnnnnnnnn ennan 6 2 1 CPU module Base Board Resources OVerview cscesssseeeeeeseseerseeeeeeetees 6 2 2 CPU module EE 7 Pa E E ma O E 7 22 2 DDRAM E 7 2 2 9 le 8 2 2 4 Seral DATAFLASH reee oss coca eie ra re E re EE ste ee EEES 9 Te 10 22 6 Serial EEPROM E 11 22 CED arenen mses e E ee ees es 12 2 2 8 Encoding Switch Setting E 13 2 3 Base Board MMM OCI CHONG 5 ac5ccs teaser sede sachin ia as2ce anesdeee ays eee eaten ere eee 13 2 3 1 Universal Serialin nn a eee ace eae 13 2 3 2 CAN H 14 23 3 JLAG Wl 15 2 3 4 LCD Interface eee eee ey te eo eee eer ae eae earn 16 EE Eeer 16 2 3 6 Audio Module WM873 1 0 0 0 cceeseseeseeeeeeeceeeeeeeseseeeeeeceeaeeceeeaeaeeeeeceeeeaeetanaeieeees 17 207 USE lgl 18 2 3 8 Telephone WMGHACG csissccovssscisscten oseeecneitearendadanioneaedanenueaeeaenes 21 24 MOUS Seting E 22 Chapter 3 MDK FOI rceicceccredcsessveiasesesesuserscerscecedscssesviessdedetudarasstedscedessdesecederseavasscdiaa 23 ke 23 KL 23 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual EE EE 23 3 2 2 MDK Fettes 30 GEELEN erer 31 3 24 Manual Download sssini riedi aaie eetet aadik 35 3 2 95 Automatic Ne Le E 39 3 3 MDK Routine ue ee 40 3 3 1 9 10 19 Gin nee nee me ne ee ere 41 B58 AOC AUG LA 41 3 3 3 ade Iouchecreen na R a a a t 43 eee A EE 44 EEN 45 3 3 6 WEE 47 3 3 7 EE Prote e E 48 3 3 8 pme clock SWIG ING D 49
118. tails 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 invoice 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 25622735 Fax 86 0755 2553 2724 Mail to sales myirtech com support myirtech com Website www myirtech com 151 MYIR TECH LIMITED www myirtech com
119. tart time so it needs to set the time after system startup Note that due to X11 system starts Scheduled Tasks service atd writing to hardware by hwclock command RTC will prompt the device is busy error then stop atd service and start it after test Stop atd Service root at91sam9x5ek etc init d atd stop Set system time root at91sam9x5ek date s 2012 07 08 10 36 00 hwclock w Sun Jul 8 10 36 00 BST 2012 Query system time and hardware RTC time root at91sam9x5ek date Sun Jul 8 10 37 13 BST 2012 root at91sam9x5ek hwclock r Sun Jul 8 10 36 22 2012 0 000000 seconds Recovery atd service root at91 sam9x5ek etc init d atd start 108 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 4 8 Linux Driver Development Examples This chapter describes a simple character device driver development achieving the function to control LED 4 8 1 Hardware Schematic PD 5 21 L gt Sor ai K IRLML2502 LED Figure 4 15 Use PD21 interface control D2 by IRLML2502 When it is high LED turns on Port PB18 control D1 directly When it is low LED turns on Refer to figure 4 15 4 8 2 Driver Source Code 1 Create driver file in new kernel Create drive files in driver char directory cd linux 2 6 39 vi drivers char ledtest c 2 Driver source code ledtest c is as follows include lt linux string h gt include lt linux cdev h gt include lt linux fs h
120. tch 4 L Erasing blocks batch 5 F Erasing blocks batch 6 E Erasing blocks batch 7 sam ba_2 11 1 Figure 4 8 USBserial COM13 Board at91sam9x35 ek 3 Download at91sam9x5ek nandflashboot 3 1 bin Refer to figure 4 9 and 4 10 90 MYIR TECH LIMITED www myirtech com 7 MYiR Make Your Idea Real MYD SAM9X5 User Manual File Script File Link Help m at9lsam9g15 Memory Display Start Address 0x300000 Refresh L format Size in bytete l0x100 C ascii C 8 bit C 16 bit E 32 bit Ox00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 lt m DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 m Download Upload File Send File Name Receive File Name Address Size For Receive File 0x1000 byte s Compare sent file with memory Eg Erasing blocks batch 5 E Erasing blocks batch 6 I Erasing blocks batch 7 E No File Selected USBserial COM13 Board at91sam9x35 ek _ Figure 4 9 SOE Ja Feet G at91sam9x5ek nandflashboot 3 L bin 2013 3 28 13 45 I u boot bin 2013 2 25 11 09 u boot debug bin 2013 2 25 11 03 ubootEnvtFileNandFlash bin 2012 8 16 20 00 H A wita OD at9lsam9x5ek nandflashboot 3 1 b
121. teucs ute ncaienaesnseasannacngdnsteanmenseseteespaanmnncndeneaee 109 4 8 3 Compile the Driver eege 113 4 8 4 Load Driver into Board s esssssesssesesesrsrsrsrsessssssssrsrsrsrenerenenrsrsrsrnsnsntntsnsnsnene 115 4 9 Application Development Instance AAA 116 4 9 1 Source Code COmpilatinticassicassssiccossessesaceeseccvecssvatecvses scaseassad ENEE 116 ST UE 117 4 9 3 Application A 117 Chapter 5 Android System Guide csccssscsseeseeessesseesseesseneeseesseesnenesseesseeenenenseeees 125 Del e 125 5 2 Software MESOUPORG geseent ee 126 5 3 Build Android System E 126 5 3 1 Install Re TR E 127 5 3 2 Connect Board and SAM BA E 127 5 3 3 Automatic Download s ssseeeseseseeeessesessssssssssrsrerenenesesrsrsrsrersnsntstsssnsrererenenenese 128 5 3 4 Manual Download s ssssssseeeesesesreressssessssssssrsrsrerenenesesrsrsnsrentnsntstsssnsesrenenenenese 128 5 4 Compile Android System Files i ssscesstssenssesuedeecdentassnvn eadensusvesasannssextestpoedeeobceavens 138 54 1 Android System Principled ie a 138 54 2 Compile System File Secre i a s 139 5 5Android System USES eegend Eecher 140 55 1 USB Keybgard RE 141 5 5 2 Browse Picture TSE sas cccisas veces necectcpvactiecaeSeageennaserain vhaereapactewoneeeepnaaceumees 141 5 5 3 Play Te WR E 142 5 5 4 Ethernet TEE eebe uge geg 143 Appendix WF A cc stseciises tees Gecdat da camineniseuensnnsioivadieancenncunediadecevisiuntenctensceuteersccatmneivelensies 147 Appendix 2 After sales se
122. tion Transmission Interface gt gt Standard JTAG Interface Micro SD Card Interface Serial Ports ADBGU Port Debug Unit AUSARTO Shared With RS485 RS485 Interface sharing with USARTO can switch function by Jumper Two CAN Interfaces Only MYD SAM9X25 and MYD SAM9X35 have CAN Interface 2 High speed USB HOST Interfaces A Mini USB OTG Interface Ethernet MAC MYD SAM9G15 doesn t have Ethernet MAC MYD SAM9X25 has two Ethernet MAC J10 and J11 Others MYD SAM9G25 MYD SAM9G35 MYD SAM9X35 have only a Ethernet MAC LED Indicator gt A Power Indicator CPU module Red 3 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual gt A Users Light System Heartbeat Light CPU module Blue gt A Power Indicator Base Board Red 4 MYIR TECH LIMITED www myirtech com MYIR Make Your Idea Real 1 4 Product Configuration MYD SAM9X5 Development Board 2 1 5 Meters Crossover Cable 3 1 5 Meters Mini USB 2 0 Cable 1 4 5V 2A DC Power adapter 5 Serial Cable 6 Product DVD 7 4 3 7 0 Inch LCD Touch Screen 1 MYD SAM9X5 User Manual Base Board CPU module Include Schematic PDF User Manual Source Code etc optional MYIR TECH LIMITED www myirtech com Mei Make Your Idea Real MYD SAM9X5 User Manual Introduction Chapter 2 Hardware Resource 2 1 CPU module Base Board Resources Overview SAMo9x5 resources are show
123. tions and 16 bit fixed point DSP instructions to enhance performance of many signal processing applications as well as supporting Thumb technology 2 2 2 DDRAM DDRAM chooses H5PS1G63JFR Its characteristics are as follows gt VDD 1 8V 0 1V VDDQ 1 8V 0 1V gt All inputs and outputs are compatible with SSTL_18 interface gt Auto refresh and self refresh gt Organizational structure 8 blanks Page size 2K Bit wide 16bit Total size 64M x 16 Programmable CAS latency 3 4 5and 6 supported Programmable additive latency 0 1 2 3 4 and 5 supported Programmable burst length 4 8 with nibble sequential and interleave mode Full strength driver option controlled by EMR Vv Vv Y V WV Refresh Cycle 0C 85C 7 8us 85C 95C 3 9 us DDRAM circuit peripheral is shown in figure 2 1 7 MYIR TECH LIMITED www myirtech com Mei Make Your Idea Real EBI EBI EBI EBI EBI EBI EBI EBI EBI EBI EBI EBI EBI EBI EBI EBI A3 A5 AS AT A8 A9 A10 A11 SDA10 A13 A14 A16 A17 A18 DOR2_SDCKE DOR2 SDCK DOR2_NSDCK DOR2_NCS1 DOR2 CAS DDR2_RAS DDOR2_ SDWE DORZ DOS DORZ DQso DOR2 DOM1 DORZ DQMO0 EBI A15 M M3 M7 N2 N8 N3 N7 P2 P8 P3 M2 P7 R2 L3 L1 K9 L7 K7 K3 2 2 3 Clock Circuit MYD SAM9X5 User Manual G8 DOR2 DO DDR2 SDRAM G2 DDR2 D1 H5PS1G63JFR H7 DOR2 D2 H3 DDR2 D3 H1 DOR2 D4 Ha DDR2 D5 Fi DOR2 D6 Fo DDR2 D7 cs DDR2 DS C2 DOR2 D9 D7
124. tware its startup interface is shown in figure 3 19 Select the connection USBserial COM13 d Select your board pl JLink speed default IT Customize lowlevel eee Figure 3 19 35 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Selectthe connection USBseriaNCOMI3 7 Selectthe comection USBseralCOMI3 Select your board jat91sam9x35 ek E Select your board Jat91samg15 ek y rk speed at91sam9m10 ekes at91sam9m10 g45 ek at91sam9n12 ek at9 1sam9rl64 ek at91sam9x25 ek gat 1sam9xe128 ek Y Wast91sam9xe256 ek h Wat91sam9xe512 ek V che board Figure 3 20 Refer to figure 3 19 the operation is mainly to choose right board model Note this example use MYD SAMX35 board so we select at91sam9x35 ek If choosing other MYD SAM9xX5 series it needs to select the corresponding model Refer to figure 3 20 The main interface is shown after clicking Connect in figure 3 21 File Ses at91sam9g15 Memory Display Start Address 0x300000 Refresh arent amen ee eee T aE Sech vl A Size in byte s 0x100 C ascii C 8 bit 16 bit 32 bit infos sch Ox00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 A 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 E 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 m DDRAM DataFlash AT45DB DCB EEPROM AT24 Nandflash One wire EEPROM SRAM _ Seria
125. ualBox s Linux based development environment to build pdf 4 5 Installation and Compile 4 5 1 Create a Working Directory mkdir home MYIR_SAM9X5 cd home MYIR_SAM9X5 Copy 05 Linux_Source folder in CD to nhome MYIR_SAM9X5 95 MYIR TECH LIMITED www myirtech com e M Y 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 to usr local directory sudo tar xvjf 05 Linux_Source CrossTool arm 2010q1 202 arm none linux gnueabi tar oz2 C usr local 4 5 3 Install AT91Bootstrap Source and Compile 1 Install tar xvjf 05 Linux_Source AT91Bootstrap AT91Bootstrap 5series_1 2 tar bz2 C 2 Compile cd AT91Bootstrap 5series_1 2 make distclean make at91sam9x5nf_defconftig make CROSS_COMPILE usr local arm 2010q1 bin arm none linux gnueabi At91sam9x5ek nandflashboot 3 1 bin in binary directory is AT91Bootstrap file AT91Bootstrap is a boot loader for ATMEL chip which initialize necessary hardware GPIO Clock SDRAM etc then copy uboot to SDRAM to run 4 5 4 Install uboot Source and Compile 1 Install cd 05 Linux_Source U Boot tar xvjf u boot 2010 06 tar bz2 cd u boot 2010 06 2 Compile the u boot without debug function u boot bin without debug will directly guild the system s starting and not detect the PC keyboard keys when the development borad starts U boot compiled by def
126. unlocked_ioctl MYS_SAM9X5 ledtest_ioctl 8 static struct class MYS_SAM9X5_ledtest_class NULL static int nit MYS_SAM9X5_ledtest_init void int result err dev_tdevno MKDEV LED_Major 0 if LED_Major result register_chrdev_region devno 1 DEVICE_NAME printk Got the Major number by register_chrdev_region In else result alloc_chrdev_region amp devno 0 1 DEVICE_NAME LED_Major MAJOR devno printk Got the Major number by alloc_chrdev_region n if result lt 0 printk DEVICE_NAME can t register major number n return result 111 MYIR TECH LIMITED www myirtech com C Met Make Your Idea Real MYD SAM9X5 User Manual printk register MYS_SAM9X5_ledtest Driver OK Major d n LED Major cdev_init amp cdev amp 8MYS_SAM9X5_lediest_fops cdev owner THIS_ MODULE cdev ops amp MYS_SAM9X5_ledtest_fops err cdev_add amp cdev MKDEV LED_ Major 0 1 if err printk error d adding led n err goto fail_cdev_add MYS_SAM9X5 _ledtest_class class_create THIS MODULE DEVICE_NAME if IS_ERR MYS_SAM9X5_ledtest_class printk Err failed in MYS_SAM9X5_ledtest class n goto fail_create_class device_create MYS_SAM9X5_ledtest_class NULL MKDEV LED_Major 0 NULL DEVICE_NAME at91_set_gpio_output AT91_PIN_PB18 1 at91_set_gpio_output AT91_PIN_PD21 1 at91_set_deglitch AT91_PIN_PB18 1 at91_set_deglitch AT91_PIN_PD21 1 printk DEVICE_NAM
127. velopment Environment Structure 95 4 5 Installation and ua E 95 4 5 1 Create a Working Directory 5 xccccsssadnessinieastesvsancudsstescesnineainieeeeesaneneboaneceneane 95 4 5 2 Install Cross Compiler Tools sssccssscdscais nicssvesscarszassssescorvalsencintaseeemssaneteboasencmreane 96 4 5 3 Install AT91 Bootstrap Source and Compile eceeceeeseeeteeesteeeeteeeeneeeeeees 96 4 5 4 Install uboot Source and Compile AA 96 4 5 5 Install Linux kernel Source Code and Compile 0 ceeeeeeeeeeeeeeeeeeeneeeeeees 97 4 6 Make the Linux File System casi begiert Ee 98 4 6 1 Write a Demo Program helloworld cee ecesseseeseeesceseeseeeeeesseeceteetseeeeeeeataees 98 40 2 MOUNT UBIFS File System srie e 99 4 6 3 Modify UBIFS System Files jac dasiasuscssencsssdseadensacyaas decsnsubesasencesueioetuneanedeaens 100 4 6 4 Regenerate UBIFS System File oo ee eecseseeseeeeeceeeeeeeeeeatseeeeseeaeeeaeseeas 100 4 A USE eee nce eae ee ee 102 4 7 1 Touch Screen Calibration ou eeseeseccsseeesceseceseeeeeeeeeseeeeseeaeseeessceaseeeeesenes 102 47 2 UV EE 103 47 3 SD Card HE 104 Bf ALIPAY MPI MUSIC ossessi rsisi er nvadud daveeasnadeeaGutarsebsjomaambinsene i sneeee 105 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual 4 1 5 Network Port E 105 B76 Tenet TeS E 107 ALTREC E 108 4 8 Linux Driver Development Examples eeessessseceeceseeeceesceseecaeeetseeeeeteatsees 109 48 1 EE 109 4 8 2 Driver Source Cde scsassncsoscsoac
128. w directory and a new ledtest_app c file by vi editor in the directory or copy good file to current directory directly the following for ledtest_app c source include lt stdio h gt include lt stdlib h gt include lt unistd h gt include lt sys ioctl h gt define LED_DEV dev MYS SAM9X5 ledtest int main int argc char argv int fd ret led_num led_status if argc 3 sscanf argv 1 d amp led_num 1 sscanf argv 2 d amp led_status 1 printf r nPlease input correct parameters r n n printf usage r n s lt led_num gt lt led_status gt r n argv 0 printf r nOptions r n printf led_num t 1 for red led O for blue ed un led_status t 1 for ON O for OFF r n n exit 1 if led_status 1 amp amp led_status 0 led_num 0 amp amp led_num 1 printf r nError The parameter value must be 0 or 1 r n printf r nPlease try again r n n exit 1 116 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual fd open ED DEM 0 if fd lt 0 printf r nFail to open device s r n n LED_DEV exit 1 ret ioctl fd led_status led_num if ret lt 0 printf r nFail calling ioctl r n n close fd return 0 4 9 2 Compile Because only one of the source files compiled here so it does not write Makefile if more source file to be compiled recommend to write Makdfile file
129. wers This problem occurs because samba connection cannot be found USBserial COMxx DIP switche SW1 and SW2 off in the control panel disconnect JP8 jumper CANO_RX_EN press NRST reset board then turn SW2 on and then start download Display logfile file as follows It indicates that port isn t right as above I argv 0 USBserial COM3 but connections list is E Connection list USBserial COM13 COM1 which shows native port is COM13 not COM3 and it needs to modify COM port Note COM port is that your host use Q2 Prompt Can t detect known device 147 MYIR TECH LIMITED www myirtech com MYR Make Your Idea Real MYD SAM9X5 User Manual Analysis and Answers This phenomenon isn t dialing on the corresponding switch when enable Serialdataflash or Nandflash Enable Serial dataflash without turning SW2 on enable Nandflash without turning SW1 on whether manual download or automatic download it will have a prompt Automatic download is recorded in logfile file Q3 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
130. x00300020 0x00000000 9x00000000 0x00000000 0x00000000 i 0x00300030 0x00000000 0x00000000 0x00000000 0x00000000 0x00300040 0x00000000 0x00000000 0x00000000 0x00000000 NYNANNANNNARN ALANANNNNAN ALNANNNNNNNA ALANANNNNNNA ALNANNNNNNNA e al gt DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name Receive File Name 3 C Documents and Settings Administrator MVIR SX5 Andr a SendFie e E Receive File Address ne Jl For Receive Fie ox1000 byte s Compare sent file with memory Scripts Send Boot File fai Execute Writing 0x20000 bytes at 0x460000 buffer addr 0x20010954 0x20000 bytes written by applet Writing 0x20000 bytes at 0x480000 buffer addr 0x20010954 0x20000 bytes written by applet Writing 0x10044 bytes at 0x4A0000 buffer addr 0x20010954 0x10044 bytes written by applet sam ba_2 11 3 WSBserial COM9 Figure 5 15 9 Before download file system first enable Trimffs Note be sure to check Trimffs Refer to figure 5 16 SAM BA 2 11 at91sam9g35 ek Fie ScriptFile Link Help at91sam9g15 Memory Display Start Address 0x300000 Refresh ome Ee Eet E i lir DG Size in byte s 0x100 fC asdi C bit C 16bit 32bit infos Apply 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010

Download Pdf Manuals

image

Related Search

Related Contents

Western Digital Xe, 300GB, SAS 6Gbps  AmpliVox S1230 loudspeaker  Voir le programme complet des conférences  Service Manual  KOM I GANG” - AvtaleGiro  Planar Systems 997-7030-00 flat panel desk mount  ClosetMaid 12412 Installation Guide  SL4-RC - AVSL Group  AlcoMate Prestige (Model AL6000) User's Manual  

Copyright © All rights reserved.
Failed to retrieve file