Solutions

MYD-LR3568-GK-B IPC Box (RK3568) (1)

FZ5 EdgeBoard AI Box (Xilinx ZU5EV) (1)

Single Board Computers

MYS-6ULX (NXP i.MX 6UL/6ULL) (1)

MYS-8MMX-V2 (i.MX 8M Mini) (1)

Rico Board (TI AM437x) (1)

FZ5 Card (Xilinx ZU5EV) (1)

FZ3 Card (Xilinx ZU3EG) (1)

Z-turn Board (Xilinx Zynq-7010/20) (1)

Z-turn Board V2 (Zynq-7010/20) (1)

Z-turn Lite (Xilinx Zynq-7010) (1)

Remi Pi (Renesas RZ/G2L) (1)

MYD-LT527-SX (Allwinner T527) (1)

System-On-Modules (SOMs)

MYC-LR3568 (Rockchip RK3568) (1)

MYC-LR3576 (Rockchip RK3576) (1)

MYC-YT113i (Allwinner T113-i) (1)

MYC-YT507H (Allwinner T507-H) (1)

MYC-LT527 (Allwinner T527) (1)

MYC-YT113X (Allwinner T113-S3) (1)

MYC-YG2UL (RENESAS RZ/G2UL) (1)

MYC-YG2LX (RENESAS RZ/G2L) (1)

MYC-C7Z015 (Xilinx Zynq-7015) (1)

MYC-Y7Z010/20-V2 (Zynq-7010/20) (1)

MYC-C7Z010/20-V2 (Z-7010/20) (1)

MYC-J7A100T (XC7A100T Artix-7) (1)

MYC-CZU3EG/4EV/5EV-V2 (Xilinx) (1)

MYC-YF13X (ST STM32MP135) (1)

MYC-YA15XC-T (ST STM32MP151) (1)

MYC-YA157C-V3 (ST STM32MP157) (1)

MYC-LD25X (ST STM32MP257) (1)

MYC-Y6ULX-V2 (i.MX 6UL/6ULL) (1)

MYC-C8MMX-V2 (i.MX 8M Mini) (1)

MYC-JX8MX (NXP i.MX8M) (1)

MYC-JX8MMA7 (8M Mini+Artix-7) (1)

MYC-J1028X (NXP LS1028A) (1)

MYC-JX8MPQ (NXP i.MX 8M Plus) (1)

MYC-LMX9X (NXP i.MX93) (1)

MYC-YM62X (TI AM62x) (1)

MYC-C437X-V2 (TI AM437x) (1)

MYC-IMX28X (NXP i.MX28) (1)

MYC-J335X-V2 (TI AM335x) (1)

MYC-Y335X-V2 (TI AM335x) (1)

MYC-C335X-V4 (TI AM335x) (1)

MYC-C335X-GW (TI AM335x) (1)

MYC-JD9360 (SemiDrive D9-Pro) (1)

MYC-SAMA5D3X (Atmel A5D3) (1)

MYC-LMA35 (Nuvoton MA35D1) (1)

MYC-SAM9X5 (Atmel SAM9X5) (1)

Development Boards

MYD-LR3568 (Rockchip RK3568) (1)

MYD-LR3576 (Rockchip RK3576) (1)

MYD-YT113i (Allwinner T113-i) (1)

MYD-YT113X (Allwinner T113-S3) (1)

MYD-YT507H (Allwinner T507-H) (1)

MYD-LT527 (Allwinner T527) (1)

MYD-YG2UL (Renesas RZ/G2UL) (1)

MYD-YG2LX (Renesas RZ/G2L) (1)

MYD-C7Z015 (Xilinx Zynq-7015) (1)

MYD-Y7Z010/20 (Zynq-7010/20) (1)

MYD-Y7Z010/20-V2 (Zynq-7010/20) (1)

MYD-C7Z010/20-V2 (Z-7010/20) (1)

MYD-CZU3EG/4EV/5EV-V2 (Xilinx) (1)

MYD-J7A100T (XC7A100T Artix-7) (1)

MYD-YA15XC-T (ST STM32MP151) (1)

