Home

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

image

Contents

1. File Script File Link Help at91sam9g15 Memory Display Start Address 0x300000 Refresh Size in byte s ox100 OxEA000020 0x00000000 0x00000000 0x00300000 0x00300020 C ascii C 8 bit C 16 bit 32 bit ya format OxFFFFFFFF 0x08000 0x00000000 0x00000000 0x00000000 0x00000001 0x00000000 0x00000020 0x00000000 000 ox00300010 E 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 5 5 Compare sent file with memory F Erasing blocks batch 3 I Erasing blocks batch 4 Figure 4 8 USBserial COM13_ Board at91sam9x35 ek a 3 Download at91sam9x5ek nandflashboot 3 1 bin Refer to Figure 4 9 and 4 10 File Script File Link Help m at91sam9g15 Memory Display Start Address 0x300000 Refresh Size in byte s 0x100 OxEA000020 0x00000000 0x00000000 0x00300000 0x00300010 C ascii C 8 bit C 16 bit 32 bit ya format OXFFFFFFFF 0x00000000 0x00000000 0x00000000 0x00000001 0x00000000 0x08000000 0x00000020 0x00000000 0x00300020 a m Download Upload File DDRAM DataFlash AT45DB DCB EEPROM AT24 Nand
2. at91sam9g15 Memory Display FP ECC configuration eae t Start Address 0x300000 Ecc type Applet traces on DBGU info Al Size in byte s 0x100 pmecc C software ecc no ecc moe g ppt a 0x00300000 OxEA000 p i header configuration a 0x00300010 0x003008 fa lumber of sectors per page 0x00300020 0x00000 f pS per pege Spare size 64 m all Number of ECC bits required 2 Yi Size of the ECC sector 512 C 1024 DDRAM DataFlash AT45DB SerialFlash AT25 AT26 Download Upload Fil ae I Trimffs Send File Name 3 Send File Receive File Name ox Receive File Address 0x0 x pare sent file with memory Scripts x E enable OS PMECC parameters i execute 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 12 1 NANDFLASH NandHeaderValue HEADER 0xc0c00405 sam ba_2 12 1 USBserial COM13 Board at91sam9x35 ek Figure 4 7 87 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Select Erase All in Scripts tab then click Execute format NandFlash Refer to Figure 4 8
3. U24 3V3 ADM2483 5V_485 5V_485 VDD1 von H el_c120 el_c121 100nF R 100nF 7 GNDA GND2 Hig 1K GND1 GND2 a2 AGND 480 RS485_1B 3 R5485_RXD0 lt RXD Rs485_TxDO gt 5 xD gps RSABS TA R20 4 4 1208 N N 4 g RE 1 Rs485_RTS0 gt be nei PY D2 p23 433 ra Nea La Reio SMBJ7 0CA SMBJ7 OCA NV a E SMBJ_2_2X2_1 SMBJ_2_2X2_1 T 1000F A A AGND_485 AGND_485 AGND_485 Figure 2 17 2 3 10 External UART MYD SAM9X5 V2 extends two 5 lines UART by SC16IS Port lts key features are as follows gt Full Duplex UART IIC SPI Port Working Voltage 3 3 V Industrial Temperature Range 40 C to 95 C 64 bytes in FIFO Sending and Receiving Automatically using Hardware Flow Control Automated Software Flow Control Single Double X on X off Characters Eight Programmable lO pin Vv Vv V VW VW VW VW WV WV Support RS485 The External 5 lines UART circuit is shown in Figure 2 18 19 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 343 SC1BIST52IPW 317 RAZR 122 123 33 8 28 4 2 Tee ree ks 4 wo GPIOTRIA P57 3 948 7 GPIOBICDA 55 5 pet 5 T 100nF 25 7 qu E 11 J SPIOADRSA a SPI_CTSA El PD18 gt 2220 S RESET RTSA 5 iE L as RXA a sss TA P020 gt www E25_0R 16 Re Ta E SPI_TXA SPI Az PA lt __ CS A2C_A0 PAZ SPIO MOS SPI FLASH paiz L rat AAA SPI
4. File Script file Link Help at91sam9g15 Memory Display Display format C ascii C 8 bit C 16 bit 32 bit Start Address 0x300000 Refresh Size in byte s ox100 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 m f DDRAM DataFlash AT45DB DCB EEPROM Ar24 Nandrlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name Send File Receive File Name Address 0x0 Size For Receive File 0x1000 byte s Compare sent file with memory Scrip 7 13 Enable NandFlash M 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 ECC command Recommand to erase all after the ecc mode switch between software ECC amp pmecc po sam ba_2 11 1 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 j vV BA 2 12 at91sam9x35 ek 2 37 File Script File Help
5. MYD SAM9X5 V2 User Manual 54 343 el cez el ces TO 10uF J14 J 2 oo ava 2 go i LCDDATO R DNP BLUEO 7 8 BLUE RB DNP LCODATI pco lt gt WWW oo WV lt _ gt PC1 SA E f Se ln a LCDDAT6 R amp S ANA 27R BLUES 43 goa 14 BLUE R54 ANA 27R LCDDAT lt gt rcs Pcs lt gt LCDDATS RSS RAAI DNP GREENO 15 ao 16 GREEN1 RSS RAAI DNP LCDDATS Per ES lt gt LCDDATIO RS ANA 27R GREENZ 17 po 18 GREENS R LCODATIA lt gt rog Peio lt gt LCDDAT12 RSS WVV 27R GREEN4 19 po 20 GREENS R amp D RAAI 27R LCDDAT13 lt gt C11 pei lt gt ebara Ret GREENS 7 90 2 GREENT RE2 LODDATIB gt PC13 pc14 lt gt LCDDATA16 RES RAAI DNP REDO 23 po 24 RED1 RO eV DNP LCDDAT17 lt gt Pc15 UTXDA_LCODATAS __ gt Tepparte___ros_ VV 27R REDZ 2 99 5 REDS RES VV R LCODA TIO gt PC17 LCDDAT2ZO R67 AA 27R RED4 27 go 28 REDS Ree 8 27R LCDDAT21 LCDDAT22 LCDDATZ22 RES ba 27R RED 29 oo 30 RED R70 27R LCDDAT23 LCDDATZ3 31 oo 32 BL_CN R71 W 27R LCDPW M LEDPWM Po gt RESET R72 AN 27R RESET 33 oo 34 DISP R73 EVV 27R LCDDISP lt lt LEDDISP Pe AM R74 NNV 27 TNT_TP 35 99 5 RSTIP R75 ANV ZTR GPIO mv PAS lt gt TWC KO R76 ANV 27R TWCK 37 oo 38 TWO R77 ANV 27R TWDO PAZO 7 88 uo DEN REV LEDDEN gt TO ey Pc27 lt gt LCDVSYNC R79 AVV 27R VSYNC 41 oo 42 HSYNC Reo AWW 27R LCDHSYNC LEDHSYNC oe lt Mw 27h go s TP_XL RE yy 278 A
6. AGNO AUDIO Figure 2 13 2 3 8 USB Module 1 Mini USB THE HOST Device chooses AIC1526 Its key features are as follows Vv Vv Y V WV 110mQ 5V Input High side MOSFE Switch 500mA Continuous Load Current per Channel 110uA Typical On state Supply Current 1uA Typical Off state Supply Current Current limit short Circuit Protection 16 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Thermal Shutdown Protection under Overcurrent Condition Under Voltage Lockout Ensures that Switch is off at Start Up gt gt gt Output can be Forced Higher than Input Off State gt Open Drain Fault Flag gt Slow Turn ON and Fast Turn OFF The USB THE HOST Device Circuit is shown in Figure 2 14 L4 u2 5V_USBA AIC 1526 065 1 8 lt POS 0 gt PB C8 220chm a 100MHz 10uF HHS EMA HHSDPA 11 More Figure 2 14 2 The USB THE HOST Circuit is shown in Figure 2 15 5V_USBB H lt gt HHS OMB gt HHS DPB Figure 2 15 3 Mini USB DBUG module chooses CP2102 Its key features are as follows gt Embedded USB transceiver without external circuit gt It contains clock circuit without an external circuit gt It contains reset circuit on the electricity 17 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Output Voltage Regulation can be within 3 3 V voltage Conformance to the s
7. 1 ULink2 connection or software does not recognize board 2 Max JTAG 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 port as shown below location Device Target Output Listing User C C Asm Linker Debug Utilities Use Simulator Settings Use ULINK2 ME ARM Debugger y Settings Limit Speed to Real Time V Load Application at Startup J Run to main Load Application at Startup I Run to main Initialization File Initialization File EE Nibraries debug_config_ini sam amp x35 Ext a Restore Debug Session Settings Restore Debug Session Settings MV Breakpoints Y Toolbox V Breakpoints 4 Toolbox Y Watch Windows 4 Performance Analyzer Y Watch Windows V Memory Display V Memory Display CPU DLL Paramet Driver DLL SARM DLL SARM DLL Dialog DLL Parameter Dialog DLL Paramet DARMATSS DL TARMATSS DLI OK TE 146 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual The following information that appears in the command window shows ddram axf load fails Please restore Initialization File in corresponding engineering as Initialization File location 04 MDK_Source libraries debug_config_ini sele
8. Download ddram bin after downloading dataflash boot file then download 36 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual ddram bin The specific operation is shown in Figure 3 27 TRE O r EAS SRR OD MPRA OD Send File Name Receive File Name Scripts de 3x35 y Bie en at91sam9x5ek dataflashboot bin ddram bin step 3 ddram O e pm BROS 8 8 2013 3 38 PM step 4 t Bin Files bin x VA step 1 Address 0x8400 Size For Receive File 0x1000 step 2 5 Applet traces on DBGU nos RAM SerialFlash AT25 AT26 step 9 Send File Receive File byte s Execute Compare sent file with memory F Appiet mitianzauon uone sam ba_2 11 1 GENERIC SendBootFileGUI GENERIC SendFile D 9x5v2 myir mdk MDKi 3 01_getting started Download 9x25 at91sam9xSek dataflashboot bin at address 0x0 I File size 0xDB0 byte s Eii Writing 0xDBO0 bytes at 0x0 buffer addr 0x20009A14 PE 0xDB0 bytes written by applet sam ba_2 11 1 Figure 3 27 Note Don t change the Scripts item keep it the same as the previous step USBserial COM13 Board at91sam9x35 ek Lastly after sending ddram bin press NRST to reset board Open the terminal and configure the parameters beforehand refer to Chapter 3 2 3 there will be term
9. MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 1 At this point pressing the key board will echo corresponding characters fifindfgsgw2hdf4s1 5xcOdsgdfddddddddd 2 Send a txt document Build a text document and send it Refer to Figure 3 34 and Figure 3 35 File Edit Format View Help TEST MYS SAM9X5 Figure 3 34 Serial COMI SecureCRT i File Edit View Options Transfer Script Tools Window Help 33033 neto Send ASCH EE FS MOME Y Serial COM1 x Receive ASCI Figure 3 35 Terminal information Start waiting data by using DMA fffndfgsgw2hdf4s15xc0dsgdfddddddddd TEST MYS SAM9X5 gt Phenomenon Indicates The phenomenon has explained as above 3 3 13 Emac0 gt Purpose This example demonstrates Ethernet MAC EMAC and Ethernet transceiver gt Functional Description 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 with MYD SAM9G25 G35 X25 X35 V2 and requires Network port J16 1 Connect board to network or to PC by crosswire Then set the host IP 192 168 2 XX Note XX can t be 115 2 Download program into board press NRSRT to observe relevant terminal information 54 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 3 Open a terminal application and type the following command line ping 192 168 2 115
10. The Setting window is shown in Figure 3 1 EA Options for Target MYS SAM9X35 Device Target output Listing User C C Asm Linker Debug Utilities Atmel SAM9X35 Code Generation Xtal MHz 12 0 ARM Mode z Operating system None IT Use Cross Module Optimization System Viewer Fie Sh J Use MicroLIB SFDmeN SAMIGASAMDGS sr E Big Endian m Read Only Memory Areas default off chip Start rout CR e i omz Cancel Defaults Help Figure 3 1 2 Choose SAM9X35 in tab Device as follows Note The specific steps for setting other chips are similar to the example of SAM9X35 Steps are shown in Figure 3 2 EA Options for Target Mys saMoxas e Device target Output Listing User C C Asm Database Generic CPU Data Base y Device SAM9X35 Toolset ARM Linker Debug Utilities ARM926EJ S based 32 bit RISC Microcontroller with j 6KB Instruction Cache Shutdown Timer Real Time Timer Real Time Clock Two dual port 8 channel DMA Cc Controller Management LCD Controller USB High Speed Host Controller USB High Speed Device a A A 99 Figure 3 2 When the default Configuration is completed Target tab will have a default 24 MYIR TECH LIMITED www myirtech com C M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual configuration automatically Refer to Figure 3 1 3 Outpu
11. 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 how to set up SPI and how to read write serial dataflash 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 SW1_2 on gt Phenomenon Indicates Terminal information SPI with Serialflash Example 2 0 SAM9XX5 EK Compiled Aug 2 2013 17 35 23 DMA driver initialized with IRQ 60 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual SPI and AT25 drivers initialized ID read 1471f AT25DF321A 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 the host by USB cable and then play music the audio stream is sent to board At the
12. 32 bit infos Apply Ox00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 s 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 m 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 0x00300030 0x00000000 0x00000000 0x00000000 0x00000000 AANINADAN J DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name Send File Receive File Name Receive File Address 0x0 Size For Receive File 0x1000 byte s Compare sentfile with memory Scripts ep 2 step 3 Enable Serialflash SPIO CS0 loading history file 0 events added SAM BA console display active Tcl8 5 9 Tk8 5 9 sam ba_2 11 1 sam ba_2 11 1 USBseriaNCOM13 Board at91sam9x35 ek Figure 3 25 After enabling DataFlash it will show sam ba_2 11 1 SERIALFLASH Init 0 and download dataflashboot bin Location 04 MDK_Source 01_getting started Download 9x35 The specific operation is shown in Figure 3 26 Applet traces on DBGU infos appn Size For Receive File 0x1000 byte s Compare sent file with memory J stepl loading history file 0 events added SAM BA console display active Tc18 5 9 Tk8 5 9 sam ba_2 11 1 sam ba_2 11 1 GENERIC SendBootFileGUI sam ba_2 11 1 USBseria COMS Board atOlsamd35 ek Figure 3 26
13. 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 Enter configure help to look at parameters description set parameters by requirement Compile and install make 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 4 Transplant Qt to the development board Copy the library to 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
14. R87 10K C64 100nF Ras Reo ES 49 9R 1 49 9R 1 RXD3 PHYAD3 RXD2 PHYAD2 RXD1 PHYAD1 RXDO PHYADO 37 RX CLKMOBTSER RX_DVTESTMODE TX_ERITXD4 BY RX_ER RXD4RPTR COURMII avoor HPE HE ancha 100MHz CRS PHYADS Se MDC 2 M DMs161AEP AYDDT TIF MDIO 9 Tri ji 10nF MDINTA DISMDIX AGND AE 2 DYDD DVDD R104 3 R105 0000 RR6 z 10K 10K 7 22 537 TX_EN TX_CLK ISOLATE sport protocol to IEEE802 3 U DETH GND Us SP3050 04HTG 1 6 7 01 D4 GND vec 102 03 AWDDT T11 SMD Pas gt Ras 499R1 499R1 cr2 100nF 8V 070 NE 4 R1034 op or ao ETH GND ETH1_GND EE S RESET 45 Figure 2 20 2 4 Jumper Settings 1 JP1 JP3 JP4 JP5 and JP6 are shown in Figure 2 21 21 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Figure 2 21 2 The functions of JP1 JP3 JP4 JP5 and JP6 are as shown in Table 2 5 JP1 Force Power On Normal Mode JP3 Enable ETH1 Disconnect LCD Enable LCD Disconnect ETH1 Enable RS485_1 Disconnect JP4 USARTO Enable USARTO Disconnect RS485_1 When JP6 CLOSE Enable When JP6 CLOSE Enable USART3 JP5 RS485_2 Disconnect USART3 Disconnect RS485_2 JP6 OPEN invalid JP6 OPEN invalid JP6 Enable USART3 Disconnect LCD Enable LCD Disconnect USART3 Table 2 5 22 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 Use
15. Then SAM BA will download Linux image automatically to board The entire download process takes about three minutes When popping file logfile log automatically and reset board There will display Linux start information Please refer to Chapter 4 7 about how to use Linux 4 3 4 Manual Download Note 1 please pull out SD card before download otherwise an error may occur 2 Here the example given is the X11 image for a 4 3 inch screen If you are to use 85 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 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 After completing the steps in Chapter 4 3 1 and 4 3 2 turn SW1_1 SW1_2 off restart board and then turn SW1_1 on Open SAM BA to set corresponding parameters Therefore connection is the USB serial COMXX XX is each computer s COM port choose it by actual situation here XX is COM8 board select at91sam9x35 ek And then click Connect specific settings and connected results are shown in Figure 4 4 Figure 4 5 Select the connection USBserial COM M Select your board at91sam9x35 ek gt JLink speed default Customize lowlevel Connect Exit Figure 4 4 FS SAM BA 2 11 at91sam9x35 ek File Script File Link Help m at91sam9g15 Memory Display Start Address 0x30000
16. 0 if LED_Major result register_chrdev_region devno 1 DEVICE_NAME printk Got the Major number by register_chrdev_region An 110 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 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 printk register MYS_SAM9X5_ledtest Driver OK Major d n LED_ Major cdev_init amp cdev amp 8MYS_SAM9X5_ledtest_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_NAME initialized n return 0 fail_create_class cdev_del amp cdev fail_cdev_add 111 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual unregi
17. 00 E I File size 0x20000 byte s Writing 0x20000 bytes at 0xC0000 buffer addr 0x20010954 0x20000 bytes written by applet sam ba_2 11 8 Figure 5 14 8 Download Linux kernel u Image to 0x200000 Refer to Figure 5 15 132 MYIR TECH LIMITED www myirtech com M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual PENE lol xi E Fie SciptFile Link Help at91sam9g15 Memory Display Start Address 0x300000 Refresh Ce 7 J Casa C stit C 16bit 32bit fos ao 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 E 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 i 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 0x00300030 0x00000000 0x00000000 0x00000000 0x00000000 0x00300040 0x00000000 0x00000000 0x00000000 0x00000000 X 1 OSDO200050 AvAnAnAnAN NALNANNNNNNANA ARONA aAvannannannan 4 DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFiash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File 3 Send File Name C Documents and Settings Administrator MYIR 3X5 Andr gt SendFile Receive File Name EA Receive File Adress x20000 Sal For Recewe Fe ox1000 byte s Compare sent file with memory Scripts end Boot File ete Writing 0x20000 bytes at 0x460000 buffer addr 0x20010954 0x20000 bytes written by applet Writing 0x20000 bytes at 0x480000 buff
18. Access extranet successfully 4 7 7 Login Development Board By Telnet 1 Configure IP IP can be allocated in case of IP 192 168 1 166 ifconfig ethO 192 168 1 166 2 Start telenet service telnetd 3 Login board by telenet client Here use telenet in windows as example input command as follow 104 MYIR TECH LIMITED www myirtech com 7 MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual telnet 192 168 1 166 Then enter username root and press enter login to development board through Telnet as shown in Figure 4 15 r Telnet 192 168 1 166 The Angstrom Distribution at9isam xbek Angstrom v20110623 at isam x5ek login root Last login Tue fug 26 08 56 53 on ttyS root at isam xSek Figure 4 15 4 7 8 Mount NFS File System Note here use building NFS server on Ubuntu as an example 1 Build NFS server on Ubuntu install nfs kernel server sudo apt get install nfs kernel server 2 Add the following content at the end of file etc exports The NFS directory is home jbo nfsdir this directory will be mount on clients home jbo nfsdir rw sync no_root_squash 3 Restart portmap and nfs kernel server service portmap restart service nfs kernel server restart 2 mount NFS file system on board Configure IP 105 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual ifconfig ethO 192 168 1 166 2 Make directory
19. LCDHSYNC PC28 65 66 PC26 LCDPWM LCDDEN PC29 67 68 PC31 FIQ LCDPCK PC30 69 70 GND GND Table 2 2 J1 PIN 3V3 Power Supply VDDANA 1 2 VDDBU 3V3 Power Supply 3V3 Power Supply 3V3 3 4 GND GND 3V3 Power Supply 3V3 5 6 GND GND 3V3 Power Supply 3V3 7 8 PD20 GPIO USB ENA PD18 9 10 PD19 GPIO GPIO PD17 11 12 SHDN SHDN LCD REST PD16 13 14 WKUP WKUP SD CD PD15 15 16 NRST NRST GND GND 17 18 NTRST NRST USB C HHSDPC 19 20 TCK TCK USB C HHSDMC 21 22 TDO TDO GND GND 23 24 TDI TDI USB B HHSDMB 25 26 TMS TMS USB B HHSDPB 27 28 RTCK RTCK GND GND 29 30 PA10 DTXD USB OTG HHSDMA 31 32 PA9 DRXD USB OTG HHSDPA 33 34 PA15 MCIO_DAO GND GND 35 36 PA18 MCIO_DA1 Empty Signal NC 37 38 PA19 MCIO_DA2 Empty Signal NC 39 40 PA20 MCIO_DA3 GND GND 41 42 PA17 MCIO_CK RF PA29 43 44 PA16 MCIO_CDA RK PA28 45 46 PA30 TWDO RD PA27 47 48 GND GND TD PA26 49 50 PA31 TWCKO TF PA25 51 52 PA23 SPI1 SOCK 9 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual TK PA24 53 54 PA22 SPI1 MOSI CANTX1 PA5 55 56 PA21 SPI1 MISO CANRX1 PAG 57 58 PA8 RXD2 GND GND 59 60 PA7 TXD2 SPIO SPCK PA13 61 62 PA14 SPIO NPCSO SPIO MOSI PA12 63 64 PA4 SCKO SPIO MISO PA11 65 66 PA2 RTSO CTSO PAS 67 68 PAO TXDO RXDO PA1 69 70 GND GND Table 2 3 J2 PIN 2 2 4 LED The System LED and U
20. LUN init RamDisk 22000000 size 10485760 1 RAM Disk init l LUN init l LUN bikSize 1 size 20480 1 MSDFun init MSDReset USBD_Init l VBus configuration l conn Rsm Susp Rsm NewReg Msdf Std gDesc Dev NewReq Msdf Std sAddr SetAddr 1 NewReq Msdf Std gDesc Dev NewReq Msdf Std gDesc Cfg NewReq Msdf Std gDesc Stro NewReq Msdf Std gDesc Str3 NewReq Msdf Std gDesc Cfg NewReq Msdf Std gDesc Stro NewReq Msdf Std gDesc Str2 NewReq Msdf Std gDesc Stro NewReq Msdf Std gDesc Str2 NewReq Msdf Std gDesc Dev NewReq Msdf Std gDesc Cfg NewReq Msdf Std gDesc Cfg NewReq Msdf Std gDesc Stro NewReq Msdf Std gDesc Stro NewReq Msdf Std gDesc Str3 NewReq Msdf Std gDesc Str3 NewReq Msdf Std sCfg SetCfg 1 MSDFunCfg 77 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual MSDReset NewReq Msdf gMaxLun Inquiry Sending Inquiry Sent Cplt SendCSW ok W MSDD_ProcessCommand Unknown cmd 0x23 StalN Cplt Stallln WNewReq Msdf CirFeat Hit Std cFeat Hit aitHALT SendCSW ok Part is omitted 3 3 30 RS485 gt Purpose This example demonstrates how to use rs485 to communicate gt Functional Description This example communicates between two boards by rs485 demonstrates the use of rs485 communication One board works as the sender sends a string to another board continuously The other board works as the receiver who receives and verifies the data and then displays the results Procedures This ex
21. MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual d Computer Management sewer File Action View Help gt 9 GG e A Computer Management Local a sa MSL PC a ff System Tools E Computer E Task Scheduler ca Disk drives A Event Viewer E Display adapters El Shared Folders E DVD CD ROM drives Local Users and Groups old Floppy drive controllers 05 Human Interface Devices Ca IDE ATA ATAPI controllers Device Manager a Sperry Jungo iaf Disk Management Keyboards 5 Services and Applications A Mice and other pointing devices amp Monitors 8 Network adapters 2 Raog a LD OMA D 17 AT91 USB to Serial Converter COM4 y TUS 1 Y ARO COM _ Figure 4 3 Here COM4 is the machine connection port determined by actual situation here is COM4 Switch SW1_1 is ON and switch SW1_2 is kept OFF 4 Connect USB_UART to PC by USB 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 the example given is the X11 image for a 4 3 inch screen If you are to use a different size screen or to download Qt image please download the image under the corresponding directory After completing the steps in Chapter 4 3 1 and 4 3 2 open CD ROM directory 02 Images Linux 4 3LCD X11 double click at91sam9x5ek_demo_linux_nandflash bat
22. ReqSense Cplt SendCSW ok 3 3 25 Usb_hid_transfer gt Purpose This example demonstrates the UDP and PIO port on AT91SAM microcontrollers as well as USB Framework that is used for USB drivers such as HID gt Functional Description This example simulates a customized HID device that includes customized data stream of LEDs and buttons Connect the board to the host by USB cable and the host will report a new device attachment gt Procedures 1 Download program into board press NRSRT to observe relevant terminal information 2 Connect board 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 O3EB and PID is 6201 choose item type and item to see its attributes 4 Input anything you want to the output edit box and send it the information will display on terminal 69 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Phenomenon Indicates After starting board the host will report a new device attachment and install driver automatically Refer to Figure 3 49 gt 3 Batteries a 17 Ports COM amp LPT i USB SERIAL CH340 COM1 gt Mi Computer gt ML Monitors 22 Standard PS 2 Keyboard 4 3 Other devices ff ATMEL AT91 HID TRANSFE 4 ta Human Interface Devices USB Input Device Figure 3 49 After installing driver a new USB device an
23. Send File Name K5 DVD Contents 02 Images Linux 4 3 LCD x11 u boot bin g Receive File Name 2 El Receive File Address Size For Receive File 0x1000 byte s Compare sent file with memory Scripts Send Boot File Execute 0x20000 bytes written by applet Writing 0x20000 bytes at 0x60000 buffer addr 0x20010954 0x20000 bytes written by applet Writing 0xE2B0 bytes at 0x80000 buffer addr 0x20010954 E OxE2B0 bytes written by applet m ba_2 11 1 USBserial COM13 Board at01sam9x35 ek Figure 4 11 5 Download u boot EnvtFileNandFlash bin to OxCO000 Refer to Figure 4 12 89 MYIR TECH LIMITED www myirtech com C M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual File Script File Link Help at9lsam9g15 Memory Display Display format Start Address 0x300000 Refresh C ascii C 8 bit C 16 bit 32 bit Size in byte s 0x100 0x00300000 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 r Download Upload File Send File Name s 02 Images Linux 4 3 CET Seen ers bi s 02 Images Linux 4 3 LCD x11 ubootEnvtFileNandFlash bir Receive File Name Address ox
24. gt Phenomenon Indicates After starting board the host will report a new device attachment and install driver automatically After installing driver a new device can be found in device manger Refer to Figure 3 54 3 Batteries a 7 Ports COM 1 LPT 1 USB SERIAL CH340 COM1 li Computer amp Monitors 4 3 Keyboards lt gt Standard PS 2 Keyboard a 5 Human Interface Devices a HID compliant device Figure 3 54 Note If the driver has not installed successfully in Figure 3 49 install it manually Location 04_MDK_Source libraries The installation method can refer to Chapter 3 23 Terminal information 73 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual USB CDCHID Device Project 2 0 SAM9XX5 EK Compiled Aug 3 2013 16 50 42 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_ nit l VBus configuration l conn ow Typing 1 makes terminal print a continuously while typing 1 again makes e 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
25. ledtest ko file to the corresponding directory for loading The specific operations 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 V2 root at91sam9x5ek media sda4 MYD SAM9X5 V2 Is ledtest ko ledtest_app root at91sam9x5ek media sda4 MYD SAM9X5 V2 insmod ledtest ko MYD_SAM9X5_LEDTEST DRIVER MODULE INIT register MYD_SAM9X5_ledtest Driver OK Major 249 MYD SAM9X5 V2 ledtest initialized At this point LED driver has been loaded into the kernel successfully In the next Chapter we will write a simple application and test the functionality 4 9 Application Development Example This Chapter describes the top layer Linux system application development and a simple instance tells the application development process and driver invocation The instance achieves the following function Running the application the on off status of two LEDs can be control by passing different parameters 4 9 1 Source Code Compilation Create a new directory and a new ledtest_app c file by vi editor in the directory or copy pre prepared file to current directory directly The following are the source code of 113 MYIR TECH LIMITED www m
26. mkdir nfs Mount NFS file system the NFS server IP is 192 168 1 223 mount t nfs o nolock 192 168 1 223 home jbo nfsdir nfs Afte mount NFS directory can be manipulated These actions will be reflected to nome jbo nfsdir directly 4 7 9 RTC Use 1 Install button battery to board 2 System will set a default time at the first startup so it needs to set the time after system startup Note due to X11 system starts Scheduled Tasks service atd writing to hardware directly by hwclock command The RTC will prompt an error that the device is busy You can stop atd service and start if 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 4 7 10 Serial Port MYD SAM9X5 V2 can support up to 7 serial ports a USB to serial port two 3 lines UART four 5 lines UARTs including two extend 5 lines UART In Linux system SAM9G 106 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 15 SAM9G35 SAM9X35 have been registered five default serial ports SAM9G25 SAM9X25 have been registered six serial por
27. mtd0r0 devices in Idev directory ls dev mtd dev mtdO dev mtdOro 95 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 2 Erase mtd0 partition the operation is as follows sudo flash_eraseall dev midO flash_eraseall has been replaced by flash_erase lt mtddev gt 0 0 please use it Erasing 128 Kibyte ffe0000 100 complete 3 Load Angstrom x11 at91sam9 image eglibc ipk v20110624 at91sam9x5ek roo tfs ubi to new mtd0 partition Here used dd command to load as follows sudo dd Y if Angstrom x11 at91samg image eglibc ipk v20110624 at91sam9x5ek rootfs 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 it to mid0 then mount UBIFS file system like mounting ordinary mtd device Load ubi modules and attach it to mtd0 equipment sudo modprobe ubi mtd 0 2048 Create a new mounting 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 that mounting UBIFS file is successful 4 6 3 Modify UBIFS System Files After mounting UBIFS file system successfully we can modify file content on demand such as adding deleting or modifying the files Th
28. 137 50 3 Play Audio TES ainia 139 5 54 Ethernet Teis 140 PPDONGIK 1 FAG A E E 144 Appendix 2 sales FAQ and technical Support 148 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Chapter 1 Product Overview 1 1 Product Description MYIR has launched MYD SAM9X5 V2 series boards which are based on Atmel AT91SAM9X5 series processor AT91SAM9G15 25 35 and AT91SAM9X25 X35 are all based on the ARM926EJ S kernel MYD SAM9X5 V2 series which run at up to 400 MHz have 256MB NandFlash 4MB DataFlash 128MB DDR2 SDRAM and support Linux 2 6 39 as well as Android 2 3 5 operating system MYD SAM9X5 V2 series also provide relevant sources and have rich peripheral Ports High speed USB2 0 Audio input Audio output LCD Port CAN Port 10 100Mbps Ethernet MAC JTAG debug Port Serial Port and Micro SD card Port 1 2 Product Overview USB UART JTAG Mini USB Audio In AudioOut USB Host ETHO ETH1 12V Power PW Switch ge LCD ene y Touch FPC Connector CAN x1 RTC RS485 x2 m l l SS ns Micro SD USER KEY F EEPROM UN 0 EY gt WAKUP NREST UARTx2 USARTO USART3 EXTUARTA EXTUARTB Battery EXT Interface 3 Wire 5 Wire 5 Wire 5 Wire 5 Wire Holder MYD SAM9X5V2 Figure 1 1 1 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Figure 1 2 1 3 Product Features The MYD SAM9X5 V2 series are based on AT91SAM9X5 processo
29. Choose to format the disk and it pops up dialog of formatting removable disk Refer to Figure 3 47 67 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual r Format Removable Disk J Capacity 10 0 MB y File system FAT Default Allocation unit size 4096 bytes y Restore device defaults Volume label i Format options V Quick Format Create an MS DOS startup disk i Sin Figure 3 47 After formatting it there is a 10M removable disk Refer to Figure 3 48 4 Devices with Removable Storage 3 Removable Disk J aa is DVD Drive F P BD ROM Drive E gt J 9 97 MB free of 9 97 MB Figure 3 48 Terminal information USB HIDMSD Device Project 2 0 SAM9XX5 EK Compiled Aug 3 2013 11 08 31 DBG key 1 2 used as buttons 1st press to push 2nd press to release l LUN init RamDisk 22000000 size 10485760 RAM Disk init l LUN init l LUN bikSize 1 size 20480 l HIDDFunction_Initialize 1 MSDF un init MSDReset USBD_Init l VBus configuration l conn Inquiry Sending 68 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Inquiry Sent Cplt SendCSW ok Inquiry Sending Inquiry Sent Cplt SendCSW ok W MSDD_ProcessCommand Unknown cmd 0x23 StalN Cplt Stallln WaitHALNewReq Kbd T SendCSW ok ReqSense
30. Port Issssssss ea a a 102 AT Venet T OSU rriei e a aa a i 103 4 7 7 Login Development Board By Telnet o ococonnionicnnnncinnnnncnnoncnnocnnanannncnnnos 104 4 7 8 Mount NFS File SM is 105 AI EG USE ree 106 27 10 Seral POr sses e e REN 106 A e a aaee e eaer a RE E 107 4 8 Linux Driver Development Example oooocoicicononocionicccconnoconoconononnnnn nn connnonnnccnnnarnns 108 4 8 1 Hardware cio Maliciosa 108 4 8 2 Driver Source Code iio 108 4 5 2 CONTI Dive 112 4 8 4 Download Dieta 113 4 9 Application Development Example sssssssssssesesrsrsrsrsrsrsrssssssrsrsrrrennnerrsrsrsrsrsses 113 4 9 1 Source Code Compilation is 113 A A e a 115 49 3 POG NOVA US asar dada 115 4 115 4 10 1 Qt Cross Tool Chain ias 116 4 10 2 Establish Qt Development Environment ssssssssssssesrsrersssrsrsrsrsrssssesssssrne 119 Chapter 5 Android System Guide 123 de CVS IVI A E E AE E 123 2 2 SOMWANG RESQUICES caia 124 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual A 124 5 31 Install Download Tool 125 5 3 2 Connect the Board To SAMBA cscpiasessecaceoeesatovcasiececscpsteapis tae canciones 125 5 04 Manual Download rr 126 5 4 Compile Android System Files 0 cscsescssecessvesesnssscoecssvoernssssasencosvonsnsstossnedsdauncins 135 5 4 1 Android System Principle a 135 5 4 2 Compile System Pl ii 136 5 5 Android System Application aii 137 5 5 1 USB Key Board Sst 137 5 5 2 Browse Picture Test ina
31. article is usr local arm 2010q1 bin you can use the follow command to add path export PATH PATH usr local arm 2010q1 bin 2 Set Qt application development related environment variables The decompressed file setenv contains the setting of environment variables you 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 Images Linux 4 3 LCD Qt in the CD ROM referring to 4 3 3 for the automatically download procedure and 4 3 4 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 118 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Qt_Arm Qt_Examples Here we use masterdetail as an example to tell how to use Qt cross compile tool chain to compile Qt application program and run in the target board
32. as USB Framework gt Functional Description This example simulates a USB device integrating a key board and a removable disk Connect the board to the host by USB cable and the host will notice USB device attachment After installing there is a 10M removable disk gt Procedures Download program into board press NRSRT to observe relevant terminal information Connect the board to the host by USB cable and the host will notice USB device attachment After installing it there is a 10M removable disk gt Phenomenon Indicates After starting board a new USB device can be found in the device manger Refer to Figure 3 45 66 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual D A Mice and other pointing devices gt AM Monitors D amp Network adapters 4 gt Other devices gt Ports COM amp LPT gt na Processors Figure 3 45 After installing driver there will pop up a dialog box inquiring whether or not to format the disk Refer to Figure 3 46 gt Mi Computer 4 a Disk drives ATMEL Mass Storage MSD USB Device y WDC WD5000AADS 00S9B0 ATA Device gt ME Display adapters gt 8 DVD CD ROM drives p E Floppy drive controllers D 1 Human Interface Devices gt Eg IDE ATA ATAPI controllers gt E Jungo 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 46
33. bch semanal A Nibra es ibboard_samdo5ek 1 ibrares OK Cancel Defaults Help Figure 3 6 7 The Linker Configuration is shown in Figure 3 7 26 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual EA Options for Target MYS SAM9X35 Device Target Output Listing User C C Asm Linker Debug Utilities Use Memory Layout from Target Dialog 7 Make RW Sections Position Independent 7 Make RO Sections Position Independent I Dont Search Standard Libraries IV Report might fail Conditions as Errors File Nibraries Vibboard_sam 5 ek resources mdk sam9x35 ddram sct Ei Edt entry reset Handler Figure 3 7 1 EH Options for Target WS SAMOS TTT TTS Device Target Output Listing User C C Asm Linker Debug Utilities Use Memory Layout from Target Dialog Make RW Sections Position Independent R O Base Make RO Sections Position Independent R W Base a 7 Dont Search Standard Libraries Y Report might fai Conditions as Erors disable Weminga click it you can change the pat of sct file path _ Nibraries Vibboard_sam9oc5 ek vesources mdk sam9x35 sram sct Misc entry resetHandler a controls Cancel Defaults Help Figure 3 7 2 The Linker configuration of getting started project is shown in Figure 3 7 1 This sample program generates ddram bin most MDK routines generat
34. 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 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 103 MYIR TECH LIMITED www myirtech com o MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 8 Telnet 202 112 17 13 ATAR ERAPR Ast bbs gznet edu cn 202 112 17 137 Warmly Welcome to Bulletin Board Service BBS of CERNET Southern Regional Center If you have any problems please send email to scutbbs scut edu cn iA PISTHSCGEEAICERNETAR AFN anaes It shows telnet test is successful 4 Configure DNS server View current DNS server address by ipconfig all command machine DNS is 202 103 24 68 Set target board s DNS depend on the circumstances 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 217 56 seq 0 ttl 54 time 60 990 ms 64 bytes from 119 75 217 56 seq 1 ttl 54 time 59 644 ms
35. c Enter the following in the helloworld c save it and exit include lt stdio h gt int main int argc char argv int i 94 MYIR TECH LIMITED www myirtech com M Y iR Make Your Idea Real MYD SAM9X5 V2 User Manual printf Hello World 1n printf arge d n argc for i 0 i lt argc i printf argv d s n i argv i return 0 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 The application helloworld is generated 4 6 2 Mount UBIFS File System UBIFS is a new flash file developed by NOLIA engineers under the help of Szeged University which is considered as the next generation of JFFS2 files system UBIFS file system was specifically designed for large capacity FLASH embedded mobile devices Mounting UBIFS file system must have mtd interface while ordinary PC usually doesn t utilize mtd to manage disk So here need nandsim simulator to simulate mtd device with a RAM space then mount UBIFS file system The concrete steps are as follows 1 Load UBIFS drive mtd driver Enter the following command in turn sudo modprobe nandsim first_id _byte Oxec second_id_byte 0xda third_id_byte 0x10 fourth_id_byte 0x95 If executed above command successfully there will be mtd0 and
36. file at91sam9x5ek_demo_android_nandflash bat Table 5 2 2 The principle of the system Power on when system starts form nandflash start steps is as following The boot code at91sam9x5ek nandflash boot 3 1 bin in nandflash will be copied by at91sam9x5 internal rom s boot code to SRAM and been executed Bootloader initializes hardware include setting CPU frequency configure running configuration PIO and then copy the secondary boot program U boot bin to DDRAM for execution 2 Secondary bootloader U boot is mainly responsible for boot Linux including set Linux operating environment Load Linux image file u Image pass startup parameters to 135 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Linux last boot Linux to start 8 Android system will start when linux boot up and file system mounted 5 4 2 Compile System Files The Android is based on Linux please setup Linux compiling tools chain platform for developing Android 1 Install Cross Compiler Tools Decompress cross compiler tool to usr local directory tar xvjf A 05 Linux_Source CrossTool arm 2010q1 202 arm none linux gnueabi tar bz21 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_defconfig make distclean make CROSS_COMPILE usr local
37. gt Phenomenon Indicates Terminal information EMAC Example 2 0 SAM9XX5 EK Compiled Aug 2 2013 16 31 49 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 36 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 TTL 64 Reply from 192 168 2 115 bytes 32 time lt ims TTL 64 Reply from 192 168 2 115 bytes 32 time lt ims TTL 64 Reply from 192 168 2 115 bytes 32 time lt ims TTL 64 Ping statistics for 192 168 2 115 Packets Sent 4 Received 4 Lost By loss Approximate round trip times in milli seconds Minimum ms Maximum ms Average Gms Figure 3 36 3 3 14 Emac1 gt Purpose This example demonstrates Ethernet MAC EMAC and Ethernet transceiver 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 with MYD SAM9X25 V2 and requires Network port J15 connect JP3 to enable J15 1 Connect board to network or to PC by crosswire Then set the host IP 192 168 2 XX Note XX can t be 115 2 Download program into board press NRSRT to observe relevant terminal information 55 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SA
38. ledtest static int LED_Major 0 struct cdev cdev define LED OFF 0 define LED ON 1 static unsigned long led_Table E AT91_PIN_PB18 led_blue AT91_PIN_PD21 led_red 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 109 MYIR TECH LIMITED www myirtech com o MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 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_Table arg 1 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 unlocked_ioctl MYS _SAM9X5 ledtest_ioctl i static struct class MYS_SAM9X5_ledtest_class NULL static int__ init MYS_SAM9X5_ledtest_init void int result err dev_tdevno MKDEV LED_Major
39. lib tar gz to the development board and then extract it to usr local Qt mkdir p usr local Qt tar xzvf lib tar gz C usr local Qt 2 Set environment variables The setting of development board environment variables has been written to etc setqtenv it can be completed by the following command 121 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual sourch etc setqtenv Or manually enter settings export QT_QWS_FONTDIR usr local Qtlib fonts export QWS MOUSE PROTO tslib dev input touchscreenO export LD LIBRARY _PATH LD_LIBRARY_PATH usr local Qt lib 5 Compiling and running of Qt application program Please refer to 4 10 1 4 The compiling and running of Qt application program 122 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Chapter 5 Android System Guide 5 1 Overview Android is a Linux system based open source operating system mainly used in portable devices Android operating system originally developed by Andy Rubin development initially mainly support mobile phone In 2005 Android is acquainted by Google formatting the open mobile phone alliance to improvement it gradually extended to the Tablet computer and other area Since its first release Welcomed by the majority of consumers Android s market shares around the world more than Symbian system for the first time in the first quarter of 2011 ra
40. of single cycle MAC operations and 16 bit fixed point DSP instructions to enhance performance of many signal processing applications as well as supporting Thumb technology 2 2 3 CPU Module Board Port definition CPU module board port definition is shown in Table 2 2 J1 PIN and Table 2 3 ETHO RX 1 2 ETHO RX AVDDT 3 4 ETHO RX ETHO RX ETHO LED2 ETHO LED2 5 6 ETHO TX ETHO TX ETHO LED1 ETHO LED1 7 8 ETHO TX ETHO TX ETHO LEDO ETHO LEDO 9 10 GND GND GND GND 11 12 PBO ERXO ERX1 PB1 13 14 PB2 ERXER ERXDV PB3 15 16 PB4 ETXCK EMDIO PB5 17 18 PB6 EMDC ETXEN PB7 19 20 GND GND ETXO PB9 21 22 PB8 Empty Signal ADO PB11 23 24 PB10 ETX1 AD2 PB13 25 26 PB12 AD1 GND GND 27 28 PB14 AD3 GPIO PB15 29 30 PB16 GPIO AD6 PB17 31 32 PB18 IRQ ADVERF ADVERF 33 34 GND GND LCDDATAO PCO 35 36 PC1 LCDDATA1 LCDDAT2 PC2 37 38 PC3 LCDDAT3 LCDDAT4 PC4 39 40 PC5 LCDDAT5 LCDDAT6 PC6 41 42 PC7 LCDDAT7 GND GND 43 44 PC8 UTXDO MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual UTXDO PC9 45 46 PC10 LCDDAT10 LCDDAT11 PC11 47 48 PC12 LCDDAT12 LCDDAT13 PC13 49 50 PC14 LCDDAT14 LCDDAT15 PC15 51 52 GND GND UTXD1 PC16 53 54 PC17 UTXD1 LCDDAT18 PC18 55 56 PC19 LCDDAT19 LCDDAT20 PC20 57 58 PC21 LCDDAT21 LCDDAT22 PC22 59 60 PC23 LCDDAT23 GND GND 61 62 PC24 LCDDISP LCDVSYNC PC27 63 64 PC25 CTS3
41. shows board driver has been installed B P Ports COM amp LPT MUA ATO1 USB to Serial Converter COM9 Figure 5 3 The COM9 is connection port determined by actual situation here for COM9 5 3 2 Connect the Board To SAM BA 1 Install MYD SAM9X5 V2 USB driver Please refer to 03 Tools SAM BA the board driver install pdf 2 Connect board The specific steps are as follows Connect the board to PC by USB line 2 Turn SW1_1 SW1_2 off 8 Press NRST to reset board turn SW1_1 on 125 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual At this point there will be USB equipment 3 Connect development board USB_UART and PC using USB cable and set up super terminal parameters for COM1 115200 8 none 1 The COM port setting according to actual situation The detailed steps for reference 3 2 3 super terminal configuration and ready to download 5 3 3 Automatic Download Note 1 Pull out SD card before download 2 Here to use the 4 3 inch screen image as an example if 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 HI AT9I1SAMIX35 EK at91sam9x5 tcl gt logfile log 2 gt amp 1 Enotepad logfile logill Figure 5 4 The original COMx changes corr
42. 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 Input d l Initialize DMA done l Disable DMA done l Initialize DMA done l Disable DMA done a Input r l Erase block 10 l Write block 10 l Raw block write speed 4228K s I Read block 10 l Raw block Read speed 6553K s Menu 1 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 1 Dump Nand flash information 59 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual d Enable or disable DMA r Performance test Raw without ECC s Performance test Software ECC p Performance test PMECC h Display this menu A 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 5242K s Menu i Dump Nand flash information d Enable or disable DMA
43. 0 Display format Applet traces on DBGU ii ye bit E 32 bi inf alin Size in byte s 0x100 C ascii C 8 bit C 16 bit 32 bit infos pply 0x00300000 OxEA000020 OXFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 oxoooooooo m E DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File Send File Name Send File Receive File Name Address 0x0 Size For Receive File 0x1000 i byte s Compare sent file with memory Scripts Enable Serialflash SPIO CS0 y Execute loading history file 0 events added SAM BA console display active Tcl8 5 9 Tk8 5 9 sam ba_2 11 1 sam ba_2 11 1 USBserial COM13 Board at91sam9x35 ek Figure 4 5 2 Click NandFlash tab and execute Enable NandFlash Enable OS PMECC parameters and Erase All sequentially in Scripts tab click on nearby execution to 86 MYIR TECH LIMITED www myirtech com C M Y iR Make Your Idea Real MYD SAM9X5 V2 User Manual perform A setting popup dialog box will appear while executing Enable OS PMECC click OK to use the default settings The specific operations are as follows Select Enable NandFlash in Scripts tab and then click Execute to Enable NandFlash Refer to Figure 4 6
44. 00 IWANANNNKN NALNANNNNNNA NALANNNNANNANA Avannannan Awnannnann El I Erasing blocks batch 2 I Erasing blocks batch 3 E Erasing blocks batch 4 F Erasing blocks batch 5 I Erasing blocks batch 6 I Erasing blocks batch 7 sam ba_2 11 3 Figure 5 10 130 MYIR TECH LIMITED www myirtech com 0 M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual 5 Download at91sam9x5ek nandflashboot 3 1 bin Refer to Figure 5 11 5 12 1x300000 100 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 0x00300030 0x00000000 0x00000000 0x00000000 0x00000000 0x00300040 0x00000000 0x00000000 0x00000000 0x00000000 4 NAYNNANNNEN AvAAAAAAAA 00000000 ARANA 0000000 j 1000 E 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 t Figure 5 11 at91sam9x5ek nandflashboot 3 1 bin Figure 5 12 6 Download u boot bin file to Ox40000 Department Refer to Figure 5 13 131 MYIR TECH LIMITED www myirtech com 1 M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual ly SAM BA 2 11 at91sam9g35 ek io 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x
45. 00 Data In 32 80 00 00 1e 00 00 00 50 02 ff 73 66 de fb 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3 3 26 Usb iad _cdc_cdc gt Purpose This example demonstrates UDP port and other ports 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 the board to 71 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual the host by USB cable and the host will notice USB device attachment gt Procedures Download program into board press NRSRT and observe relevant terminal information When connecting to PC by USB cable LED blinks and the host reports a new USB device attachment Send data to port and observe it in another HyperTerminal connected to USART or USB gt Phenomenon Indicates After starting board the host will report a new device attachment and install driver automatically A Mice and other pointing devices E Monitors Network adapters a 5 Other devices fp Atmel Figure 3 52 If the driver has not installed successfully in Figure 3 52 install it manually Location 04_MDK_Source libraries The installation method can refer to Chapter 3 2 3 If the installation is completed there will be two new COM devices Refer to Figure 3 53 3 AT91 USB to Serial Conver
46. 000000 anannanan Documents and Settings Administrator E MYIR 9x5 are aF Ox64po sam ba_2 11 3 eee O Writing 0x20000 bytes at 0x6640000 buffer addr 0x20010954 0x20000 bytes written by applet Writing 0x20000 bytes at 0x6660000 buffer addr 0x20010954 0x20000 bytes written by applet Writing 0x20000 bytes at 0x6680000 buffer addr 0x20010954 0x20000 bytes written by applet Figure 5 18 134 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 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 by Linux kernel source code Android File System system files u lmage system_ubifs SAM9X5 ANDROID 2 3 5_r1 img Chapter Android File Syst dat userdata_ubifs SAM9X5 ANDROID 2 3 5_rt img Nard File Systems user data portion p Writing log file and view it by at91sam9x5 tcl notebook Automatic programming tools MS DOS batch file the manual programming process does not require this
47. 00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 0x00300030 0x00000000 0x00000000 0x00000000 0x00000000 0x00300040 0x00000000 0x00000000 0x00000000 0x00000000 s C Documents and ettngs Administrator 238 MVIRJx5 4 316 sere O oxoso00q s Fie 1000 byte s Comparesentflemitimemory 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 0xED2C bytes at 0x80000 buffer addr 0x20010954 OxED2C bytes written by applet sam ba_2 11 8 Figure 5 13 7 Download U bootEnvAndroidNandFlash bin to Oxc0000 Refer to Figure 5 14 ly SAM BA 2 11 at91sam9g35 ek 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 Ox00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 Ox00300030 0x00000000 0x00000000 0x00000000 0x00000000 Ox00300040 0x00000000 0x00000000 0x00000000 0x00000000 AwANINANKA Awnananann NALNANNNNNANA NAVANANANNANNA NVNANNNNANNAA n j Documents and Settngs Adminisrator 38 MVR J9xs 4 31 Ge A A Send File C Documents and Settings Administrator MYIR 9X5 4 3 LCD ubootEnvAndroidNandFlash bin at address 0x0C0000 GENERIC SendFile C Documents and Settings Administrator Hl MYIR 9X5 4 3 LCD ubootEnvAndroidNandFlash bin at address 0xC00
48. 127 MYIR TECH LIMITED www myirtech com 0 M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual li SAM BA 2 11 at9isam9g35 ek 101 x de ox100 E aed 0x00300000 0xEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 9x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 0x00300030 0x00000000 0x00000000 0x00000000 0x00000000 0x00300040 0x00000000 0x00000000 0x00000000 0x00000000 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 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 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
49. 13 09 06 13 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 0x0014 PIO Input Filter Enable Register 0x0020 PIO Input Filter Disable Register 0x0024 PIO Multi driver Enable Register 0x0050 PIO Multi driver Disable Register 0x0054 PIO Pull Up Disable Register 0x0060 PIO Pull Up Enable Register 0x0064 PIO Peripheral ABCD Select Register 1 0x0070 PIO Peripheral ABCD Select Register 2 0x0074 PIO Output Write Enable Register Ox00A0 PIO Output Write Disable Register 0x00A4 PIO Pad Pull Down Disable Register Ox0090 PIO Pad Pull Down Enable Register 0x0094 gt 0OQOO pOO JOCcmiaa nogqgoN No write protect violation is detected The Write Protect is enabled Write protect violation is detected The offset of the write protected register is 0x0000 46 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Write protect violation is detected The offset of the write protected register is 0x0004 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 violatio
50. 1Mbit s Very Low Electro Magnetic Emission EME Yv V WV Different receiver with wide common mode range for high Electro Magnetic Immunity EMI 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 Vv Vv VW V WV Input levels compatible with 3 3V and 5V devices 13 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual gt Output device protected by temperature gt Short circuit proof to battery and to ground gt Atleast 110 nodes can be connected The CAN Bus circuit is shown in Figure 2 9 33 CANSV 20113 sl 6114 u20 T 100nF 100rnF u21 ADU M1201 TJA1050 21001 vonz veo RS Hean LE ono can Pas lt gt CANRX1 2 VOA MA 7__AGND_CAIGND_CAN 4 RXD CANH 7 CANH1 Pas lt gt CANTX1 3 MB voB 6 1 1x0 CANL 6 I CANL1 4 GND1 GND2 5 2 GND vrer H R205 R206 N N 60R 680R D20 p24 SMBJ7 0CA AGND_CAN AGND_CAN deis SMBJ_2 2X2 1 Pof Pl mel Y AGND_CAN AGND_CAN AGND_CAN Figure 2 9 2 3 4 JTAG Port The JTAG Port which has 20 pins is shown in Figure 2 10 NTRST 2 TDI 2 TMS 2 TCK 2 RTCK 2 TDO 2 NRST 2 58 Figure 2 10 2 3 5 LCD Port The LCD Hardware circuit is shown in Figure 2 11 14 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real
51. 2 0 SAM9XX5 EK 56 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real Compiled Aug 22013 17 10 56 l Cannot check if SD card is write protected With insert a SD card l SdMmcldentify Cmd5 3 E Acmd41 cmd55 3 E SdMmcldentify Cmd1 3 E SD_Init Identify 5 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 1 SD MMC card initialization successful Press Enter l MCK is 133MHz Buffer 2000b76c size 0x400000 Fil 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 port used Input the corresponding command for different operations Input t Test code 1 clr 2 wr 3 rd l Testing block 37176 41271 3 3 16 Hsmci_sdcard gt Purpose This example demonstrates HSMCI port Functional Description MYD SAM9X5 V2 User Manual 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 Please insert a card the program starts to initialize and test SD card gt Phenomenon Indicates 57 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Terminal information Bas
52. 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 corresponding buttons gt Procedures Download the program into board press NRSRT to observe terminal information 0 9 A B are transmission choices of DMA buffer S starts transporting and displays menu gt Phenomenon Indicates Terminal information DMA Example 2 0 SAM9XX5 EK Compiled Aug 1 2013 23 25 34 1 9 A B Programming DMAC for Multiple Buffer Transfers 1 Single Buffer or Last buffer of a multiple buffer transfer 2 Multi Buffer transfer with contiguous DADDR 3 Multi Buffer transfer with contiguous SADDR 4 Multi Buffer transfer with LLI support 43 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 5 Multi Buffer transfer with DADDR reloaded 6 Multi Buffer transfer with SADDR reloaded 7 Multi Buffer transfer with BTSIZE reloaded and contiguous DADDR 8 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 Programming DMAC for Multiple Buffer Transfers in row 1 Programming DMAC for Multiple Buffer Transfers in row 2 Programmin
53. A clock is 800 MHz PLLA clock is the source of Master clock MCK Master Clock is prescaler output clock divided by 3 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 Select PLLA clock as the master clock Please measure the clock on PCK to make sure it is 12500000 Hz Press to switch next clock configuration 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 in EWARM IAR C_SPY the JLINK will disconnect on some PC l Press to switch next clock configuration Done 3 3 9 PWM gt Purpose This example demonstrates PWM channel configuration A simple demonstration of two PWM channels configuration is used to produce variable cycle and frequency of signal When connecting PB18 PWMO PC10 or PB18 and PWM1 PC11 will make two LEDs flashing gt Functional Description Two PWM channels channel 0 1 are configured to generate two PWM signals gt Procedures 49 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Download the program into board press NRSRT to observe relevant terminal i
54. AM9X5 V2 User Manual e Check the last converted channel in ADC interrupt handler if DMA is not used gt Procedures Download the program into board press NRSRT to observe relevant terminal CPR information Press d in terminal enable disable DMA character s changes channel mode Digital 0 3 represent 4 trigger modes respectively three data show three AD sampling data value respectively gt Phenomenon Indicates Terminal information ADC12 Example 2 0 SAM9XX5 EK Compiled Aug 1 2013 21 55 10 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 Vols mV 09 3290 00 3287 02 2925 3 3 3 Adc_touch screen 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 displayed in terminal when touching LCD gt Procedures The package can only be used with MYD SAM9G15 G35 X35 Download the program into board press NRSRT to observe relevant terminal 40 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual information After touching the dots on the LCD to calibrate touchscreen the calibration results will be outputted in termina
55. ATMEL Mass Storage MSD USB Device A a WDC WD3200BPVT 22JJ5T0 ATA Device Microsoft Windows Y Batteries n aX Ports COM 0 LPT A You need to format the disk in drive J before 17 ATO1 USB to Serial Converter COM22 you can use it f USB SERIAL CH340 COMI Do you want to format it jE Computer Monitors Li i oll Cancel Figure 3 55 Terminal information USB CDCMSD Device Project 2 0 SAM9XX5 EK Compiled Aug 3 2013 17 06 07 l LUN init RamDisk 22000000 size 10485760 l RAM Disk init l LUN init l LUN bikSize 1 size 20480 l CDCDSerial_ Initialize l CDCDSerialPort_Initialize 1 MSDFun init MSDReset USBD_Init l VBus configuration l connn 75 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual TstUnitRdy Rdy Cplt SendCSW ok TstUnitRdy Rdy Cplt SendCSW ok TstUnitRdy Rdy 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 the board to the host by USB cable the board works as a USB disk If the board has SDRAM the disk capacity can reach 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
56. 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 2 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 3 After executing the above command copy the generated executable file masterd etail to development board to run ls masterdetail chmod 0777 masterdetail masterdetail qws The result is shown below Qt Music Archive File Help Artist Details lt all gt ly Album Artist Ane Brun title artist year Number of Albums Spending Time With Morgan Ane Brun Title Spending Time With Morga A Temporary Dive Ane Brun 2005 2003 The Great October Sound Thomas Dybdahl 2002 Stray Dogs Thomas Dybdah 2003 One day you ll dance for me New York City Thomas Dybdahl 2004 Ompa Til Du Dor Kaizers Orchestra 2001 Evig Pint Kaizers Orchestra 2002 Maestro Kaizers Orchestra 2005 Figure 4 17 4 10 2 Establish Qt Development Environment This section tell how the Qt cross tool chain and associated library files be generated 119 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual by compiling Qt Embedded source code Qt s source code and Tslib s sourc
57. D3 YM lt pera ADA XM R94 27R TP_YD 47 oo 48 TP YU Res 27R ADD XP PB11 cae ES ADA LR RSS SAN DNF TPR 49 99 so gt EsW 120 33 LD Figure 2 11 2 3 6 User Ports The User Circuit is shown in Figure 2 12 38 PaO Pca PB2 PB4 PBB PB URXDO PA12 SPIO MOSI PA14 SPIO NPCSO SPI FLASH SPILFLASH TWCKO PA34 gt ESW110 33 L D SIDC10X2_2 Figure 2 12 2 3 7 Audio Module WM8731 gt Audio Performance e 97dB SNR A weighted 48kHz ADC 100dB SNR A weighted 48kHz DAC 1 42 3 6V Digital Supply Operation e 2 7 3 6V Analogue Supply Operation gt ADC and DAC Sampling Frequency 8kHz 96kHz gt Selectable ADC High Pass Filter gt 2or3 Wire MPU Serial Control Port 15 ESMAAD IGL D SRE SIDC 10X2_2 10K 10902 88 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Vv Vv V VW V Y Programmable Audio Data Port Modes e S Left Right Justified or DSP e 16 20 24 32 Bits 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 The WM8731 circuit is shown in Figure 2 13 BREESE El Y w AGNO AUDIO 220ohm at anni yes 1 V7 LINE GUT AGND AUDIO mesas 2 RIB pp E GNO _AUDIO 17 F won E INE TES ES
58. Ds gt Procedures Download the program into board press NRSRT to observe relevant terminal information Press 1 in terminal to start or stop LED1 blinking there will be 1 2 or all 2 in terminal Press 2 in terminal to start or stop LED1 blinking there will be 1 2 or all 1 in terminal gt Phenomenon Indicates Terminal information 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 221221221 222222222222222222212212212211111111111 111111111111111111112122122122122122122122122122 122122122122122122122122122122122122122122122122 122122122122122122122121221221221221221221221221 2212212212212212212212212212212212212212 3 3 2 Adc_adc10 gt Purpose This example demonstrates ADC peripheral gt Functional Description This example aims at demonstrating how to use ADC with without DMA When working with DMA it works as a big buffer for ADC peripherals the data will be stored immediately without interfering with CPU The steps are e Initialize ADC with expected parameters e Configure and enable interrupt for ADC Enable DMA reception 39 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD S
59. F Support Plugin TIFF Support Plugin qt JPEG Support Plugin qt PNG Support Yes qt MNG Support Plugin qt Zlib Support Yes Session mManagement No Embedded Support Arm Freetype2 Support Yes Graphics qt Linuxfb Multiscreen Linuxfb Graphics plugin Decorations qt Styled Windows Default Decorations plugin Key board Driver qt Tty Usb Key board Driver plugin Mouse Driver at Pc Linuxtp Pc Linuxtp Tslib Mouse Driver plugin OpenGL Support No SQLite Support Qt at OpenSSL Support No 117 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Table 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 cd 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 Configure system environment 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
60. Flash One wire EEPROM SRAM SerialFlash AT25 AT26 Send File Name Receive File Name Address Size For Receive File 0x1000 byte s 5 Compare sent file with memory PE Erasing blocks batch 5 I Erasing blocks batch 6 I Erasing blocks batch 7 sam ba_2 11 1 NANDFLASH SendBootFilePmecc E No File Selected sam ba_2 11 1 Figure 4 9 88 E USBserial COM13 Board at91sam9x35 ek I MYIR TECH LIMITED www myirtech com 7 M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual Lookin Ej 4 3 10D 7 00 A Name 3 Date modified z a gt Recent Items Byu boat bi Val 9 ubootEnvtFileNandFlash bin Desktop mm File name atQlsam9xSek nandflashboot 3 1 bin 7 es otne Figure 4 10 4 Download u boot bin to 0x40000 Refer to Figure 4 11 File Saipthle link Help at91sam9g15 Memory Display Start Address 0x300000 Refresh Display format Applet traces on DBGU daodo C ascii C 8 bit C 16 bit 32 bit infos hal Appiy Size in byte s 0x100 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 m 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 m DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 Download Upload File i 3
61. LCD screen configuration for example make ARCH arm myir MYD SAM9X5_4 3LCD_Android_defconfig Copy boot logo file Initlogo_480x272 rle for the 4 3 inch screen boot logo file If it is 7 0 or 10 2 inches please use initlogo_800x480 rle Execute following command to compile Linux kernel make ulmage ARCH arm CROSS_COMPILE usr local arm 2010q1 bin arm none linux gnueabi After compile kernel u Image is Linux kernel in directory arch arm boot 5 5 Android System Application 5 5 1 USB Key Board Test Insert USB key board to J15 press the NumLock key when the lights of the key board in the upper right corner turn green it shows USB key board can be used 5 5 2 Browse Picture Test 137 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 1 Select Gallery icon Gallery port will pop up if insert SD card Refer to Figure 5 19 WH Messaging Camera Gallery 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 138 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Figure 5 21 5 5 3 Play Audio Test 1 Select Music icon will pop up music player port Refer to Figure 5 22 Figure 5 22 2 Select Songs option Refer to Figure 5 23 139 MYIR TECH LIMITED www myi
62. M9X5 V2 User Manual 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 Aug 2 2013 16 50 04 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 17 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 TTL 64 Reply from 192 168 2 115 bytes 32 time lt ims TTL 64 Reply from 192 168 2 115 bytes 32 time lt ims TTL 64 Reply from 192 168 2 115 bytes 32 time lt ims TTL 64 Ping statistics for 192 168 2 115 Packets Sent 4 Received 4 Lost By loss Approximate round trip times in milli seconds Minimum ms Maximum ms Average ms Figure 3 37 3 3 15 Hsmci_multimedia_card gt Purpose This example demonstrates HSMCI port on SAM microcontrollers gt Functional Description Open HyperTerminal before running this program On starting this program the HyperTerminal will print test information which includes initialization and performance gt Procedures Download program into board press NRSRT to observe relevant terminal information and then insert a SD card gt Phenomenon Indicates Terminal information Without a SD card Basic MultiMedia Card Project
63. O_MISO SPI FLASH SI A2C_Al PAI1 lt SO A2C_NC GPIOZRIB 20 PAIS lt gt M SCLK A2C_SCK GPIO2 CDB ig R129 OR GPIO1 OTRB 18 R128 OR gt 40K GPIOORSRE 15 SPI_CTSE R131 OR 117 SPI_RTSB R133 OR 14 Rise a sP_Rxp 22 vs TXB 23 SPI_TXB TSSOP28 Ya 11 0592MHz c91 22pF Figure 2 18 2 3 11 External RTC MYD SAM9X5 V2 extends RTC by DS3231 Its key features are as follows gt gt Vv Vv Y V WV Backup Battery Power Working Temperature e Commercial Grade 0 C 70 C e Industrial Grade 40 C 85 C Low Power Consumption Real Time Clock Calculation points day week month year Time Alarm Programmable Square Wave Output Working Voltage 3 3 V The External RTC circuit is as shown in Figure 2 19 Figure 2 19 20 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 2 3 12 ETHERNET V2 User Manual The ETHERNET module uses DM9161AEP chip lts key features are as follows Vv Vv Y Y V WV gt gt Support 10 100 MBPS IEEE802 3 IEEE802 3 U network tran Support the MDI MDI X Automatic Crossing Alternative Full Duplex or Half Duplex Operation MII Management Port Maskable Interrupt Output Capacity Provide Circuit Model to Facilitate Diagnosis System Support Automatic Consultation Function Conformance Network Transport Protocol 48 pin LQFN Packaging Compatible with 3 3 v and 5 0 v Input and Output The ETHERNET circuit is shown in Figure 2 20
64. Only Provide Hardware Port Device SD Card Driver Micro SD SD Card Provide Source Drivers F LCD Touch LCD Driver Provide Source SPI Driver Provide Source TWI Driver Two Wire Port 12C Provide Source DMA Driver Have Been Tested to Provide Source GPIO Driver Have Been Tested to Provide Source System Files Android System Files 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 MYIR TECH LIMITED www myirtech com 124 C MYiR Make Your Idea Real MYD SAM9X5 V2 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 Please uninstall previous versions and USB driver If need two or more SAM BA version coexistence different SAM BA versions use different USB port 2 Power on and connect the board J8 to PC by micro USB cable 3 Turn SW1_1 SW1_2 off disconnect Base board jumper JP8 and then press NRST button to reset board the order is not reversed Firstly connect PC to install driver then select the location to install SAM BA installation directory Refer to Figure 5 2 J IC ATMEL Corporation O AT91 ISP v1 13 5 sam ba_2 11 D applets i doc examples gt tcl_lib Figure 5 2 4 If there is prompt in device manager in Figure 5 3 it
65. 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 copy 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 which LED lights 0 is blue led 1 is red led the specific operation is as follows root at91sam9x5ek media sda4 ledtest app 1 0 MYD SAM9X5 V2 ledtest Driver Open Called MYD_SAM9X5_LED Driver Release Calle After the above operation blue LED is off 4 10 Qt Guide This section describes the development methods and procedures for GUI application useing Qt in MYD SAM9X5 V2 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 describes 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 libr
66. Refresh Display format Applet traces on pe m A 2 fink Size in byte s 0x100 asdi C 8 bit C 16 bit 32 bit 2 poo Ox00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 0x00300030 0x00000000 0x00000000 0x00000000 0x00000000 AANINADNAN la DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFlash One wire EEPROM SRAM SerialFlash AT25 AT26 r Download Upload File Send File Name 15 Receive File Name El Receive File Address 0x0 Size For Receive File 0x1000 byte s Compare sent file with memory Scripts Enable Serialflash SPIO CS0 e Execute loading history file 0 events added SAM BA console display active Tcl8 5 9 Tk8 5 9 sam ba_2 11 1 sam ba_2 11 1 UsBserialiCOM13 Board at91sam9x35 ek Figure 3 24 After entering the main port turn SW1_2 on Refer to Figure 3 25 Firstly choose SerialFlash AT25 AT26 then set the script as Enable SerialFlash lastly perform Execute 35 MYIR TECH LIMITED www myirtech com 7 M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual File ScriptFile Link Help m at91sam9g15 Memory Display Display format Applet traces on DBGU Refresh Size in byte s 0x100 C ascii C 8 bit C 16 bit
67. Y iR Make Your Idea Real MYD SAM9X5 V2 User Manual CEI Device Target Output Listing User c ctt Asm Linker Debug Utilities m Run User Programs Before Compilation of a C C File C Ra O 0816 Stop Build Rebuild 1 on Exit Code Not Specfed y wml LE DOS16 Stop Build Rebuild 42 on Ext Code Not Specfied x m Run User Programs Before Build Rebuild F Run 1 es DOS16 Tr Rnz Ela DOS16 m Run User Programs After Build Rebuild IV Run 1 fromelf exe bin o Download Sx35 ddram bin 9x35 ddram af E I DOS16 T Run 2 T nosis IV Beep When Complete J Start Debugging Cancel Defaults Help Figure 3 5 The command marked by the 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 D Options for Target MYS SAM9X35 a L Device Target Output Listing User C CH Asn Linker Debug Utilities r Preprocessor Symbols Undefine Language Code Generation Y Enable ARM Thumb Interworking I Strict ANSI C Wamings s A Mbrares ibboard_samdod ek includ Optimization Level0 00 y TT Enum Container always int anpeciied 7 TF Oplii for Time EE R Thumb Mode I Spit Load and Store Multiple I Read Only Postion Independent V One ELF Section per Function control Nibrarie
68. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 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 port and other ports as well as USB Framework that is used for USB drivers such as USB CDC and the 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 the board to the host by USB cable the host will notice USB device attachment After installing the driver there is a COM device and a 10M removable disk 74 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual gt Procedures Download program into board press NRSRT and observe relevant terminal information When connect to PC by USB cable the LED blinks and the host reports a new USB device attachment After installing the driver there will be AT91 USB to Serial Converter and ATMEL Mass Storage MSD USB Device PC will add a new added 10M removable disk which can be used as a common disk gt Phenomenon Indicates After starting board and installing driver the host will add a COM device Refer to Figure 3 55 4 1 Ports COM 0 LPT 4 a Disk drives P AT91 USB to Serial Converter COM22
69. ample uses two MYD SAM9X5 V2 development t boards After download two boards must download this routine program connect J24 A1 and B1 of one board to their counterparts of another board Then restart the development board observe output information gt Phenomenon Indicates Sending Terminal information RomBOOT Start AT91Bootstrap Init DDR Done Loading 1 Wire info sn 0x4010424 rev 0x8421 Downloading image detected dataflash id Ox1f 0x47 0x1 0x0 0x0 Done 78 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual RS485 Project 2 0 SAM9XX5 EK Compiled Aug 3 2013 17 43 31 Press 1 It will be send the host Press 2 It will be receive the host It is sending Send data RS485 TEST OK Receiving Terminal information Start AT91 Bootstrap Init DDR Done Loading 1 Wire info sn 0x4010424 rev 0x8421 Downloading image detected dataflash id 0x1f 0x47 0x1 0x0 0x0 Done RS485 Project 2 0 SAM9XX5 EK Compiled Aug 3 2013 17 43 31 Press 1 It will be send the host Press 2 It will be receive the host Itis receiving Received Data RS485 TEST OK RS485 TEST OK RS485 TEST OK RS485 TEST OK RS485 TEST OK 3 3 31 External GPIO gt Purpose This example describes how to use SPI to extend GPIO gt Functional Description This examp
70. and 0x41 that both data can received by CANO Mailbox 3 The last data will overwrite the previous one gt Procedures This example can only be used with MYD SAM9X25 MYD SAM9X35 development board After download connect CAN_H1 and CAN_L1 in two development board respectively Press NRST there will be terminal information Press 1 to send message in serial port terminal 1 press 2 to receive message in serial port terminal 2 gt Phenomenon Indicates Serial port terminal 1 Press 1 to send message CAN Example 2 0 SAM9XX5 EK Compiled Aug 21 2013 16 07 30 Test start DBGU not available now l 1 210000 CAN1 Sync OK Press 1 Send Maxbox Press 2 Recieve Maxbox and Check Maxbox l 1 40e00060 l 1 40a00040 l 1 40a00040 l 1 900060 Press any key to test again Serial port terminal 2 Press 2 to receives message CAN Example 2 0 SAM9XX5 EK Compiled Aug 21 2013 16 08 58 Test start DBGU not available now l 1 210000 42 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual CAN1 Sync OK Press 1 Send Maxbox Press 2 Recieve Maxbox and Check Maxbox l 1 20e00002 l 1 20a00006 CAN1 1 Simple test data received test PASSED CAN1 2 Messages to 1 Mailbox received test PASSED l 1 e0000e CAN1 3 Messages to 1 Mailbox OVR received test PASSED l 1 10000e Press any key to test again 3
71. anges red and remains Thus it indicates ULink2 is OK 3 Clicking Settings tab in Figure 3 10 there will be connection status of ULink2 and the development board as well as kernel identification Refer to Figure 3 11 Tuono ULINK USB JTAG Adapter r Serial No v0000145 v ULINK Version Device Family arm Firmware Version V1 42 Max JTAG Clock imHz y I Use nTRST TDO 00792603F ey NU C Manual Configuration Device Name IR len J J Verify Code r Download Options Misc Options Download aa IV Use Reset at Startup Lok _ a Figure 3 11 4 Click Ctrl F5 or shortcut icon or select Debug gt Start Stop Debug Session to start debug Refer to Figure 3 12 29 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Ef Dawork_myirSAMOXS2EEASAMOXSIMDK Source 01 getting started Project getting starteduvproj pVision4 File Edit View Project Flash EET Peripherals Tools SVCS Window Help Daag 3 4 sarustop Debug Session Cuter5 PY 7 ca mes ark 4 ES BR ws RE Reset CPU a E El run FS 5 1 MYS SAM9X35 Q stop ai Step CS Figure 3 12 3 2 3 Super Terminal Configuration Super Terminal Configuration 1 Install USB serial port driver CP210X run Prelnstaller Exe as shown in Figure Release Notes txt z setup ini TENE MELS 3 KB 1 KB 3 13 s
72. arm 2010q1 bin arm none linux gnueabi Cd binaries In this directory at91sam9x5ek nandflashboot 3 1 bin is AT91 Bootstrap 3 Compile U boot Note The default compiled U boot without debug function will boot kernel directly and skipped network configuration 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 completed 4 Compile Linux Kernel Decompress Linux kernel to working directory tar xvjf 06 Android_Source Linux_Kernel_For_Android linux 2 6 39 tar bz2 cd linux 2 6 39 Configure File Select a different configuration file depending on the LCD size 136 MYIR TECH LIMITED www myirtech com C M Y iR Make Your Idea Real MYD SAM9X5 V2 User Manual LCD_4 3 MYIR_MYD SAM9X5 V2_4 3LCD_Android_defconfig LCD_7 0 MYIR _MYD SAM9X5 V2_7 0LCD_Android_defconfig LCD_10 2 MYIR _MYD SAM9X5 V2_10 2LCD_Android_defconfig Compile it automatically or manually Executed source code under the root directory to compile the script make_image sh sudo chmod a x make_image sh make_image sh 4 3 Where 4 3 represents using a 4 3 inch screen the screen if you use other dimensions please change corresponding size 2 Manual Compile Configure default Application Here in 4 3 inch
73. artup The board should be connected with the host through serial port This mode can do tftp download update the image set u boot environment variables etc lt will continue to guild the system if 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 lu boot linux include configs at91sam9x5ek h is needed to open debug function Modify CONFIG_BOOTDELAY to be 1 second in the 91th line There will be 1 second s waiting for input from the key board define CONFIG_BOOTDELAY 0 1 Modify above to define CONFIG_BOOTDELAY 1 2 Cancle the note to CONFIG_MACB in the 168th line thereby opening the network support define CONFIG_MACB 1 Modify above to define CONFIG_MACB 1 3 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 bz2 C cd linux 2 6 39 2 Compile 93 MYIR TECH LIMITED www myirte
74. ary provided when the disc cannot meet the needs of Qt 115 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual development Note This image downloaded from 02 Images Linux 4 3 LCD Qt is taken as an example Please refer to 4 3 4 for automatically download procedures and 4 3 3 for the manually download The PC environment is Ubuntu 10 04 4 10 1 Qt Cross Tool Chain 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 contained the Qt library corresponding to the tool chain thus the Qt program compiled from the tool chain can directly run on 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 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 IWMMXt Support No IPv6 Support Yes IPv6 Ifname Support Yes Getaddrinfo Support Yes 116 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Getifaddrs Support Yes Accessibility Yes NIS Support Yes CUPS Support No Iconv Support No Glib Support No GStreamer Support No Large File Support Yes GI
75. ash bin at addre ss 0xC0000 I File size 0x20000 byte s Writing 0x20000 bytes at 0xC0000 buffer addr 0x20010954 0x20000 bytes written by applet sam ba_2 11 1 a USBserial COM13 Board at0lsam9x35 ek Figure 4 13 7 Program system files Download angstrom x11 at91sam9 image eglibc ipk v20110624 at91sam9x5ek rootfs ub to 0x80000 Refer to Figure 4 14 90 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual ES SAM BA 2 12 File Script File ES ECC configuration Le lm XT y Y P i EMOS 7 Ecc type pmecc software ecc C no ecc at91sam9g15 Me Pmecc boot header configuration Applet traces on DBGU Start Address 0x3 Y infos v A Size in byte s Dadl Number of sectors per page 4 xj info Apply Spare size 64 0x00300000 ll Jo z Number of ECC bits required 2 x la 0x00300010 0x00300020 Size of the ECC sector 512 C 1024 Eccoffset 48 5 1 _ Ed 7 Send File Name am9 image eglibc ipk v20110624 at91sam9xSek roctfs ubi a Send Fie File Receive File Name Receive File 0x00300030 NxNN3NNNAN DDRAM DataFlash SRAM SerialFlash AT25 AT26 Download Uploa 9 2 Address 0x800000 Size For Receive File 0x1000 byte s Compare sent file with
76. 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 the host pops 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 56 4 Disk drives g ATMEL Mass Storage MSD USB Device c WDC WD5000AADS 0059B0 ATA Device amp Display adapters 3 DVD CD ROM drives Floppy drive controllers Figure 3 56 76 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual The host pops up a dialog box that whether to format the removable Refer to Figure 3 57 and 3 58 r Microsoft Windows You need to format the disk in drive J before you can use it Do you want to format it Figure 3 57 4 Devices with Removable Storag 4 Devices with Removable Storage 2 DvD DVD RW Drive H gt _ AE DVD RW Drive H gt Removable Disk 1 Removable Disk 1 MF 187 GB free of 1 87 GB Figure 3 52 Before format Figure 3 53 Right After format Figure 3 58 Terminal information USB Device Mass Storage Example 2 0 SAM9XX5 EK Compiled Aug 3 2013 17 27 51 l
77. board Port type Double row 140 pin Port 2 0mm pin space gt System Power Consumption Base board amp Core board about 12V 0 16A Base board amp Core board amp 4 3 Inch Screen about 12V 0 22A Base board amp Core board amp 7 0 Inch Screen about 12V 0 45A 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 gt 32KB Chip SRAM 64KB Chip ROM gt 256MB NandFlash 4MB DataFlash gt 128MB DDR2 SDRAM Audio and Video Port MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual gt gt A 3 5mm Audio Input Port A Two chamnel 3 5mm Audio Output Port LCD Touch Screen Port gt gt 18 bits True Color Resolution 480x272 for 4 3 Inch Screen and 800x480 for 7 0 Inch Screen the highest resolution can reach up to 800 x 600 Note Only MYD SAM9G15 V2 MYD SAM9G35 V2 and MYD SAM9X35 V2 have graphical output function Transmission Port gt gt gt gt V V Vv Vv Y V WV Standard JTAG Port Micro SD Card Port Serial Ports Four 5 lines UART two 3 lines UART The SAM9G15 SAM9G35 and SAM9X35 add the default 232 level Users can customize LVTTL level The RS485 and USARTO share the same port which can be switched by jumper Two CAN Ports Only MYD SAM9X25 V2 and MYD SAM9X35 V2 have CAN Port One High speed USB THE HOST Port One Mini USB THE HOST DEV P
78. bytes Character device major minor 250 0 Present volumes 0 View erase block number by using the following command ubinfo dev ubi0_0 Volume ID 0 on ubi0 Type dynamic Alignment 1 Size 2024 LEBs 256999424 bytes 245 1 MiB State OK Name rootfs Character device major minor 250 1 Then use ubinize tool to generate fsimage ubi file Firstly we need to create configuration files ubinize ubinize cfg vi ubinize cfg Enter the following text save the file and exit 97 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual ubifs mode ubi image ubifs img vol_id 0 vol_size 64MiB vol_type dynamic vol_name rootfs vol_flags autoresize vol_alignment 1 Enter the following command to generate the final fsimage ubi file sudo ubinize m 2048 p 128KiB o fsimage ubi ubinize cfg Parameter description of ubinize m Size of minimum input output byte flash unit p Erase block size of FLASH physical o output file Here is different from the mkfs ubifs parameters p parameter represents the physical erase block size The UBI works in the MTD layer so it needs the MTD parameters namely physical parameters The UBIFS works in the 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 completio
79. c00405 F User canceled sam ba_2 11 4 NANDFLASH NandHeaderValue HEADER Oxc0c00405 sam ba_2 11 4 Figure 5 16 10 Download system_ubifs SAM9X5 ANDROID 2 3 5_r1 img to 0x500000 Refer 133 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real to Figure 5 17 at91sam9g35 ek 0x00300000 0x00300010 0x00300020 0x00300030 0x00300040 OxEA000020 0x00000000 0x00000000 0x00000000 0x00000000 OxFFFFFFFE 0x00000000 0x00000000 0x00000000 0x00000000 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 Refer to Figure 5 18 0x00300000 ly SAM BA 2 11 at91sam9g35 ek loxxooo0o Refresh OxEA000020 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x08000000 0x00000020 0x00000000 0x00000000 0x00000000 Figure 5 17 11 Download userdata_ubifs SAM9X5 ANDROID 2 3 5_r1 img to 0x6400000 OxFFFFFFFF 0x00000000 MYD SAM9X5 V2 User Manual 0x08000000 0x00300010 0x00300020 0x00300030 0x00300040 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x00000020 0x00000000 0x00000000 0x00
80. ch com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Different sizes of LCD screen configuration files are as follows 4 3 inch myir_MYD SAM9X5_4 3lcd_defconfig 7 0 inch myir_MYD SAM9X5_7 0lcd_defconfig 10 2 inch myir_MYD SAM9X5_10 2lcd_defconfig The auto script or manual mode can be used for compilation Compile make _image sh script in source root directory directly sudo chmod a x make_image sh make_image sh 4 3 4 3 means 4 3 inch screen 2 Or execute the following command to compile make ARCH arm myir_ MYD SAM9X5 V2_4 3lcd_defconfig make ARCH arm ulmage CROSS_COMPILE usr local arm 2010q1 bin arm none linux gnueabi Note The make ulmage command requires that compile tool mkimage has been installed Use the following command to install the tool Sudo apt get install U boot mkimage After compiling the kernel ulmage file in arch arm boot directory is Linux image file that we need 4 6 Make Linux File System The system file in product CD Angstrom x11 at91sam9 image eglibc ipk v20110624 at91sam9x5ek rootfs ubi can be custom built Here take adding an application helloworld to the root directory of file system as an example to show the detailed steps of making file system 4 6 1 Write Demo Program helloworld Firstly write a simple program helloworld 1 Generate and compile helloworld c vi helloworld
81. co000 Size For Receive File 0x1000 byte s Compare sent file with memory Scripts Send Boot File kA 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 A USBserial COM13 Board at91sam9x35 ek ll Figure 4 12 6 Download Linux kernel Image to 0x200000 Refer to Figure 4 13 File Saipthle Link Help at9lsam9g15 Memory Display Start Address 0x300000 Refresh Display formt Applet traces on DBGU TE AS infos Size in byte s 0x100 C ascii C 8 bit C 16 bit 32 bit infos pply 0x00300000 OxEA000020 OXFFFFFFFF 0x00000000 0x08000000 3 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 E 0x00300020 0x00000000 0x00000000 0x00000000 oxoooooooo Mi 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 LCD x11 ulmage 2 Receive File Name Address e For Receive File 0x1000 byte s Compare sent file with memory Scripts Send Boot File Execute GENERIC SendFile E Jakebo 5A322 MYD SAM9X5 DVD Contents 02 Images Linux 4 3 LCD x11 ubootEnvtFileNandFl
82. creen The calibration can be carried out root at91sam9x5ek ts_calibrate xres 480 yres 272 Took 33 samples Top left X 804Y 178 Took 40 samples Top right X 790 Y 953 Took 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 the calibration is completed restart the system to take effect The operations are as follows root at91sam9x5ek sync root at91sam9x5ek reboot 99 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 4 7 2 U disk Use 1 After entering Linux system by terminal you can see the following information in HyperTerminal if the U disk is connected through either USB host port of J9 or J10 scsi0 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 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 filesyst
83. ct 9g 15 9g25 9g35 9x25 9x 35 configuration file and Initialization file in Debug tab directly 147 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Appendix 2 sales FAQ and technical support How to buy We accept paypal payment and bank wire transfer 1 Paypal payment Please select the products add into shopping cart the checkout web page will redirect to paypal com for you payment Shipment fee will calculated automatically by your location region 2 Bank wire transfer Please email or fax us with products list you want we will send you a pro invoice with order value total shipping cost and bank information Shipping details Please select the shipping area catalogue for you location If you have carrier account to pay the shipment fee please select Freight collect and email us the carrier account Please visit http www myirtech com support asp for more details Noted 1 The shipment will start in 3 biz days by Fedex Express it usually take 7 days to reach regular cities or regions 2 We will use DHL Express for West asia or middle east countries it usually take 7 days to reach regular cities or regions 3 The remote regions defined by Fedex DHL may cause delay 14 days in generally 4 Some countries have strict import policy we will help to make shipping invoice with you requirement like invoice value trade term custom statements and H S code etc Please contact us wi
84. d P5 2 Keyboard X Jungo R Mice and other pointing devices Keyboards A Monitors Figure 3 43 gt Procedures Download program into board press NRSRT to observe relevant terminal information PC reports new device and installs it automatically After installing a new USB device is added to human input device in the device manger gt Phenomenon Indicates A new USB device is added in device manger Refer to Figure 3 39 64 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Terminal information USB Device HID Key board Project 2 0 SAM9XX5 EK Compiled Aug 3 2013 10 37 52 DBG key 1 2 used as buttons 1st press to push 2nd press to release l HIDDFunction_Initialize USBD_Init l VBus configuration l con ti m Typing 1 makes terminal print character a continuously while typing 1 again CPE makes terminal stop printing character a l Key 0 pressed aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa l 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 This example demonstrates UDP and PIO port on AT91SAM microcontrollers as well as USB Framework gt Functional Descrip
85. d a HID compliant device are added to human input device Refer to Figure 3 50 p E Floppy drive controllers a 13 Human Interface Devices QA HID compliant device 3 5 USB Input Device i QA USB Input Device gt c IDE ATA ATAPI controllers Figure 3 50 Open software 04_MDK_Source 25_usb_hid_transfer hidTest exe and click Read to read HID ID Click LED1 and LED2 which control the blue light and red light respectively Refer to Figure 3 51 Sample HID sient spe se S HID Device ltem Type DEVICE ATTRIBUTES SSS Montor BUTTONs HID Device ID Sine 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 JAN A es ros ss 70 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Figure 3 51 Terminal information USB Device HID Transfer Project 2 0 SAM9XX5 EK Compiled Aug 3 2013 11 21 34 DBG key 1 2 used as buttons 1st press to push 2nd press to release l HIDDFunction_Initialize USBD_Init l VBus configuration l conn Data In 32 81 00 00 1e 00 00 00 50 02 ff 73 66 de fb 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Data In 32 83 00 00 1e 00 00 00 50 02 ff 73 66 de fb 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Data In 32 82 00 00 1e 00 00 00 50 02 ff 73 66 de fb 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
86. e 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 which have different names and must have 8 Choose project gt Rebuild all target files to compile the project or click on 27 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual shortcut icon to compile The steps are shown in Figure 3 8 uw D work_myir SAM9X53 2 SAM9X5 MDK_Source 01_getting started Project getting started uvproj pVision4 File Edit View Projed Flash Debug Peripherals Tools SVCS Window Help 0g a g New wVision Project z 5 New Multi Project Workspace e aE Open Project Project 5 3 MYS SAM9 Close Project startup Export gt chiplibre Manage gt a boardlit Select Device for Target MYS SAM9 35 E 3 user E mairl 7 Remove Item ag da X Options for Target MYS SAM9 35 Alt F7 zs read Clean target j Build target F7 F z o Batch Build Figure 3 8 There will be a executable bin file in the directory of Output tab There is a prompt about having executed the user command on the Build Output dialog Refer to Figure Program Size Code 6968 RO data 204 RW data 52 ZI data 6296 User command 1 fromelf exe bin o Download 9x35 ddram bin 9x35 ddram axf 9x35 ddram axf 0 Error s 0 Warning s ad Find In Files Z Bu
87. e MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual MYD SAM9G15 9G25 9G35 9X25 9X35 V2 User Manual Version V1 0 MYIR TECH LIMITED www myirtech com e M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual Version History v1 0 Initial Version 2013 11 4 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Content CONTENT secasaecetacezeiicacatacccsdccaciczcdiacecesacecstacesstucecstuccestcucsuccedsacessvavedsdeceraicsssiucussudursaussevaceuenae 1 Chapter 1 Produict OVEMVIGW scccicciicciietcstidnicccesdasnccsidecnnsdntacnecssdnssnncctadseaddanscnedsuicnsensasnasnas 1 1 1 Product Descrip as 1 a COWS PW s cae yeaa cso ben teh 1 a a 2 TA Produ ts Packing ideo 5 Chapter 2 Hardware Resource Introduction 6 2 1 CPU module amp Base Board Resources OVeIvieW 6 2 2 CPU Module Introduction tas 7 2 2 1 CPU Module Pro Iori as 7 2 2 2 CPU Performanco as 8 2 2 3 CPU Module Board Port definition 8 22A CED a a e meniineesiabites 10 2 2 5 A en Ee er a E E eRe a TES ae EEE eer ee eee 10 2 3 Base Board Introduction ana 11 2 3 1 Base Board Dimensions iaa 11 232 Universal Serials iia 12 2320 CAN BUS tai ie 13 23 000x 14 23510500 14 230 User POS ea 15 2 3 7 Audio Module WINIS 3 Lia 15 2 9 8 USB Mod 16 2 9 9 R5485 BUS io 18 2310 External VAR Presirciere ea eee 19 2311 External A Eras 20 2312 ETHERNE ii 21 MYIR TECH LIMITED www myirtech co
88. e code are in the CD ROM under the directory 05 Linux_Source Qt_Arm Qt_Source 1 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 2 Compile and install If you have not added 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 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 the host arm linux ac_cv_func_malloc_0_nonnull yes Compile and install make sudo make install 3 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 J tar xvzf qt embedded linux opensource src 4 5 3 tar gz cd qt embedded linux opensource src 4 5 3 2 Specifies the cross compiler 120 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual
89. e example describes adding complied 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 96 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual After modification it needs to regenerate the file system by mkfs ubifs tool If you haven t installed the mkfs ubifs tools using the following command to install using 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 Y o ubifs img mkfs ubifs Parameter Description r Establish the system file directory m Minimum I O transfer unit size e Logical size of erase block c The largest number of erase logic blocks o Specify the output file View the smallest I O transfer unit size and logical erase block size by the following command ubinfo dev ubi0 ubi0 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
90. ect J11 or J10 to use Connect the board to PC by a crosswire network cable or with a switch or router by a straight through cable Please note On the method of connecting the board to PC using a crosswire cable if board has extranet access demand it requires the PC has dual network cards Connect network card 1 to board network card 2 to network And the network card1 and 2 are set to bridge pattern The following test is the mode of crosswire and PC Dual LAN bridges 1 In Network Connections window select two network adapters right click and select bridge to bridge two network cards 2 Assign to board a IP which is not occupied by any other devices of current LAN In this case we use address 192 168 0 2 root at91sam9x5ek ifconfig ethO 192 168 0 2 up 3 Test the connection between PC and the board by ping command here the host IP 192 168 0 3 Ping board 102 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 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 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
91. em 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 text error message shows a failure about the system attempting to mount a USB device to sda This error can be ignored because sda is not a valid partition Above red text sda4 is an effective partition that we mount 2 The system will mount a connected U disk automatically entering the following command to view the content of U disk root at91sam9x5ek Is media sda4 9x5 rar GTHE HOSTXP GHO NTLDR helloworld 22222299 TXT MYD S5PV210 PETOOLS rootts tar BOOT NTDETECT COM WXPE sam ba_2 11 exe 3 Unplug the U disk directly after completing usage system will uninstall it automatically 4 7 3 SD Card Use 1 Plug Micro SD card into a Micro SD card slot and system will mount it automatically 2 When Micro SD card is inserted HyperTerminal displays SD card information mmco0 the host does not support reading read only switch assuming write enable 100 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual mmco0 new high speed SD card at address e624 mmeblk0 mmc0 e624 SU02G 1 84 GB mmcblk0 detected capacity change from 0 to 1977614336 mmeblkO retrying using single block read 3 View SD card content root at91sam9x5ek Is media mmcbIik0 MyHeartWillGoOn wav 4 P
92. ents for more details 3 2 4 Manual Download Let s take downloading getting started to exemplify the process of manual download Firstly turn on SW1_1 SW1_2 Note disconnect the base board JP8 jump line otherwise the computer will not recognize the development board and press NRST to reset board Then open samba software the startup port is shown in Figure 3 22 Select the connection Select your board JLink speed default Customize lowlevel step 3 EN Figure 3 22 34 MYIR TECH LIMITED www myirtech com C M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual Select the connection USBserial COM13 v Select the connection USBserial COM13 E Select your board at01sam9x35 ek Select your board lat91sam9g15 ek y JLink speed at91sam 7xc512 ek at91sam9m10 945 ek at91sam9260 ek at91sam9n12 ek a at91sam9rl64 ek l at91sam9x25 ek at9lsam9xe128 ek atOlsam9xe256 ek Kat91sam9xe512 ek Ino_board Jat91sam9m10 ekes Figure 3 23 Refer to Figure 3 22 the operation is mainly to choose the right board model Note this example use MYD SAM9X35 board so we select at91sam9x35 ek If choosing other MYD SAM9X5 V2 series it needs to select the corresponding model Refer to Figure 3 23 The main port is shown after clicking Connect in Figure 3 24 SAM BA 2 11 at91sam9x35 ek Fite ScriptFile Link Help at91sam9g15 Memory Display Start Address 0x300000
93. er 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 Figure 5 15 9 Before download file system first enable Trimffs Note Be sure to check Trimffs Refer to Figure 5 16 ij SAM BA 2 11 at91sam9g35 ek i lolx Fie ScrptFie Link Hep at91sam9g15 Memory Display Start Address 0x300000 Refresh SRA infos z apply Size in byte s 0x100 C asdi C shit C 16bit 32bit 0x00300000 0xEA000020 OxFFFFFFFF 0x00000000 0x08000000 E 0x00300010 0x000000 pm Sn SS Ki ECC configuration olx 0x00300020 0x000000 0x00300030 0x000000 E C sof erie 0x00300040 0x000000 00200050 awnanana Pmecc boot header coni tion a cae Number of sectors per page 4 bi Spare size 64 DDRAM DataFlash AT45DB DC8 El Number ofECCbitsrequred2 7 25 AT26 Download Upload File Size of the ECC sector 512 C 1024 Send File Name Ecc offset 48 3 Receive File Name ae er Enable OS PMECC parameters 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 0xc0
94. espondence connection port as COM9 Double click at91sam9x5 bat Android image begins to download board automatically waiting 2 3 minutes it will pop up logfile log file automatic which represents automatic writing is completed 5 3 4 Manual Download Note 1 Pull out SD card before download 2 Here to use the 4 3 inch screen image as an example if 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 126 MYIR TECH LIMITED www myirtech com userdata_ubifs SAM9X5 ANDROID 2 3 5_rl img system_ubifs SAM9X5 ANDROID 2 3 5_r1 im ubootEnvAndroidNandFlas h bin MYiR Make Your Idea Real NANDFLASH U Boot Env MYD SAM9X5 V2 User Manual 0x06400000 0x00500000 Linux Kernel 0x00200000 0x000c0000 u boot bin 0x00040000 at91sam9xSek nandflashboot 3 1 bin Bootstrap Figure 5 5 Download Linux by SAM BA manually 1 Complete Chapter 5 3 1 and 5 3 2 double click SAM BA v2 11 there appears port Refer to Figure 5 6 lox Select the connection USBserial COM9 bd Select your board Jat91sam9q35 ek y JLink speed default I Customize lowlevel Connect bn Figure 5 6 Click Connect to enter SAM BA port Refer to Figure 5 7
95. file folder If samba below version 2 11 has been installed uninstall it cleanly 2 Connect board to PC by mini USB and power on 3 Turn SW1_1 SW1_2 off press NRST to reset board and there will be tips of installing driver after a certain period of time The device is shown in Figure 3 16 a T Ports COM amp LPT Y AT91 USB to Serial Converter COM13 YY USB SERIAL CH340 COM1 Figure 3 16 Install driver manually if it has failed in automatic manner Right click to update driver software program Note the sample has been properly installed and choose to install it manually Refer to Figure 3 17 to Figure 3 21 31 MYIR TECH LIMITED www myirtech com 0 M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual 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 Figure 3 17 Choose to find and install driver software manually 1 e LL Update Driver Software Unknown Device 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 al
96. g DMAC for Multiple Buffer Transfers in row 10 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 la ic ie 00 03 06 09 Oc Of 12 15 18 ib le 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 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 la ic de 00 03 06 09 Oc Of 12 15 18 1b le 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 after transfer 00 01 02 03 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 Done 3 3 6 LCD gt Purpose 44 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual The 4 3 inch screen case is used to demonstrate how to configure LCD Controller LCDC 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 V2 Download the progra
97. ger Refer to Figure 3 41 Network adapters 4 f5 Other devices liz Unknown device Y Ports COM amp LPT a Processors Figure 3 41 Terminal information USB Device Core Project 2 0 SAM9XX5 EK Compiled Aug 3 2013 10 26 19 l USB initialization USBD_Init l Connecting device l VBus configuration 63 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual l conn Rsm Susp Rsm Std gDesc Dev Sid sAddr SetAddr 1 Std gDesc Dev Std gDesc Cfg Std gDesc Cfg Std gDesc Str238 Std gDesc Dev Sid sAddr SetAddr 2 Std gDesc Dev Std gDesc Cfg 3 3 22 Usb_hid_key board gt Purpose This example demonstrates UDP and PIO port on AT91SAM microcontrollers USB Framework is used for USB driver such as USB HID gt Functional Description This example simulates a simple key board Connect the board to the host by USB cable the host reports a new hardware attachment Refer to Figure 3 42 EY Network adapters 4 l Other devices fm ATMEL AT91 HID KEYBOARD II Ports COM amp LPT a Processors Sound video and game controllers Figure 3 42 After installing driver new USB Device appears in the hardware device list As shown in Figure 3 43 3 Floppy drive controllers ca IDE ATA ATAPI controllers 4 03 Human Interface Devices 4D Keyboards Q5 USB Input Device Ge USB Input Device int HID Keyboard Device gt Gq IDE ATA ATAPI controllers E Standar
98. ic HSMCI SD MMC Example 2 0 SAM9XX5 EK Compiled Aug 2 2013 17 16 06 l Cannot check if SD card is write protected Please insert a card l SdMmcldentify Cmd5 3 l SD MEM l Card Type 2 CSD_STRUCTURE O W SD 4 bit mode l HS Not Supported in SD Rev 0x0 l Set SD MMC clock to 22222K 1 SD MMC card initialization successful l Card size 124 MB 249344 512B 1 MCI 0 code 1 clr 2 wr 3 rd l Testing block 97566 97569 3 3 17 Smc_nandflash gt Purpose This example demonstrates s read write data from to NandFlash SMC Functional Description This sample program tests the NandFlash module of the development board which needs to configure the NandFlash port with SMC Inputting the corresponding command according to prompt result message will display on terminal gt Procedures Download program into board turn SW1_1 on press NRSRT to observe relevant terminal information gt Phenomenon Indicates Terminal information SMC NandFlash Example 2 0 SAM9XX5 EK Compiled Aug 2 2013 17 24 12 l Nandflash ID is 0x9580DA2C Menu 58 MYIR TECH LIMITED www myirtech com o MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 1 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 pP Input l Size of
99. ies_1 2 tar bz2 C 2 Compile cd AT91Bootstrap 5series_1 2 make distclean make at91sam9x5nf_defconfig 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 initializes necessary hardware GPIO Clock SDRAM etc then copies u boot to SDRAM to run 4 5 4 Install U boot 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 The u boot bin without debug function will not check the keys of key board when the development board starts and will guide the system directly By default U boot compiled without any modification has no debug function The 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 directory U boot compiled by default without any modification 3 Compile the u boot with debug function 92 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual The U boot operation mode uses u boot debug bin to guide the system It can be entered by pressing the Space Enter key immediately after the development board st
100. ild Output 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 the MDK sample program configuration which needs the hardware emulator ULink2 in advance Please contact our company to purchase if needed 1 After opening project file open the setting dialog box and select Debug tab Refer to Figure 3 10 28 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real Device Target Output Listing User C C Asm C Use Simulator I Limit Speed to Real Time MYD SAM9X5 V2 User Manual Linker Debug utilities Settings f Use ULINK2 ME ARM Debugger y Y Load Application at Startup IV Run to main Initialization File ss El Edit Restore Debug Session Settings IV Breakpoints Y Toolbox V Watch Windows 4 Performance Analyzer IV Memory Display Load Application at Startup V Run to maini Initialization File Restore Debug Session Settings IV Breakpoints IV Toolbox Y Watch Windows V Memory Display CPU DLL Paramet SARM DLL Dialog DLL Paramet DARMATSS DL Driver DLL o Dialog DLL Paramet TARMATSS DLI p91 OK Cancel Defaults Figure 3 10 2 Check hardware emulator ULink2 After connecting ULink2 to board the indicator lights of RUN and COM change blue and then turn off while the indicator light ch
101. inal information and two lights flash alternately Press character 1 the first time only the red light on press this character again two lights flash alternately The above description is the whole processes of manual download 3 2 5 Automatic Download The example of getting started describes the steps of automatic download Location shown in Figure 3 28 4 Xx Favorites E Desktop B Downloads E Recent Places 4 7 Libraries E Documents d Music 04 MDK_Source 01_getting started Download 9x35 Directory files are Name Date modified Type Size E at0l1sam9x5ek dataflashboot 2013 8 5 17 04 BIN File 4KB _ at91sam9x35ekes_test_demo tcl 2013 8 5 17 04 TCL File 1 KB ddram 2013 8 5 17 04 BIN File 8 KB logfile 2013 8 5 17 04 Text Document 3 KB E SAM9X35_MDK_dataflash 2013 8 5 17 04 Windows Batch File 1KB E TempWmicBatchFile 2013 8 5 17 04 Windows Batch File 0KB 37 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Figure 3 28 Right click to edit SAM9X35_MDK_dataflash bat then modify the COM port refer to Figure 3 29 J SAM9X35_MDK_dataflash bat Notepad 9 ooo te Mi File Edit Format View Help samba exe USBserial YOOM3 at 91sam9x35 ek at9lsam9x35ekes_test_demo tcl gt logfile log 241 logfile log Figure 3 29 The local port is COM13 so change COM3 to COM13 Not knowing the actual port of your computer please refe
102. io St ne Audio Output 1 1 1 1 1 Network ETH Port 2 1 0 1 1 DBGU Serial 1 1 1 1 1 Serial UART and USART 6 5 5 6 5 JTAG JTAG Port 1 1 1 1 1 Support 4 3 7 0 LCD 1 1 1 Inch Touch Screen i e S tthe B RTC upport the Saey 4 4 4 y 4 Backup Time Extended 20 Pins User 2 o 5 gt 5 Port Extended Port Power 12V Power Input 1 1 1 1 1 SD Card Micro SD 1 1 1 1 1 CAN CAN Port 1 1 0 0 0 RS485 RS485 Port 1 1 1 1 1 User Button 2 1 1 2 1 Button System Button 2 2 2 2 2 Table 2 1 6 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real 2 2 CPU Module Introduction 2 2 1 CPU Module Preview 1 CPU Module 128MB DDR2 SDRAM ARM 926EJ S SAM9X5 CPU 400MHz 10 100M ETH MYD SAM9X5 V2 User Manual 4MB DataFlash LED Switch 256MB NandFlash 64KB EPPROM Figure 2 1 2 Mechanical Dimensions of CPU Module Board 0000000000000000000000000 4000000000000000000000000 Figure 2 2 3000 e Ope ae mat MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 2 2 2 CPU Performance The ARM926EJ S processor features a technology enhanced 32 bit RISC CPU flexible size instructions and data caches Tightly Coupled Memory TCM Ports and Memory Management Unit MMU It also provides separate instruction and data AMBA AHB Ports for Multi layer AHB based systems The ARM926EJ S processor implements the ARMv5TEJ instruction set which includes an enhanced 16x32 bit multiplier capable
103. isa 69 3 39 26 USD COC COC siii ads 71 3 3 27 Usb iad cde hid noo nono aa EEE Eir 72 3 3 28 Usb iad ede g ddddddd nono a E EAEE Ea REEERE 74 3 3 29 Usb Mis re 76 39 3 30 pr Lo EPA 78 33 31 Extemal Plica 79 33 92 EMM YAR aia 80 3399 EM ES 80 Chapter 4 Linux System Guide 82 A 82 4 2 Software Resources 0 a cissstceunee airaiyctine emanate 83 4 3 Start Linux e e em ee 84 4 3 1 Install Download TOO isa 84 4 3 2 Connect the Board to Plain 84 4 3 3 Automatic Download siii 85 4 3 4 Manual Download to 85 4 4 Linux Development Environment Structure ooociccconcnncnonicocnnnnconccnnononnnoncnnrannncnno 91 425 Installation A O Complete 91 4 5 1 Create a Working DIECION tardes 91 4 5 2 Install Cross Compiler Tools sets 92 4 5 3 Install AT91 Bootstrap Source and Compile n 92 4 5 4 Install U boot Source and Compile cee eecceeseeeeeeeeeeeeeeeeeaeeeceeeetseeesaeeeteees 92 4 5 5 Install and Compile Linux Kernel Source Code 93 4 6 Make Linux File SS Mii 94 4 6 1 Write Demo Program helloworld Pn 94 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 4 6 2 Mount UBIFS File System data 95 4 6 3 Modify UBIFS System Files at 96 4 6 4 Regenerate UBIFS System File ococonioniccnninnncionnnonccornrncncnconnnrrnnnrocnnrnss 96 AF AGU FASS WG AU OM essees eesse 99 4 7 1 Touch Screen Calibration on 99 PET ce DIS US ata 100 4 7 3 O O ee 100 74 Play MP3 MUSIC 101 4 4 0 Network
104. l and LCD When touching LCD the pen coordinate will be outputted in terminal If the calibration doesn t succeed retry until success gt Phenomenon Indicates Terminal information ADC_ Touchscreen Example 2 0 SAM9XX5 EK Compiled Aug 1 2013 22 55 00 l cache is already enabled l PO 162 793 l P1 885 777 l P2 787 292 l P3 520 358 l Slope 1320 2160 l TP 285 389 gt 143 218 W X 143 Y 218 Diff 97 82 E Error too big Retry l PO 162 806 l P1 883 787 l P2 884 209 l P3 160 248 l Slope 1926 2667 l TP 521 446 gt 238 165 l Calibration successful AAA Pressed 352 89 1942 Move 353 89 1962 Release 353 89 Pressed 156 170 1883 Move 303 132 1929 Release 303 132 3 3 4 CAN Purpose The CAN example demonstrates CAN peripheral Functional Description This example aims at testing the following CAN operations e Simple CAN test CAN1 Mailbox 5 of one board sends data to CAN1 Mailbox 1 41 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual on another board e Messages to One and the same Mailbox test CAN1 Mailbox 5 and 6 of one board send data Mailbox 6 goes first CAN1 Mailbox 2 on another board receives them but the last one is discarded e Messages to One and the same Mailbox test CAN1 Mailbox 6 and 5 of one board send data in sequence with ID 0x40
105. l driver software in the same category as the device Figure 3 18 Click the red box to enter driver list Refer to Figure 3 19 32 MYIR TECH LIMITED www myirtech com 0 M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual OS e yet oe _ Select the device driver you want to instal for this hardware y pan i Bidet Datemodified Type Seectthe manufacturer and mode of your hardware decade Gi Nee 2013 21012 Setuplnfe I ik hat contains the diver you want to intl ce Hove Dk Recent Places Lirias leey E e Horea Show compatible hardware con late l Desktop E e Le Program Fies pe bars 3 qa A Windows Ji Spent Computer ay Local Disk 0 cq lol ik ti Led 4 Neve foot BD ROM Dive H Co Figure 3 19 Click OK to install driver Refer to Figure 3 20 When installation is finished it will be shown as Figure 3 21 Figure 3 20 33 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 13 gt w 0 Update Driver Software AT91 USB to Serial Converter COM4 P ee E Windows has successfully updated your driver software Windows has finished installing the driver software for this device AT91 USB to Serial Converter Close Figure 3 21 After installing samba driver download program into board There are two ways download automatically and manually Please refer to follow cont
106. labbus cat PreInstaller exe oy PY eInstaller MFC Sees inf slabbus sys slabem95 sys slabemnt sys HER AF RIF RRT 9 KE 11 KB T K slabcomm vxd slaber sys slabser cat slabser sys 0 AE ARI TER ESA 4 KB 12 KB 99 KB slabunin u2k slabunin u98 T exe etup AP ows RJ 2000 slabunin exe V2K wt Vas Wit 1 KB 1 KB slabye slabver vxd slabvxd inf slabw2k inf Sane sate Sei BABI HR HERA 30 KB i KE 5 KB zorin inf abwh95 sys slabwhnt sys BAS THRE E E ARM Internet HEDE 5 KB KB 6 KB 1 KB Figure 3 13 Choose install to install driver program as shown in Figure 3 14 3 15 w Install Driver CP210x USB to UART Bridge Controller Driver Set me500 Browse Cancel C Program FilesiSiLabsiMCVACP210x Figure 3 15 30 MYIR TECH LIMITED www myirtech com C M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual 2 Connect USB_UART to PC by mini USB The first connection needs to install the USB serial port driver Open the terminal main parameters must be configured as follows Select the corresponding USB_UART port COMX such as USB_UART is com1 in device manager then X is 1 Baud rate 115200 Data bits 8 Parity bit None Stop bits 1 Note if there are no special statements in MDK sample program tests DBUG information is output by USB_UART Download 1 Install samba software Version 2 11 or above the installation package is in 03 Tools SAM BA
107. le controls SC16IS through SPI to produce general GPIO gt Procedures Press NREST after downloading and observe relevant terminal information Output voltages in J17 are as follows 1 2 5 6 is 3 3 v 3 4 7 8 is O v gt Phenomenon Indicates 79 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Terminal information SPI with SC16 GPIO Example 2 0 SAM9XX5 EK Compiled Aug 9 2013 19 06 30 DMA driver initialized with IRQ SPI and SC16 drivers initialized Set SC16 GPIO output is Oxaa Modify lOdir and lOstate to change PIN direction and state 3 3 32 External UART gt Purpose This example describes how to use SPI to extend UART gt Functional Description This example controls SC16IS through SPI to produce the UART gt Procedures Press NREST after downloading and observe terminal information Connect PC s serial port to J21 press some button to input and observe echoed character gt Phenomenon Indicates Terminal information SPI with SC16 Example 2 0 SAM9XX5 EK Compiled Aug 9 2013 20 50 02 DMA driver initialized with IRQ SPI and SC16 drivers initialized Set SC16 uart baud rate 115200 and select SC16 channel B Receive data is 1 Receive data is 1 Receive data is 1 Receive data is 1 Receive data is 1 Receive data is 1 Serial Terminal information 111111111111111111111111111 3 3 33 External RTC 80 MYIR TECH LIMITED
108. m MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 2 4 JUMP SS MINS serieren aaron a a a a aes ey 21 Chapter 3 MDK Example Code wisiscicscicwcinnsccssieveiascncaisaninsnssnessaniivsnienncsssaussawesteswuauwandwauen 23 SA OVES eae aah caer a teaee ete eser a age rare ae aie 23 A 23 32 1 Configure And COMPE rai 23 22 2 MDK Ro tne Debug sur ini 28 3 2 3 Super Terminal Configuration oia 30 3 2 4 Manual DOWN 34 3 2 5 Automatic Download errar 37 3 3 MDK Routine Introduction ssssssssssesseseeeeseeesrsrsrsrsrsssstsssssrerrenennnenrsrsrsnnentntstsnsnene 38 Eo UA 38 39 2 AOC ade Dni 7 39 3 3 3 Ade TOUCH SC adonde 40 3 39 ACAN eese aeea R AE E aA E EaR aE E 41 3 395 DMA arta 43 A E E E E 44 3 3 7 Periph MOI 45 3 3 8 EME clock suitohinq 47 eee 49 8836 50 cuca lo pao a e eaten ees 52 83312sa 53 Bs Pee Se EMAC 54 e E i 55 3 3 15 Hsmci_multimedia_Card occococcncccconoccnononnnonnconononnonconono noo noo risene ineens 56 3 3 16 Asmoi sdearrrggggggg nono noo noo sste raars kaisi AEE irsi 57 3 3 17 Smc_nand lash 58 33 18 Spi SONAS AAA 60 3 39 19 Usb aula dh i aiaa 61 33 20 Usb cde serali Sce a it 62 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 3 39 21 USD COE caca aaa a E EEEE aa e a re a E eN a 63 3 3 22 Usb hid kevin 64 3 3 23 USD Nid MOUSE iisti er tacos a K ee his E EKNE ENESE 65 39 24 Usb Mid MSA iio did 66 3 39 25 USD hid WANS conc
109. m into board press NRSRT to observe terminal information Then test pattern is displayed on the LCD gt Phenomenon Indicates Terminal information LCD Example 2 0 SAM9XX5 EK Compiled Aug 1 2013 23 40 10 l cache is already enabled Test Pattern 480 x 272 80 x 68 Test Cursor 32 x 32 LCD ON 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 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 45 MYIR TECH LIMITED www myirtech com o MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual This application shows protective mechanism of PIO controller When the write protection is enabled any write attempt to write protected registers is aborted So register won t be modified Besides the write protect registers save register offset address gt Procedures Download the program into board press NRSRT to observe relevant terminal ap information Typing in terminal will enable write protect mode while typing U will enable unprotected mode gt Phenomenon Indicates Terminal information Peripheral Protect Example 2 0 SAM9XX5 EK Compiled Aug 2 20
110. memory Scripts 3 PORTA a sam ba_2 12 1 NANDFLASH NandHeaderValue HEADER 0xc0c00405 a Ecc type is 2 Ecc Status is 2 E Configure trimffs 0 I PMECC c0c00405 to be Configured E Pmecc header configration successful F PMECC configure c0c00405 sam ba_2 12 1 NANDFLASH NandHeaderValue HEADER 0xc0c00405 sam ba_2 12 1 USBserial COM13 Board at91sam9x35 ek Figure 4 14 Note Be sure to select Trimffst on the popup dialog box in the process of executing Enable OS PMECC parameters Finally restart board to boot Linux system normally Please refer to Chapter 4 7 about how to use Linux 4 4 Linux Development Environment Structure About the content of this Chapter please refer to Description VirtualBox s Linux based development environment to build pdf 4 5 Installation And Compile 4 5 1 Create a Working Directory mkdir home MYIR_SAM9X5 cd home MYIR_SAM9X5 Copy 05 Linux_Source folder in CD to home MYIR_SAM9X5 cp r media cdrom 05 Linux_Source 91 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 4 5 2 Install Cross Compiler Tools Decompress cross compiler tool to usr local directory sudo tar xvjf A 05 Linux_Source CrossTool A arm 2010q1 202 arm none linux gnueabi tar bz2 C usr local 4 5 3 Install AT91Bootstrap Source and Compile 1 Install tar xvjf 05 Linux_Source AT91Bootstrap AT91Bootstrap 5ser
111. n we can use the method described in Chapter 4 3 4 to download the generated file fsimage ubi to 0x800000 Reset board and input root to login there is the newly added file helloworld 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 helloword using the following command root at91sam9x5ek helloword argc 1 argv 0 helloword 98 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 4 7 Linux Application After running Linux system it can be operated by touch screen operation or carried out by terminal serial In the following Chapter we exemplify how to operate Linux how to mount U disk SD card how to test network port and how to play music 4 7 1 Touch Screen Calibration Note MYD SAM9X25 V2 and MYD SAM9G25 V2 board don t support touch screen On the first time logging in the system will calibrate the screen using the default calibration parameters If there is still a deviation after calibration 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 starting Linux log in as root command at91sam9x5ek login root 2 Run the calibration procedure and click the five corresponding calibration points on the LCD s
112. n 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 the program configures PlOs for DBUG PCK DBUG baud rate is configured as 1200 bps This example prints the current configuration and waits input to switch system clock gt Procedures This program is different from others Firstly DBGU baud is configured as 1200 bps while others don t change Secondly manual download has a little change please accord with the following steps Turn SW1_1 SW1_2 off press NRST and open samba 2 11 The same as manual download in Chapter 3 24 Then turn SW1_2 on enable SerialFlash and download sram bin file Specific operations are shown in Figure 3 30 Figure 3 31 47 MYIR TECH LIMITED www myirtech com C M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual gt SAM BA 2 11 at91 File Script File Link Help at91sam9g15 Memory Display Start Address 0x300000 Refresh Display format Applet traces on DBGU Tene inf al byte s 0x100 C ascii 8 bit 16 bit 32 bit infos pply q 0x00300000 0xEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 m DDRAM DataFlash AT45DB DCB EEPROM AT24 NandFla
113. nformation 1 Connecting pin 7 in J5 to pin 8 in J2 blue LED start glowing repeatedly at f1 2 Connecting pin 7 in J5 to pin 12 in J2 blue LED start glowing repeatedly at f2 gt Phenomenon Indicates Two different connection ways lead the LEDs flashing at different frequencies 3 3 10 Ssc_dma_audio gt Purpose This example demonstrates outputting an audio stream by WM8731CODEC gt Functional Description This example plays a pre loaded WAV file in flash The audio stream is outputted by WM873 SSC port 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 file with XModem Protocol X Receive WAV file through DBGU Input x in terminal Transfer wav file with 1K XModem Ctr D to cancel Operation can be done in Figure 3 32 and Figure 3 33 50 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual File Edit View EJER Mil Receive Xmodem Send Ymodem Receive Ymodem Zmodem Upload List Start Zmodem Upload Send a file using Xmodem Serial COM1 115200 1 1 24 Rows 80 Cols VT100 D Figure 3 32 Ba ssc dma audio 6 ca r Name Date modified Type ay Ji Download 2013 4 1 22 12 File folder Recent Items J project 2013 4 1 22 12 File folder Li Readme 2013 4 1 22 12 File folder U
114. nking 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 lts framework is as shown in Figure 5 1 APPLICATIONS Phone APPLICATION FRAMEWORK Window Manager LIBRARIES ANDROID RUNTIME Media Framework Core Libraries LINUX KERNEL Figure 5 1 This Chapter describes how to build and run Android 2 3 5 system in MYD SAM9X5 123 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual V2 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 U boot 1 Support NandFlash Erase Read and Write Boot 2 Support Network to Download Image program U boot 3 Support Settings Save Environment Variable 4 Support Display Contrast Modify Memory Content 5 Support Bootm Bootargs Settings Develop Linux kernel for MYD SAM9X5 V2 Linux Kernel Linux 2 6 39 hardware Network Port da ETHO Provide Source Driver Serial Port Driver USARTO DBGU Provide Source USB USB_THE HOST 2 USB_OTG Provide Source SMD Driver
115. ort One Full speed USB THE HOST Port One USB Serial Debugging USB_UART Port Ethernet MAC e MYD SAM9G15 V2 doesn t have Ethernet MAC MYD SAM9X25 V2 has two Ethernet MACs J10 and J11 e The others MYD SAM9G25 V2 MYD SAM9G35 V2 MYD SAM9X35 V2 have only one Ethernet MAC LED Indicator gt gt gt One Power Indicator CPU Module Red One Users Light System Heartbeat Light CPU Module Blue One Power Indicator Base board Red 4 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real 1 4 Products Packing MYD SAM9X5 V2 User Manual MYD SAM9X5 V2 Development 1 1 Base board amp CPU Module Board 2 1 5 Meters Crossover Cable 3 1 5 Meters Mini USB 2 0 Cable 4 12V 1 25A DC Power Adapter Include Schematic PDF User 5 Product DVD 1 Manual Source Code etc 6 4 3 7 0 Inch LCD Touch Screen 1 Optional Table 1 1 5 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Chapter 2 Hardware Resource Introduction 2 1 CPU module amp Base Board Resources Overview The features of SAM9x5 V2 series are shown in Table 2 1 AT91SAM9G15 9G25 9G35 9X25 9X35 ARM926EJ S Core frequency at up to 400MHz Memory 128MB DDR2 SDRAM Flash 256MB NandFlash 4MB serial DataFlash EEPROM 64KB serial EEPROM USB THE HOST 2 2 2 2 2 USB USB OTG 1 1 1 1 1 Audio Input 1 1 1 1 1 Aud
116. pecification of USB2 0 SUSPEND pin support USB state hung Data Formats Supported Data bits 5 6 7 and 8 Vv Vv V WV Stop bits 1 1 5 and 2 Parity odd even mark space no parity gt Integrate a 512 bytes receiving buffer and a 512 bytes sending buffer gt Support hardware or X ON X OFF shake hands The Mini USB DBUG circuit is shown in Figure 2 16 u1 CP2102 REGIN RS 7 6 VDD RTS 35 X c5 el co a c7 RXD 25 10uF TXD 777 J4 G3515 09010101 00 7 USB_CP2102 costs SUSPEND nce PAX SUSPEND NC10 z 3 t 2200hm at 100MHz T2 Em USB B5 V1 MLP 28 R0805 Figure 2 16 2 3 9 RS485 Bus SAM9G25 and SAM9X25 have two 485 Ports The other three 9X5 boards have one RS485 Port signal reuse with serial Port with electric isolation RS485 Bus uses ADM2483 chip and its key features are as follows gt Inline with the ANSI TIA ElA RS 485 A 1998 and ISO 1998 1987 E standard gt Data Rate 250 KBPS gt Limit Set Rate Driver Output gt Low Power Consumption 4 5 mA maximum 18 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Working Voltage VDD1 5 V or 3 V High Common Mode Transient Immunity gt 25 KV including s Burr on the Electric on off Protection Thermal shutdown Protection Vv Vv Vv V WV Receiver Open circuit Fault Secure Design The RS485 circuit is shown in Figure 2 17
117. pio205 echo 0 gt value 107 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual root at91sam9x5ek sys class gpio spi gpio205 cat value 0 When setting the value test GPIO by multi meter 2 Set GPIO to input root at91sam9x5ek sys class gpio spi gpio205 echo in gt direction If current GPIO is low level the value is 0 root at91sam9x5ek sys class gpio spi gpio205 cat value 0 If current GPIO is high level the value is 1 root at91sam9x5ek sys class gpio spi gpio205 cat value 4 4 8 Linux Driver Development Example This Chapter describes a simple character device driver development achieving the function to control LEDs 4 8 1 Hardware Schematic PDI 5 21 Qi IRLML2502 LED Figure 4 16 Use PD21 port to control D2 by IRLML2502 When it is high LED turns on Port PB18 controls D1 directly When it is low LED turns on Refer to Figure 4 16 4 8 2 Driver Source Code 1 Create driver file in new kernel Create a driver source file in directory driver char 108 MYIR TECH LIMITED www myirtech com o MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual cd linux 2 6 39 HF 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 gt include lt mach gpio h gt include lt linux device h gt define DEVICE_NAME MYS SAM9X5
118. r gt Phenomenon Indicates There will be device in Figure 3 39 A Mice and other pointing devices E Monitors amp Network adapters a l Other devices py ATOLUSBSerial gt Ports COM amp LPT a Processors Figure 3 39 Updating driver location 04 _MDK_Source libraries usb device there will be additional AT91 USB to Serial Converter COM4 in the device Refer to Figure 3 40 amp Network adapters 4 i Ports COM amp LPT 5 AT91 USB to Serial Converter COM4 Figure 3 40 62 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Terminal information USB Device CDC Serial Project 2 0 SAM9XX5 EK Compiled Aug 3 2013 10 24 06 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 connn 3 3 21 Usb_core Purpose This example demonstrates UD port on AT91SAM microcontroller Functional Description Connect PC by USB cable and the host will prompt USB device attachment 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 may not report it The device manger is shown in Figure 3 38 gt Phenomenon Indicates New hardware USB device can be found in device man
119. r Manual Chapter 3 MDK Example Code 3 1 Overview MDK examples are programed without operating system and the development kits are MDK ARM 4 53 This Chapter describes how to use and write test codes which is listed as follows 1 Built and configured MDK development environment 2 Download compile and debug MDK sample programs 3 The features introduction usage and appearance explanations of the test procedures including board start DMA ADC LCD Storage System Ethernet and so on 3 2 Preparation 1 Install MDK ARM Version 4 53 development kits and the license 2 Prepare for MYD SAM9X5 V2 development board kits MYD SAM9X5 V2 series development boards include gt MYD SAM9G15 V2 MYD SAM9G25 V2 MYD SAM9G35 V2 MYD SAM9X25 V2 V VW V WV MYD SAM9X35 V2 3 2 1 Configure And Compile Let s take sample program getting started for example Firstly find O4 MDK_Source 01_getting started Project folder and double click project file getting started uvproj then configure project The detailed steps are as follows Note Generally Download and compile a program by default setting If the downloading or compiling process failed it is 23 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual necessary to check and reset the program 1 Select the project and click the right button then select Option for target MYD SAM9X35 or press Alt F7
120. r and inherit all its components and periphery Ports its key features are as follows gt Rich Peripherals Include Ethernet USB2 0 Device USART SD Card and so on High performance Data Channel Atmel SAM9X5 series microprocessors which run at up to 400MHz have 12 layer bus matrix based high data bandwidth channel Next generation Memory LPDDR DDR2 support ensures supply and cost efficiency In addition the MLC SLC NAND Flash controller of MPU supports 24 bit Error Code Correction Low Power and Low System Cost In backup mode power consumption is only 300UW MHZ working at 400MHz and 8uA 3 3V lOs eliminates the need for external level shifter while 0 8mm ball pitch packages reduce PCB design complexity and cost Basic features of MYD SAM9X5 V2 series are listed as the following 2 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real Electrical Parameters MYD SAM9X5 V2 User Manual gt Operating Temperature e Industrial Grade 40 C 85 C e Commercial Grade 0 C 70 C gt Electrical Specifications e Base Board 12V 1 25A e CPU Module 3 3V 1A gt Mechanical Dimensions Base Board 177mm x 106mm x 1 6mm CPU Module 72mm x 50mm x 1 6mm gt Debugging Port 20 pin 2 54 mm standard JTAG Port gt PCB Layer e Base board 4 Layer Immersion Gold Separate Layer The Ground Signal is lead free e Core board 6 Layer Immersion Gold Separate Layer The Ground Signal is lead free gt Core
121. r to Chapter 3 2 3 and save it Note Don t change the others Then turn SW1_1 SW1_2 off Note disconnect the base board JP8 jump line otherwise the computer will not recognize the development board press NRST to reset board After reset it turn SW1_2 on and double click SAM9X35_MDK_dataflash bat to start the automatic download process lt will pop up a logfile which records downloading steps and information Related information will be recorded likewise if download fails After finishing downloading press K1 to reset board the program will start to run At this point the process of automatic download has completed The automatic and manual download are doing the same thing It is recommended to use the automatic download to save time 3 3 MDK Routine Introduction The MDK sample programs basically cover the test and usage of all kinds of on board devices Important Note Please refer to Chapter 3 2 for download steps and terminal configuration The following examples will no longer describe how to download and configure terminal All sample programs test requires relevant preparations 3 3 1 Getting started gt Purpose This example demonstrates chip startup sequence and core peripherals gt Functional Description 38 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual This program makes two LEDs blink at a fixed rate then type 1 or 2 to control LE
122. rt Driver LED LED Driver including GPIO LED PWM LED driver Angstrom X11 X11 file system with a graphical port System Files Angstrom Qt No desktop file system of Qt library transplanted Table 4 1 83 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 4 3 Start Linux System 4 3 1 Install Download Tool Install Atmel ISP download software SAM BA requires version 2 11 or above the software location in the DVD is 03 Tools SAM BA Note to uninstall samba v2 10 and previous versions SAM BA software and development board USB drive before installing If you need two or more versions of SAM BA coexist then different versions of SAM BA should use different USB ports on PC 4 3 2 Connect the Board to PC 1 Connect the board J8 with PC through a micro USB cable and switch the power to 12V 2 Turn SW1_1 SW1_2 OFF and disconnect jumper JP8 then restart board this order cannot be disturbed Firstly connect to board it will prompt to install board driver Then select SAM BA installation directory which is shown in Figure 4 2 ATMEL Corporation O AT91 ISP v1 13 G sam ba_2 11 D applets doc ILD examples tel_lib Figure 4 2 3 If there is the same as Figure 4 3 in my computer gt properties gt Management gt device manager gt port it means that board driver has been installed 84 MYIR TECH LIMITED www myirtech com C
123. rtech com MYiR Make Your Idea Real MYD SAM9X5 V2 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 J Bad Romance 0 07 e ma LN Figure 5 24 5 5 4 Ethernet Test 1 Enter port and select icon Ethernet Refer to Figure 5 25 140 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual AndroidCalib Browser Calculator Calendar Camera Contacts Dev Tools Downloads Gallerv Messaging Figure 5 25 2 Open Ethernet Refer to Figure 5 26 SE 00 44 Ethernet Turn off Ethernet Ethernet configuration Configure Ethernet devices Figure 5 26 3 Configure Ethernet Refer to Figure 5 27 141 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 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 di Configure Ethernet device Ethernet Devices eth0 Connection Type Dhcp Cancel Figure 5 28 5 After configuration is successful input string www baidu com Refer to Figure 5 29 142 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual aq
124. s audio 3 3 11 Twi_eeprom gt Purpose This example program demonstrates TWI peripheral accessing an external serial EEPROM chip gt Functional Description 52 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 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 Aug 2 2013 10 35 30 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 Read write on page 1 IRQ mode l Callback fired l Callback fired I O comparison error s found 3 3 12 Usart_serial gt Purpose This example demonstrates USART simulating 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 Compiled Aug 2 2013 11 15 21 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 53 MYIR TECH LIMITED www myirtech com
125. s boot program is copied automatically to internal SRAM and begins to be implemented 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 and start u boot 2 U boot The secondary boot program which is used for kernel image update load kernel and boot kernel 3 U boot Env Configure environment variables and provide u boot running parameters such as ip 82 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual address start a command and kernel boot parameters 4 Linux Kernel Build Linux 2 6 39 kernel for MYD SAM9X5 V2 5 Root FS Angstrom X11 GUI system file Angstrom Qt no desktop file system 4 2 Software Resources Boot Boot Strap First Boot Program program U boot Secondary Boot Program Linux kernel Linux 2 6 39 Linux Kernel Only for MYD SAM9X5 V2 Hardware USB The host driver supports the mode of OHCI and USB The Host EHCI transmission USB Device USB Device Driver Gadget Ethernet Ethernet Driver MMC SD MMC SD Card Driver NandFlash NandFlash Smart Media Driver TWI 12C 12C Driver Device SPI SPI Driver Drivers WM8731 WMB8731 Driver LCD Controller LCD Driver support 4 3 inch 7 inch 10 2 inch RTC RTC Clock Driver Touch Screen 4 wire Resistive Touch Screen Driver PWM PWM pulse width modulation Driver UART Serial Po
126. sam ba_2 11 3 Figure 5 8 128 MYIR TECH LIMITED www myirtech com 7 M Y R Make Your Idea Real MYD SAM9X5 V2 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 0x00300000 OxEA00002 0x00300010 9x0000000 0x00300020 0x0000000 0x00300030 0x0000000 0x00300040 0x0000000 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 NANDFLASH NandHeaderValue HEADER 0xc0c00405 sam ba_2 11 3 Figure 5 9 129 MYIR TECH LIMITED www myirtech com 1 M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual 4 Select Erase All in Scripts tab and then click Execute Refer to Figure 5 10 SAM BA 2 11 at9isam9g35 ek 0x00300000 OxEA000020 OxFFFFFFFF 0x00000000 0x08000000 0x00300010 0x00000000 0x00000000 0x00000001 0x00000020 0x00300020 0x00000000 0x00000000 0x00000000 0x00000000 0x00300030 0x00000000 0x00000000 0x00000000 0x00000000 0x00300040 0x00000000 0x00000000 ox00000000 0x000000
127. same time the audio stream received is also sent back to the 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 board 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 38 a 3 Driver Software Installation IT Installing device driver software Desktop speaker Searching preconfigured driver folders 61 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual ta Human Interface Devices 4 Sound video and game controllers He Desktop speaker Realtek High Definition Audio Figure 3 38 Terminal information USB Device Audio LoopREC Example 2 0 SAM9XX5 EK Compiled Aug 2 2013 17 48 31 USBD_Init 3 3 20 Usb_cdc_ serial gt Purpose This example demonstrates USB Device Port UDP and USART port on AT91SAM microcontrollers as well as USB Framework gt Functional Description This demo simulates a USB to RS 232 Serial Port Converter gt Procedures Download program into board press NRSRT to observe relevant terminal information the host will report a new USB device attachment Note it may not appear in some computers There will be additional serial port after installing drive
128. ser 2013 4 1 22 12 File folder Desktop gt sample wav 2013 4 2 13 36 Wave So SE Ee My Documents A Computer Figure 3 33 Starting x modem transmission after clicking OPEN press Ctrl C to cancel transfer and wait for end prompt 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 51 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 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 Press any key to return to menu gt Phenomenon Indicates Terminal outputs information in detail and headphone output
129. ser LED circuits are shown in Figure 2 3 3V3 R67 D1 Blue PB18 470R a PD 5 21 at IRLML2502 Figure 2 3 2 2 5 Switch Setting The switch is shown in Figure 2 4 10 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 00000004 Figure 2 4 The switch functions are shown in Table 2 4 SW1_1 Enable NandFlash Disable NandFlash SW1_2 Enable DataFlash Disable DataFlash Table 2 4 2 3 Base Board Introduction 2 3 1 Base Board Dimensions The Base Board Mechanical Dimensions are shown in Figure 2 5 11 MYIR TECH LIMITED www myirtech com 0 M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual Figure 2 5 2 3 2 Universal Serials There are two 3 lines UART and two 5 lines USART on the base board as shown in Figure 2 6 to Figure 2 8 TN E nie RIB YOR UTADA Pt RT UTXD1_LCDDAT16 S H no pc17 LJ Figure 2 6 12 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual u14 MAX3232C SE Figure 2 7 u16 MAX3232C SE 3V3 18 vee c H d c92 100nF We c1 3 3V3 3V3 We C2 4 e cos R146 R146 100K 10K Figure 2 8 2 3 3 CAN BUS SAM9X25 and SAM9X35 have one CAN Port by TJA1050 chip Its key features are as follows gt Fully compatible with the ISO 11898 standard High speed up to
130. sh One wire EEPROM SRAM SerialFlash AT25 AT26 m Download Upload File Send File Name S Send File Receive File Name A Bs Receive File Address 0x0 Size For Receive File ox1000 byte s Compare sent file with memory Scripts F Loading applet applet serialflash sam9g15 bin at address 0x20000000 I Memory Size 0x400000 bytes F Buffer address 0x20009A14 F Buffer size 0x4000 bytes E Applet initialization done sam ba_2 11 4 USBserial COM13 Board at91sam9x35 ek Figure 3 30 i re sent file with memory r tuauniy appel aj 4 I Memory Size 0x400000 bytes T Buffer address 0x20009A14 1 Buffer size 0x4000 bytes T Applet initialization done sam ba_2 11 1 GENERIC SendBootFileGUI sam ba_2 11 1 La AUSBse ieN COMA Board alsamd3S ek Figure 3 31 Download the program into board press NRSRT to observe relevant terminal information and switch system clock according to prompts gt Phenomenon Indicates Terminal information Switch to 1200 bps for DBG 48 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual PMC Clock Switching example 2 0 SAM9XX5 EK Compiled Aug 2 2013 09 12 21 Current PMC clock from lowlevel pmc configuration The slow clock source is internal 32 kHz RC oscillator PLL
131. ssfully but system boot failed Analysis and Answers If downloading linux image to board with SD card mounted the system might fail to start and show following message on Hyper Terminal Please unplug SD card and try to download linux image again Q4 Automatic download for a long time HyperTerminal did not continue to output download information Analysis and Answers This may be stuck in automatic download process It can end sam ba exe process in task manager and then restart download If start SAM BA v2 11 Click Connect and pops up the following window when in automatic download 145 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual ix MM Error in startup script j A Error h_handle returned zero while executing TCL_Open Starget connection red Gos mi a Wf S argc gt 2 4 puts I Retrieved arguments from command line puts I argv 0 index argv 0 puts I argv 1 linde Lain Piaf Files ATMEL Corporation sam ba_2 11 sam ba exeflib tkcon td line 4892 source file join Sstarkit topdir lib tkcon td file C Program Files ATMEL Corporation sam ba_2 11 sam ba exe main td line 6 This failure might cause by duplicated running SAM BA please end duplicated SAM BA process and try again Q5 MDK routines cannot debug online Analysis and Answers This problem occurs mainly caused by the following reasons
132. ster_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 0 class_destroy MYS_SAM9X5_ledtest_class cdev_del amp cdev unregister_chrdev LED_Major DEVICE_NAME module_ nit 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 Driver 1 Create a Makefile Create a Makefile on ledtest vi Makefile ifneq KERNELRELEASE obj m ledtest o else KDIR linux 2 6 39 PWD shell pwd all MAKE C KDIR SUBDIRS PWD modules endif clean rm f o ko mod c KDIR value indicates the location of the Linux kernel source code In this example it is Linux 2 6 39 Please assign to it according to the actual location of the Linux kernel source code 2 Compile the driver 112 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual make ARCH arm CROSS_COMPILE usr local arm 2010q1 bin arm none linux gnueabi The compiling process will generate driver file ledtest ko in current directory In the next section we will illustrate how to use this driver file 4 8 4 Download Driver Copy the
133. t tab including the intermediate files is shown in Figure 3 3 KZ Options for Target MYS SAM9X35 Ls y Device Target Output Listing User C C Asm Linker Debug Utilities Select Folder for Objects Name of Executable Create Executable 9x35 ddra I Debug Information TT Create HEX File E s35 e ex Ey FA Browne komata Name b Date modified C Create Library 39 aic crf 2012 07 09 8 4 Noic d 2012 07 09 8 4 Jaic o 2012 07 09 8 4 _ board_cstartup_keil d 2012 07 09 8 4 mW Path OK Cancel Defaults Help Figure 3 3 Click Select Folder for Objects and then click OK on the popup dialog box which we can select the storage path Users can define the executable file name by themselves 4 The generated intermediate file folder can be selected in the Listing tab Refer to Figure 3 4 E Options for Target MYS SAM9X35 _ Linker Debug Utilities Device Target Output Listing User C C Asm po Et Folder JE 9x35 7 Bc Br a I C Preprocessor List Name Date modified 3 aic crf 2012 07 09 8 47 jaic d 2012 07 09 8 4 laico 2012 07 09 8 4 board_cstartup_keil d 2012 07 09 8 4 4 l g J gt Path oK Cancel Defaults Help Figure 3 4 5 The User tab is shown in Figure 3 5 25 MYIR TECH LIMITED www myirtech com 7 M
134. ter COM5 1 AT91 USB to Serial Converter COM6 1H CP210x USB to UART Bridge Controller COM1 Figure 3 53 Terminal information USB Dual CDC Device Project 2 0 SAM9XX5 EK Compiled Aug 3 2013 15 46 56 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 72 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual This example demonstrates USB Device Port UDP port and other ports 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 Key board functions When connect the board to the host by USB cable the host will notice USB device attachment After installing driver device manger adds COM and key board 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 the host reports a new USB device attachment After installing driver AT91 USB to Serial Converter and HID key board Device are added to device manger Typing 1 makes terminal continuously print a while typing 1 again makes terminal stop printing a
135. th 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 148 MYIR TECH LIMITED www myirtech com
136. tion This example achieves the function that the USB model controls the mouse cursor Connect the board to the host by USB cable the host report a new device attachment Pressing w s a d can control the mouse cursor gt Procedures Download program into board press NRSRT to observe relevant terminal information The host reports a new device and installs it automatically and there will be new device in device manger Pressing w a s d which represents up down left and right respectively can move the host cursor Note The cursor is in terminal window gt Phenomenon Indicates 65 MYIR TECH LIMITED www myirtech com C MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual New USB device can be found in device manger Refer to Figure 3 44 Floppy drive controllers Keyboards a W Human Interface Devices Y USB Input Device 5 USB Input Device c IDE ATA ATAPI controllers ff Microsoft PS 2 Mouse EP Jungo AL Monitors Figure 3 44 4 Mice and other pointing devices LP HID compliant mouse Terminal information USB Device HID Mouse Project 2 0 SAM9XX5 EK Compiled Aug 3 2013 10 49 28 Press W SAD to move cursor l HIDDFunction_Initialize USBD_Init l VBus configuration l conn Pressing the buttons WSAD on the key board can move the host cursor 3 3 24 Usb_hid_msd gt Purpose This example demonstrates USB Device Port UDP port and other ports as well
137. ts include USART3 and JP6 jumper must be connected In Linux system serial ports and their corresponding Device node and Functional Description are shown as shown in Table 4 2 USB_UART dev ttySO Debug UART USARTO J18 5 lines serial or RS485 Switch through the JP4 jumper 5 lines serial or RS485 Switch through USART3 J19 dev ttyS4 JP4 jumper only 9g25 9x25 have when using JP6 jumper must be connected UARTO J22 dev ttyS5 3 lines serial UART1 J22 dev ttyS6 3 lines serial External Serial f f f Port0 J20 dev spi_usartO 5 lines serial External Serial f f Port 1 J21 dev spi_usart1 5 lines serial Table 4 2 4 7 11 External GPIO MYD SAM9X5 V2 extends eight GPIO by J17 Directory is sys class GPIO Here take GPIO5 for an example 1 Export GPIO5 root at91sam9x5ek cd sys class gpio root at91sam9x5ek sys class gpio echo 205 gt export External GPIO Base is 200 GPIO export number is 200 plus GPIO number so exported GPIO5 is 205 After performed above command there will generate spi gpio205 in current directory 2 Set GPIO to input output Set GPIO to output root at91sam9x5ek sys class gpio cd spi gpio205 root at91sam9x5ek sys class gpio spi gpio205 echo out gt direction root at91sam9x5ek sys class gpio spi gpio205 echo 1 gt value root at91sam9x5ek sys class gpio spi gpio205 cat value 4 root at91sam9x5ek sys class gpio spi g
138. ull out SD card directly system will uninstall it automatically 4 7 4 Play MP3 Music Before playing music connect headphones or stereo to J7 Storage an mp3 music in a U disk and insert it into a USB port Play music in U disk by mplayer command in terminal root at91sam9x5ek media sda4 mplayer thelastone mp3 At this point you can hear music from headphones Terminal displays information as 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 libmad lib MAD MPEG layer 1 2 3 AO alsa 48000Hz 2ch s16le 2 bytes per sample Video no video Starting playback 101 MYIR TECH LIMITED www myirtech com 7 MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual A 1 5 01 4 of 239 0 03 59 0 19 7 4 7 5 Network Port Test Note MYD SARM9G15 dones t support network MYD SAM9G25 G35 X35 supports one network port connected J11 to use MYD SAM9X25 supports two Ethernet ports conn
139. www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Purpose This example describes how to control clock chip by IIC Functional Description The example controls reading and writing time of DS3231 by IIC Procedures Download program into board press NRSRT to observe relevant terminal information Press some button to input gt Phenomenon Indicates Terminal information TWI DS3231 Example 2 0 SAM9XX5 EK Compiled Aug 9 2013 18 02 47 Configure buttons with debouncing Press K4 to read date Set date is 8 8 13 4 23 59 30 Now date s 8 9 13 5 0 0 4 Now date is 8 9 13 5 0 0 7 Now date s 8 9 13 5 0 0 11 81 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Chapter 4 Linux System Guide 4 1 Outline This Chapter describes how to run Linux system and embedded Linux applications and the process of drive development in MYD SAM9X5 V2 development board It includes building the development environment compiling the source code image downloading Linux applications amp drivers anglicizing and Qt transplanting The default startup is from the NandFlash and the initial system at factory is Linux system The storage structure of NandFlash and some analysis are as follows Root FS UBIFS 0x800000 ALTEA Linux Kernel a U Boot Env U Boot 0x40000 OxO NAND FLASH Figure 4 1 1 Boot Strap After power on the first clas
140. y 00 58 o Bai NSE AR T XE BAR HB FE 2 AWA E COKE hao123 BS Figure 5 29 143 MYIR TECH LIMITED www myirtech com M Y R Make Your Idea Real MYD SAM9X5 V2 User Manual Appendix 1 FAQ Q1 Report Connection USBserial COMxx not found XX port number and according to the situation such as the host machine is COM13 then XX is 13 pop up logfile file contents As shown below Analysis and Answers This problem happens because samba connection cannot be found 1 USBserial COMxx DIP switch SW1_1 and SW1_2 off in the control panel disconnect JP8 jumper CANO_RX_EN press NRST reset board turn SW1_2 on and then start download Display logfile file as follows It indicates that port isn t right as above I argv 0 USBserial 1 COM3 but connections list is E Connection list USB serial COM13 COM1 which shows native port is COM13 not COM3 and it needs to modify COM port Q2 Prompt Can t detect known device 144 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual Analysis and Answers This phenomenon isn t turn on the corresponding switch when enable Serialdataflash or Nandflash Enable Serial dataflash without turning SW1_2on enable Nandflash without turning SW1_1 on whether manual download or automatic download it will have a prompt Automatic download is recorded in logfile Q3 Download system succe
141. yirtech com MYiR Make Your Idea Real ledtest_app c 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 114 MYD SAM9X5 V2 User Manual 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 nin 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 led r n led_statusWt 1 for ON 0 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 fd open LED_DEV 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 MYIR TECH LIMITED www myirtech com MYiR Make Your Idea Real MYD SAM9X5 V2 User Manual 4 9 2 Compile There is only one source file in this example for compiling It is recommended to use makefile to manage a project with more than one source file Add the path of cross compiler tools to PATH export PATH

Download Pdf Manuals

image

Related Search

Related Contents

  User`s Manual  Zanussi DCS 14 S Instruction Booklet    Áreas de la Empresa - Provias Descentralizado  140cc OHV Vertical Gas Engine  仕様書【物品の購入】  Mode d`emploi 662 161  5.9 Order processing module  

Copyright © All rights reserved.
Failed to retrieve file