MYD-YF13X (ST STM32MP135) (1)

MYD-YA157C-V3 (ST STM32MP157) (1)

MYD-LD25X (ST STM32MP257) (1)

MYD-Y6ULX-V2 (i.MX 6UL/6ULL) (1)

MYD-JX8MPQ (NXP i.MX 8M Plus) (1)

MYD-JX8MX (NXP i.MX8M) (1)

MYD-C8MMX-V2 (i.MX 8M Mini) (1)

MYD-JX8MMA7 (8M Mini+Artix-7) (1)

MYD-YM62X (TI AM62x) (1)

MYD-LMX9X (NXP i.MX93) (1)

MYD-J1028X (NXP LS1028A) (1)

MYD-C437X-V2 (TI AM4378) (1)

MYD-C437X-V2-PRU (TI AM437x) (1)

MYD-C335X-V4 (TI AM335x) (1)

MYD-J335X-V2 (TI AM335x) (1)

MYD-Y335X-V2 (TI AM335x) (1)

MYD-C335X-GW (TI AM335x) (1)

MYD-JD9360 (SemiDrive D9-Pro) (1)

MYD-LMA35 (Nuvoton MA35D1) (1)

Add-on Options

Z-turn IO Cape (for Z-turn Board) (1)

Z-turn Lite IO Cape (for Z-turn Lite) (1)

MYB-6ULX (for MYS-6ULX) (1)

MY-LCD43TP LCD Module (1)

MY-LCD70TP LCD Module (1)

MY-LCD70TP-C LCD Module (1)

MY-LVDS070C LCD Module (1)

MY-WF003U USB WiFi Module (1)

MY-WF005S WiFi/BT Module (1)

MY-CAM002U Camera Module (1)

MY-CAM011B BUS Camera Module (1)

MY-CAM003M Camera Module (1)

MY-CAM004M Camera Module (1)

MY-CAM005M Camera Module (1)

MY-WIREDCOM RPI Module (1)

MY-SODIMM200 Socket (1)

Discontinued Products

MYC-C7Z010/20 (Zynq-7010/20) (1)

MYC-Y7Z010/20 (Zynq-7010/20) (1)

MCC-SAMA5D3X-C (Atmel A5D3) (1)

MYC-JA5D2X (Atmel A5D2) (1)

MYC-CZU3EG/4EV/5EV (Xilinx) (1)

MYC-JA5D4X (Atmel A5D4) (1)

MYC-SAM9X5-V2 (Atmel SAM9X5) (1)

MYC-Exynos4412 (Samsung) (1)

MYC-S5PV210 (Samsung S5PV210) (1)

MYD-CZU3EG/4EV/5EV (Xilinx) (1)

VECP Starter Kit (Xilinx ZU3EG) (1)

MYD-Y6ULX-CHMI (i.MX 6UL/6ULL) (1)

MYD-Y6ULX-HMI (i.MX 6UL/6ULL) (1)

MYD-IMX28X (NXP i.MX28) (1)

MYD-LPC185X (NXP LPC185x) (1)

MYD-LPC435X (NXP LPC435x) (1)

MYD-LPC1788 (NXP LPC1788) (1)

MYD-SAM9X5-V2 (Atmel SAM9X5) (1)

MYD-SAM9X5 (Atmel SAM9X5) (1)

MYD-JA5D2X (Atmel A5D2) (1)

MYD-SAMA5D3X-C (Atmel A5D3) (1)

MYD-SAMA5D3X (Atmel A5D3) (1)

MYD-JA5D4X (Atmel A5D4) (1)

MYS-8MMX (NXP i.MX 8M Mini) (1)

MYS-S5PV210 (Samsung S5PV210) (1)

MYS-SAM9G45 (Atmel SAM9G45) (1)

MYS-SAM9X5 (Atmel SAM9X5) (1)

MY-WF004S SDIO WiFi Module (1)

MY-UART012U Convertor (1)

MYD-Y7Z010/20 IO Cape (1)

MYB-Y6ULX-HMI-4GEXP (1)

MY-EVC5100S-HMI (TI AM335x) (1)

          Products >  Development Boards >  MYD-C335X-V4 (TI AM335x) > MYD-C335X-V4 Development Board
 
MYD-C335X-V4 Development Board

MYD-C335X-V4 Development Board

- MYC-C335X-V4 as Controller Board
- Up to 1GHz TI AM335X Series ARM Cortex-A8 Processors
- 512MB DDR3 SDRAM (256MB compatible)
- 512MB Nand Flash (256MB compatible)
- Serial ports, 4 x USB Host, OTG, 2 x Gigabit Ethernet, CAN, RS485, TF, Audio
- Supports HDMI and LCD Display
- Optional 4.3- or 7- inch LCD Module
- Supports for Linux 4.1.18
 

MYIR is a thrid party Partner of TI, welcome to use MYIR's TI series products!
We also offer ODM & OEM services, welcome your inquiry!
https://www.myirtech.com/tiseries.asp


The MYD-C335X-V4 Development Board designed by MYIR is a high-performance ARM Evaluation Module (EVM) using the MYC-C335X-V4 as the core controller board. It is based on up to 1GHz
Texas Instruments (TI) Sitara AM335x family of ARM Cortex-A8 Microprocessors (MPUs) that deliver high DMIPs at a low cost while also delivering optional 3D graphics acceleration and key peripherals. These TI Cortex-A8 MPUs include industrial interface options, such as EtherCAT and PROFIBUS, and can support the Linux, Android and Windows CE high-level operating systems. The combination of graphics and connectivity support makes TI AM335x MPUs ideal for home automation, industrial automation, enterprise/educational tablets, portable navigation devices and networking. The board can work in harsh environment supporting -40 to +85 Celsius extended temperature operation for industrial embedded applications.


MYD-C335X-V4 Development Board


The TI AM335x consists of 6 pin-pin compatible devices (AM3352, AM3354, AM3356, AM3357, AM3358 and AM3359) with various options including speed grades, packages, graphics and peripherals. MYIR is using the 15x15 mm, 0.8-mm ball pitch, ZCZ package AM335x ARM CPU on the MYC-C335X-V4 which is an SOM (System on Module) and has the core components AM335x processor, 512MB DDR3 SDRAM, 512MB Nand Flash and Gigabit Ethernet PHY chip on board and can be served as the core of your embedded system. It has two 2.0mm pitch 60-pin male expansion connectors, one 2.0mm pitch 26-pin interface and one 2.0mm pitch 10-pin interface to allow extension of all the controller signals and ports to the base board through headers and connectors, thus exposing more features of the AM335x Cortex-A8 Processors.


MYC-AM335X CPU Module


The MYD-C335X-V4 base board has extended many features and peripherals with the support of the MYC-C335X-V4 SOM and some extended controller chips including two serial ports, four USB Host ports, one USB OTG port, dual Gigabit Ethernet ports, one CAN, one RS485, one Micro SD, HDMI, LCD, Touch screen and more others.


User can integrate a different MYC-C335X-V4 SOM on the same base board, thus making six variants of AM335x evaluation boards.



The MYD-C335X-V4 series ARM Cortex-A8 boards have many features in common only with some differences depending on the AM335x Cortex-A8 CPU features. You can get to know the differences from above image.


The MYD-C335X-V4 board comes with Linux 4.1.18 software packages, detailed documents, necessary cable accessories as well as optional 4.3- and 7-inch LCD (with touch screen) to provide an AM335x starter kit and enable a quickly start of evaluation of AM335x Cortex-A8 MPUs.


Features

Mechanical Parameters

  • Dimensions: 130mm x 100mm (base board), 70mm x 50mm (SOM)
  • PCB Layers: 4-layer design (base board), 8-layer design (SOM)
  • Power supply: +5V/2A (base board), +3.3V/0.8A (SOM)
  • Working temperature: 0~70 Celsius (commercial grade) or -40~85 Celsius (industrial grade)

The MYD-C335X-V4 Controller Board (MYC-C335X-V4)

Processor

  • TI AM3352, AM3354, AM3356, AM3357, AM3358, AM3359 (15x15 mm, 0.8-mm ball pitch, ZCZ package)
    - 800MHz ARM Cortex-A8 32-bit RISC MPU (Up to 1GHz)
    - NEON™ SIMD Coprocessor
    - 32KB/32KB of L1 Instruction/Data Cache with Single-Error Detection (parity)
    - 256KB of L2 Cache with Error Correcting Code (ECC)
    - SGX530 Graphics Engine
    - Programmable Real-Time Unit Subsystem

Memory

  • 512MB (2*256MB) DDR3 SDRAM (2*128MB compatible)
  • 512MB Nand Flash (256MB compatible)

Peripherals and Signals Routed to Pins

  • On-board Gigabit Ethernet PHY
  • One power indicator (Red LED)
  • One user LED (Green)
  • Two 2.0mm pitch 60-pin expansion connectors can carry out interfaces below
    - 2 x USB2.0 OTG ports
    - 6 x Serial ports
    - 2 x I2C
    - 1 x SPI
    - 7 x ADC
    - 2 x PWM
    - 3 x SDIO
  • One 2.0mm pitch 26-pin expansion connector
  • One 2.0mm pitch 10-pin expansion connector

The MYD-C335X-V4 Base Board

  • Serial ports
    - 1 x 3-wire RS232 Debug serial port (DB9)
    - 1 x 3-wire RS232 serial port (UART1)
    - 1 x RS485 (with isolation)
  • USB
    - 4 x USB2.0 Host ports
    - 1 x USB2.0 OTG ports
  • 2 x 10/100/1000Mbps Ethernet interfaces
  • 1 x CAN interface (with isolation)
  • 1 x TF card slot
  • 1 x HDMI interface
  • 1 x LCD interface (16-bit true color, supports optional 4.3-inch and 7-inch TFT LCD with 4.3-inch resistive or 7-inch resistive or 7-inch capacitive touch screen)
  • 1 x 4-wire resistive touch screen interface
  • 1 x Audio input port (3.5mm jack)
  • 1 x Stereo Audio output port (3.5mm jack)
  • 4 x Buttons (1 x Reset button, 3 x User buttons)
  • 1 x Power indicator (Red LED)
  • 2 x 2.0mm 20-pin expansion connectors
    - 7 x ADC
    - 1 x SPI
    - 2 x I2C
    - 4 x UART

OS Support

  • Linux 4.1.18


MYD-C335X-V4 in the Video

http://youtu.be/FWbSG2Q-8NM


Other MYIR's TI Products

http://www.myirtech.com/tiseries.asp

Rico Board Single Board Computer (based on AM437x)

MYD-C335X-GW Development Board (MYC-C335X-GW CPU Module as core board, TI AM335x)

MYD-J335X-V2 Development Board (MYC-J335X-V2 as core board, TI AM335x)

MYD-Y335X-V2 Development Board (MYC-Y335X-V2 as core board, TI AM335x)

MYD-YM62X Development Board (MYC-YM62X CPU Module as core board, TI AM6254/6252/6231)





Hardware Specification

The MYD-C335X-V4 series ARM Cortex-A8 boards have many features in common only with some differences depending on the AM335x Cotex-A8 CPU features. You can get to know the differences and more features of the AM335x series processors from below table.

The
TI AM335x microprocessors, based on the ARM Cortex-A8, operating at up to 1GHz, are enhanced with image, graphics processing, peripherals and industrial interface options such as EtherCAT and PROFIBUS. The device supports the following high-level operating systems (HLOSs) that are available free of charge from TI:

  • Linux®
  • Android™

The AM335x microprocessor contains these subsystems:

  • Microprocessor unit (MPU) subsystem based on the ARM Cortex-A8 microprocessor.
  • POWERVR SGX™ Graphics Accelerator subsystem for 3D graphics acceleration to support display and gaming effects.
  • The Programmable Real-Time Unit and Industrial Communication Subsystem (PRU-ICSS) is separate from the ARM core, allowing independent operation and clocking for greater efficiency and flexibility.
  • The PRU-ICSS enables additional peripheral interfaces and real-time protocols such as EtherCAT, PROFINET, EtherNet/IP, PROFIBUS, Ethernet Powerlink, Sercos, and others.

AM335x ARM Cortex™-A8 Processors

Core Feature

AM3352

AM3354

AM3356

AM3357

AM3358

AM3359

Package

15x15mm, 0.8mm (ZCZ)

CPU Speed (MHz)

300, 600, 800, 1000

600, 800,1000

300, 600,800

300, 600,800

600, 800,1000

800

Core Internal Memory

64KB SRAM shared w/
Data 32KB Cache, Programmable 32KB Cache

On-chip L2 (KB)

256

External Memory Interface

DDR2/DDR3/DDR3L/mDDR (LPDDR), 2x16-bit, NAND ECC

Graphics

-

3D Graphics

-

3D Graphics

OS Support

Linux, Android, RTOS, Windows Embedded, no-OS

Other Hardware Acceleration

Crypto Accelerator

Crypto
Accelerator

2 PRU-ICSS
Crypto Accelerator

2 PRU-ICSS
Crypto Accelerator   + EtherCAT slave support

2 PRU-ICSS
Crypto Accelerator

2 PRU-ICSS
Crypto Accelerator
+ EtherCAT slave support

10/100/1000 EMAC

2 port switch

USB 2.0 OTG + PHY

2

Serial Ports

6 UART, 2 SPI, 3 I2C, 2 McASP, 2 CAN, 8 Timers

System

EDMA, WDT, RTC, 3 eQEP, 3 eCAP, JTAG, ADC (8ch)

Parallel

3 MMC/SD/SDIO, GPIO


Function Block Diagram of MYD-C335X-V4



Dimension Chart of MYD-C335X-V4


Software Features

MYIR’s AM335x Starter Kit MYD-C335X-V4 supports for Linux and is provided with software packages. Many peripheral drivers are in source code to help accelerate customers’ designs with a stable and reliable hardware and software platform. The software features are summarized as below:


OS

Item

Features

Description

Linux

Bootstrap program

SPL

The primary bootstrap

u-boot

The secondary bootstrap

Kernel

Version

Linux 4.1.18

Drivers

USB OTG, USB WiFi, Gigabit Ethernet, MMC/SD/TF, NandFlash, CAN, RS485, Audio, LCD Controller (supports 4.3- and 7-inch LCD), RTC, HDMI, Touch driver, Button, UART, LED

File system

Buildroot

With QT library (V5.6.2)

Provide image file and buildroot in source code

Examples

Audio, CAN, EEPROM, framebuffer, gpio, keypad, led, mtd, network, rtc, RS232, RS485




Relative Download and Links

You can download relative chip datasheet, products datasheet, user manual, software package from below. Any inquiry, please contact MYIR.


1 TI AM335x Datasheet 2.80 MB
2 TI AM335x Technical Reference Manual 19.7 MB
3 MYD-C335X-V4 Development Board Overview 1.12 MB
4 MYC-C335X-V4 Overview 1.03 MB
5 MYC-C335X-V4 Dimensions 844 KB
6 MYD-C335X-V4 Development Board Dimensions 138 KB



MYD-C335X-V4 Development Board



MYC-C335X-V4 Top-view



MYC-C335X-V4 Bottom-view



MYD-C335X-V4 Development Board Base Board


Price and Ordering

Item

Part No.

Unit Price

Ordering

MYD-C335X-V4 Development Board
(commercial, 512MB DDR3, 512MB Flash)

MYD-C3352-V4-512N512D-80-C

USD105

MYD-C3358-V4-512N512D-100-C
USD109

MYD-C335X-V4 Development Board

(industrial, 512MB DDR3, 512MB Flash)

MYD-C3352-V4-512N512D-80-I USD129

MYD-C3358-V4-512N512D-100-I
USD135

MYD-C335X-V4 Development Board

(industrial, 256MB DDR3, 256MB Flash)

MYD-C3352-V4-256N256D-80-I USD115

MYD-C3358-V4-256N256D-100-I
USD119

MYC-C335X-V4

(commercial, 512MB DDR3, 512MB Flash)

MYC-C3352-V4-512N512D-80-C USD49

MYC-C3358-V4-512N512D-100-C
USD55

MYC-C335X-V4

(industrial, 512MB DDR3, 512MB Flash)

MYC-C3352-V4-512N512D-80-I USD65

MYC-C3358-V4-512N512D-100-I
USD70

MYC-C335X-V4

(industrial, 256MB DDR3, 256MB Flash)

MYC-C3352-V4-256N256D-80-I USD49

MYC-C3358-V4-256N256D-100-I
USD55

MY-LCD43TP 4.3 inch LCD Module

with resistive touch screen

MY-TFT043RV2

USD59

MY-LCD70TP 7 inch LCD Module

with resistive touch screen

MY-TFT070RV2

USD79

MY-LCD70TP-C 7 inch LCD Module

with capacitive touch screen

MY-TFT070CV2
USD89

MY-CAM002U USB Camera Module
MY-CAM002U
USD19

MY-WF003U USB WiFi Module
MY-WF003U
USD13

Note:

1. One MYD-C335X-V4 Development Board includes one MYC-C335X-V4 SOM mounted on the base board by default. If you need more SOMs, please order extra ones.


2 . We deliver the board with 800MHz AM3352 or 1GHz AM3358 by default. If you need other CPU model, RAM or Flash configuration, please contact MYIR for availability.


3. Bulk discounts are available. Please contact MYIR for inquires.


4. The boards of commercial grade  can work in temperature ranging from 0~70 Celsius. The boards of industrial grade can work in temperature ranging from -40~85 Celsius. The HDMI chip on board can only work in temperature ranging from -20~70 Celsius.


5. We accept custom design based on the MYD-C335X-V4, whether reducing, adding or modifying the existing hardware according to customer’s requirement.




Packing List

NO. Item Qty Description
1 MYD-C335X-V4 board 1pc MYD-C3352-V4/MYD-C3358-V4
2 Power adapter 1pc 5V/2A Power adapter
3 Ethernet cable 1pc
4 USB Cable 1pc
5 MY-LCD43TP (optional) 1pc 4.3 inch LCD with resistive touch screen
6 MY-LCD70TP (optional) 1pc 7 inch LCD with resistive touch screen
7 MY-LCD70TP-C (optional) 1pc 7 inch LCD with capacitive touch screen


More FAQ >>


1. How to download kernel and file system through tftp in u-boot?

Question:
How to download kernel and file system through tftp in u-boot?

Answer:

1. Install TFTP on Ubuntu. 

2. Please copy the kernel and file system to tftp directory under Ubuntu system, for example, copy uImage and ubi.img to the /tftpboot directory under Ubuntu system. 

3. 1) Press “Enter” to get into u-boot command mode when the board start countdown; 

2) Configure u-boot environment; 

1 set ipaddr 192.168.1.250 

2 set ethaddr 88:33:14:f6:c0:d4 

3 set serverip 192.168.1.220 

4 saveenv 

5 reset 

The above commands are used for setting IP address of the board, MAC address of the Ethernet, IP address of the Ubuntu Host server, saving variables and restart. Then use ping command to ensure the board pings through with the Host. 

1 ping 192.168.1.220 

2 Auto negotitation failed 

3 link up on port 0, speed 100, full duplex 

4 Using cpsw device 

5 host 192.168.1.220 is alive 


For above, if prompts “host xxx is alive”, it means the board has pinged through with the Host successfully. If failed, it will prompts as below: 

1 MYD_AM335X# ping 192.168.1.220 

2 Auto negotitation failed 

3 Auto negotitation failed 

4 Using cpsw device 

5 ping failed; host 192.168.1.220 is not alive


3) Acquire Address Assignment Use printenv to check u-boot environment variables 

1 printenv 

There will be some output as below: 

"updatesys=nand erase.chip;mmc rescan; fatload mmc 0 82000000 MLO;nandecc hw 2;nand write.i 82000000 0 ${filesize}; fatload mmc 0 82000000 u-boot.img;nandecc hw 2;nand write.i 82000000 80000 ${filesize}; fatload mmc 0 82000000 uImage;nandecc hw 2;nand write.i 82000000 280000 ${filesize}; fatload mmc 0 82000000 ubi.img;nandecc sw;nand write.i 82000000 780000 ${filesize};led flash all"


all The purple part indicates programming MLO; the red part indicates programming u-boot; the green part indicates programming uImage; the blue part indicates programming filesystem, the nandecc hw 2 and the nandecc sw need ECC hardware checking and software checking. 


The address assignment is as below: 

First boot address: 0x0 

RAM memory address: 0x82000000 

u-boot address: 0x80000 

kernel address: 0x280000 ubi.img 

filesystem address: 0x780000 


4) Download kernel Download kernel from PC to the board RAM 0x82000000, the length will be reminded after succeed such as Bytes transferred = 3605768 (370508 hex) 

1 2 tftp 0x82000000 uImage nandecc hw 

2 #AM335X kernel needs ecc checking or it will have error: ECC: uncorrectable. 


If executing above command, it displays “#”, it means transmitting file; if prompts “TTT…”, it means transmitting overtime, you may need to check if the board has pinged through Host successfully. Erase the content of 0x370508 byte from 0x280000 address: 

1 nand erase 0x280000 0x370508 


Write the content of RAM 0x82000000 to Flash address 0x280000, length is 0x3605768: 

1 nand write.i 0x82000000 0x280000 0x370508 


 For above 

  • nand write.jffs2 program JFFS2 file system, jump over the bad block 
  • nand write.i equal to nand write.jffs2 
  • nand write.yaffs program yaffs2 file system, need page aligned 
Download file sytem 


Download file system from PC to the board RAM 0x82000000, the length will be prompted after downloading successfully, using hexadecimal, command is as below: 

1 tftp 0x82000000 ubi.img 

2 nandecc sw        #AM335X kernel needs ecc software checking 


Note: due to the large size of filesystem, please do not interrupt during the filesystem transmitting to avoid failure. 


Erase the content of 0x3da000 byte from 0x780000 

1 nand erase 0x780000 0x3da0000 


Write the content of RAM 0x82000000 to the FLASH 0x780000 with length 0x3da0000: 

1 nand write.i 0x82000000 0x780000 0x3da0000


2. ARM Linux GPIO sample code

Question:
Please download the sample code package from below link: http://www.myirtech.com/download/code/gpio.tar.gz (include source code, Makefile and image which is compiled using arm-none-linux-gnueabi-gcc)

Answer:

Source code


001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
/********************************************************************
*                 copyright (C) 2014 all rights reserved
*                         @file: gpio.c
*                   @Created: 2014-8-6 15:00
*                      @Author: conway chen
*           @Description: test gpios interrupt
*          @Modify Date: 2014-8-6 15:00
*********************************************************************/
#include<stdio.h>
#include <stdlib.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<unistd.h>
#include<errno.h>
#include<string.h>
#include <poll.h>
 
#define SYSFS_GPIO_DIR "/sys/class/gpio"
#define GPIO_LED 41
#define MAX_BUF 60
#define POLL_TIMEOUT (3 * 1000) /* 3 seconds */
#define OUT 1
#define IN 0
 
/**
 * brief: export the GPIO to user space
 * @Param: gpio: the GPIO number
 */
int gpio_export(unsigned int gpio)
{
        int fd ,len;
        char buf[MAX_BUF];
 
        fd = open(SYSFS_GPIO_DIR "/export" ,O_WRONLY);
        if (fd < 0) {
                perror("gpio/export");
                return fd;
        }
        len = snprintf(buf ,sizeof(buf) ,"%d" ,gpio);
        write(fd ,buf ,len);
        close(fd);
        return 0;
}
 
/**
 * brief: unexport the GPIO to user space
 * @Param: gpio: the GPIO number
 */ 
int gpio_unexport(unsigned int gpio)
{
        int fd ,len;
        char buf[MAX_BUF];
 
        fd = open(SYSFS_GPIO_DIR "/unexport" ,O_WRONLY);
        if (fd < 0) {
                perror("gpio/unexport");
                return fd;
        }
        len = snprintf(buf ,sizeof(buf) ,"%d" ,gpio);
        write(fd ,buf ,len);
        close(fd);
        return 0;
}
 
/**
 * brief: configure GPIO for input or output
 * @Param: gpio: the GPIO number
 * @Param: out_flag: the flag of output or input.It's value can be 1 or 0. 
 */
int gpio_set_dir(unsigned int gpio ,int out_flag)
{
        int fd ,len;
        char buf[MAX_BUF];
 
        len = snprintf(buf, sizeof(buf), SYSFS_GPIO_DIR "/gpio%d/direction", gpio);
        fd = open(buf ,O_WRONLY);
        if (fd < 0) {
                perror(buf);
                return fd;
        }
        if (out_flag)
                write(fd ,"out" ,4);
        else
                write(fd ,"in" ,3);
        close(fd);
        return 0;
}
 
/**
 * brief: Set the value of GPIO
 * @Param: gpio: the GPIO number
 * @Param: value: the value of GPIO. Supports values of 0 and 1.
 */ 
int gpio_set_value(unsigned int gpio, unsigned int value) 
    int fd, len; 
    char buf[MAX_BUF]; 
    
    len = snprintf(buf, sizeof(buf), SYSFS_GPIO_DIR "/gpio%d/value", gpio);     
    fd = open(buf, O_WRONLY);
        if (fd < 0) { 
        perror("gpio/set-value"); 
        return fd; 
    
    
    if (value) 
        write(fd, "1", 2); 
    else 
        write(fd, "0", 2); 
    
    close(fd); 
    return 0; 
}
 
/**
 * brief: get the value of GPIO
 * @Param: gpio: the GPIO number
 * @Param: value: pointer to the value of GPIO
 */
int gpio_get_value(unsigned int gpio, unsigned int *value)
{
        int fd, len;
        char ch;
        char buf[MAX_BUF];
 
        len = snprintf(buf ,sizeof(buf), SYSFS_GPIO_DIR "/gpio%d/value" ,gpio);
        fd = open(buf ,O_RDONLY);
        if (fd < 0) {
                perror("gpio_get_value");
                return fd;
        }
        read(fd ,&ch ,1);
        if (ch == '1')
                *value = 1;
        else if(ch == '0')
                        *value = 0;
        close(fd);
        return 0;
}
 
/**
 * brief: set the edge that trigger interrupt
 * @Param: gpio: the GPIO number
 * @Param: edge:  edge that trigger interrupt
 */
int gpio_set_edge(unsigned int gpio ,char *edge)
{
        int fd ,len;
        char buf[MAX_BUF];
 
        len = snprintf(buf ,sizeof(buf) ,SYSFS_GPIO_DIR "/gpio%d/edge" ,gpio);
        fd = open(buf ,O_WRONLY);
        if (fd < 0) {
                perror("gpio_set_edge");
                return fd;
        }
        write(fd ,edge ,strlen(edge) + 1);
        close(fd);
        return 0;
}
 
/**
 * brief: open gpio device and return the file descriptor
 * @Param: gpio: the GPIO number
 */ 
int gpio_fd_open(unsigned int gpio) 
    int fd, len; 
    char buf[MAX_BUF]; 
   
    len = snprintf(buf, sizeof(buf), SYSFS_GPIO_DIR "/gpio%d/value", gpio); 
    
    fd = open(buf, O_RDONLY | O_NONBLOCK ); 
    if (fd < 0) { 
        perror("gpio/fd_open"); 
    
    return fd; 
   
/**
 * brief: close gpio device
 * @Param: fd: the file descriptor of gpio
 */
int gpio_fd_close(int fd) 
    return close(fd); 
   
/**
 * @brief: main function
 * @Param: argc: number of parameters
 * @Param: argv: parameters list
 */ 
int main(int argc, char **argv) 
    struct pollfd *fdset; 
    int nfds = 1; 
    int gpio_fd, timeout, rc; 
    char *buf[MAX_BUF]; 
    unsigned int gpio; 
    int len;
    char *cmd;
    unsigned