AT91Bootstrap. Introduction Device initialization such as clock speed configuration, PIO settings, etc. Peripheral drivers such as PIO, PMC, SDRAMC, etc.

Slides:



Advertisements
Similar presentations
Device Drivers. Linux Device Drivers Linux supports three types of hardware device: character, block and network –character devices: R/W without buffering.
Advertisements

purpose Search : automation methods for device driver development in IP-based embedded systems in order to achieve high reliability, productivity, reusability.
ARM development environment Modified Content Philips LPC2106 ARM chip ARM target board PSPad customised development environment Troubleshooting.
Linux+ Guide to Linux Certification, Second Edition
Basic linux shell commands and Makefiles. Log on to engsoft.rutgers.edu Open SSH Secure Shell – Quick Connect Hostname: engsoft.rutgers.edu Username/password:
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
Getting the O in I/O to work on a typical microcontroller Activating a FLASH memory “output line” Part 1 Main part of Laboratory 1 Also needed for “voice.
Using PDG with e2studio: Example
ECE Department: University of Massachusetts, Amherst Lab 1: Introduction to NIOS II Hardware Development.
- AT91SAM Training SAM9 Boot Strategies Frederic BOYER AT91 Support Group. Version 1.0 October 2006 AT91 Support Group. Version June 2007.
File System. NET+OS 6 File System Architecture Design Goals File System Layer Design Storage Services Layer Design RAM Services Layer Design Flash Services.
NET+OS Bootloader Overview Requirements How to Build How to Customize Changes to Applications Configuration Settings.
Serial Communication ETEC 6416.
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
AT91SAM9261-EK WinCE 6.0 DEMO ATMEL AT91 Application & Support Group
CS 192 Lecture 3 Winter 2003 December 5, 2003 Dr. Shafay Shamail.
COE4OI5 Engineering Design Chapter 2: UP2/UP3 board.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
UART and UART Driver B. Ramamurthy.
Lab 11 Department of Computer Science and Information Engineering National Taiwan University Lab11 - Porting 2014/12/9/ 26 1.
AT91SAM9261-EK WinCE 5.0 DEMO ATMEL AT91 Application & Support Group Version 1.O February 2007.
Introduction to Interactive Media Interactive Media Tools: Software.
AT91 Embedded Peripherals
Linux+ Guide to Linux Certification, Second Edition
Page 1 D&C EBV Seminar June 2003 Motor Demo C868 Chevillot/Jansen June 2003 N e v e r s t o p t h i n k i n g. Infineon C868 Hands On Training CAPCOM6.
Adv. UNIX: large/131 Advanced UNIX v Objectives of these slides: –learn how to write/manage large programs consisting of multiple files, which.
1 What is a Kernel The kernel of any operating system is the core of all the system’s software. The only thing more fundamental than the kernel is the.
COMPUTER SYSTEM LABORATORY Lab6 - Root Filesystem.
Engineering 1040: Mechanisms & Electric Circuits Winter 2015 Introduction to C Programming.
Chapters 1-5 Review C++ Class. Chapter 1 – the big picture Objects Class Inheritance Reusability Polymorphism and Overloading.
CS 376b Introduction to Computer Vision 01 / 23 / 2008 Instructor: Michael Eckmann.
Power Profiling using Sim-Panalyzer Andria Dyess and Trey Brakefield CPE631 Spring 2005.
SAM9260-EK WinCE DEMO AT91 SAM9 Product Group. Version 1.0 October 2006.
AT91 Memory Interface. 2 Features –Up to 8 programmable chip select lines –Remap Command allows dynamic exception vectors –Glue-less for both 8-bit and.
SAM9260-EK WinCE DEMO AT91 SAM9 Product Group. Version 1.0 October 2006.
1 Programming of FPGA in LiCAS ADC for Continuous Data Readout Week 5 Report Tuesday 29 th July 2008 Jack Hickish.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
COMP 3438 – Part I - Lecture 5 Character Device Drivers
Program in Multiple Files. l all C++ statements are divided into executable and non-executable l executable - some corresponding machine code is generated.
Lab 8 Department of Computer Science and Information Engineering National Taiwan University Lab8 - Root Filesystem 2015/11/10/ 22 1.
Chapter Linux Basics. Acknowledgements This presentation was prepared by – Banyat Settapanich – Bahran Madaen This presentation will be updated later.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the Project Generator function.
ARM 7 & ARM 9 MICROCONTROLLERS AT91 1 AT91RM9200 Software delivery.
Implementation of Embedded OS
Using Linux with ARM Tutorial #3.
Embedded Software Design Week II Linux Intro Linux Kernel.
80C51 Block Diagram 1. 80C51 Memory Memory The data width is 8 bits Registers are 8 bits Addresses are 8 bits – i.e. addresses for only 256.
1 COMP 3500 Introduction to Operating Systems Project 4 – Processes and System Calls Part 3: Adding System Calls to OS/161 Dr. Xiao Qin Auburn University.
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
1 COMP 3500 Introduction to Operating Systems Project 4 – Processes and System Calls Part 4: Managing File System State Dr. Xiao Qin Auburn University.
Catalog RTOS Apps April 13, 2015
AT91SAM: ARM-based controllers
Serial mode of data transfer
Lab 1: Using NIOS II processor for code execution on FPGA
FUNCTIONS In C++.
Chapter7 Structure & C++
UART and UART Driver B. Ramamurthy.
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
AT91 Memory Interface This training module describes the External Bus Interface (EBI), which generatesthe signals that control the access to the external.
UART and UART Driver B. Ramamurthy.
פרטים נוספים בסילבוס של הקורס
Govt. Polytechnic,Dhangar
8051 Micro Controller.
Implementation of Embedded OS
Computer System Laboratory
More C++ Classes Systems Programming.
Presentation transcript:

AT91Bootstrap

Introduction Device initialization such as clock speed configuration, PIO settings, etc. Peripheral drivers such as PIO, PMC, SDRAMC, etc. Physical media algorithms such as DataFlash®, NANDFlash, Parallel Flash, etc. File System drivers such as JFFS2, FAT, etc. Compression and Cipher algorithms Application Launcher for ELF, Linux®, etc.

Peripheral Drivers PIO PIOA controller handles pin_number from 0 to 31 PIOB controller handles pin_number from 32 to 61 PIOC controller handles pin from 62 to 95 /* Convert Pin Number into PIO controller index */ static inline unsigned pin_to_controller(unsigned pin) { return (pin) / 32; }

pio_desc Structure Table. pio_desc Structure Table. pio_type Enumeration Table. PIO Attributes

pio_desc Structure Example. const struct pio_desc hw_pio[] = { {"RXD", AT91C_PIN_PA(9), 0, PIO_DEFAULT, PIO_PERIPH_A}, {"TXD", AT91C_PIN_PA(10), 0, PIO_DEFAULT, PIO_PERIPH_A}, {"", 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, };

pio_setup() Function Table. pio_setup() Function Example. const struct pio_desc hw_pio[] = { {"PCK0", AT91C_PIN_PA(7), 0, PIO_DEFAULT, PIO_PERIPH_B}, {"PCK1", AT91C_PIN_PA(8), 0, PIO_DEFAULT, PIO_PERIPH_B}, {"", 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, }; /* Configure the PIO controller to output PCK0 */ pio_setup(hw_pio);

pio_get_value() Function pio_set_value() Function Table. pio_get_value() Function Table. pio_set_gpio_value() Function

/* Device specific... */ #define PIO_TEST_OUT AT91C_PIN_PA(7) #define PIO_TEST_IN AT91C_PIN_PA(8) /* Device non specific... */ const struct pio_desc hw_pio[] = { {"TEST_OUT", PIO_TEST_OUT, 0, PIO_DEFAULT, PIO_OUTPUT}, {"TEST_IN", PIO_TEST_IN, 0, PIO_DEGLITCH, PIO_INPUT}, {"", 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, }; /* Configure the PIO controller to output PCK0 */ pio_setup(hw_pio); /* Test the default value */ if (pio_get_value(PIO_TEST_IN) == 1) return 0; /* Return failed */ /* Force a high level on PIO_TEST_OUT pin */ pio_set_value(PIO_TEST_OUT, 1); /* Test the default value */ if (pio_get_value(PIO_TEST_IN) == 0) return 0; /* Return failed */ return 1; /* Success */ Example.

PMC /* Automatically generated using... */ #define PMC_PLLAR 0x /* MOSC = Mhz,MUL =,DIV = */ #define PMC_PLLBR 0x /* MOSC = Mhz, MUL =,DIV = */ #define PMC_MCKR 0x /* MCK = PLLA */ #define PLL_TIMEOUT /* Configure PLLA */ if (!pmc_cfg_plla(PMC_PLLAR, PLL_TIMEOUT)) goto pmc_error; /* Switch MCK on PLLA output PCK = PLLA = 2 * MCK */ if (!pmc_cfg_mck(PMC_MCKR, PLL_TIMEOUT)) goto pmc_error; /* Configure PLLB */ if (!pmc_cfg_pllb(PMC_PLLBR, PLL_TIMEOUT)) goto pmc_error; pmc_error: /* Reset the device*/

pmc_cfg_plla() Function pmc_cfg_pllb() Function Table. pmc_cfg_plla()function Table. pmc_cfg_pllb()function

pmc_cfg_mck() Function pmc_cfg_pck() Function Table. pmc_cfg_mck()function

SDRAMC Prerequisite CFG_SDRAM and CFG_HW_INIT flags must be defined in your board project header file. Example: Define these flags in board/at91sam9260ek/dataflash/at91sam9260ek.h Create a function sdramc_hw_init() in your board source file. Example: Define this function in board/at91sam9260ek/at91sam9260ek.c

sdramc_hw_init() Function #ifdef CFG_SDRAM void sdramc_hw_init(void) { const struct pio_desc sdramc_pio[] = { {"D0", AT91C_PIN_PC(16), 0, PIO_DEFAULT, PIO_PERIPH_A}, {"D1", AT91C_PIN_PC(17), 0, PIO_DEFAULT, PIO_PERIPH_A},. {"D15", AT91C_PIN_PC(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, {"", 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, }; /* Configure the PIO controller to enable 32-bits SDRAM */ pio_setup(sdramc_pio); } #endif Prototype: void sdramc_hw_init(void)

sdramc_init() Function Table. sdramc_init() Function

DBGU Prerequisite CFG_DEBUG and CFG_HW_INIT flags must be defined in your board project header file. Example: Define these flags in board/at91sam9260ek/dataflash/at91sam9261ek.h

dbg_init() Function Table. dbg_init() Function dbg_print() Function Table. dbg_print() Function

DataFlash Prerequisite CFG_DATAFLASH flag must be defined in your board project header file. Example: Define this flag in board/at91sam9260ek/dataflash/at91sam9260ek.h Create a function df_hw_init() in your board source file Example: Define this function in board/at91sam9260ek/at91sam9260ek.c

df_hw_init() Function Prototype: void df_hw_init(void) #ifdef CFG_DATAFLASH void df_hw_init(void) { const struct pio_desc df_pio[] = { {"MISO", AT91C_PIN_PA(0), 0, PIO_DEFAULT, PIO_PERIPH_A}, {"MOSI", AT91C_PIN_PA(1), 0, PIO_DEFAULT, PIO_PERIPH_A}, {"SPCK", AT91C_PIN_PA(2), 0, PIO_DEFAULT, PIO_PERIPH_A}, {"NPCS0", AT91C_PIN_PA(3), 0, PIO_DEFAULT, PIO_PERIPH_A}, {"", 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, }; /* Configure the PIO controller to enable SPI DataFlash*/ pio_setup(df_pio); } #endif

load_df() Function Table. load_df()function

NAND Flash Prerequisite CFG_NANDFLASH flag must be defined in your board project header file. Example: Define this flag in board/at91sam9260ek/nandflash/at91sam9260ek.h Create nandflash_hw_init() and nandflash_cfg_16bits_dbw_init() in your board source file. Example: Define this function in board/at91sam9260ek/at91sam9260ek.c

nandflash_hw_init() Function PIOs used by the NAND Flash SMC timings HMatrix or Chip Configuration User Interface Prototype: void nandflash_hw_init(void)

nandflash_cfg_16bits_dbw_init() Function #ifdef CFG_NANDFLASH void nandflash_cfg_16bits_dbw_init(void) { writel(readl(AT91C_BASE_SMC + SMC_CTRL3) | AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS, AT91C_BASE_SMC + SMC_CTRL3); } #endif Example.

load_nandflash() Function Table. load_nandflash()function

NAND Flash Features Large Blocks vs. Small Blocks Large Block NAND Flash: parts bigger than 1 Gbit Small Block NAND Flash: parts smaller than 1 Gbit Example. #define CFG_NANDFLASH /* Enable DataFlash Download */ #define NANDFLASH_SMALL_BLOCKS /*Small Block NandFlash used */

Compiling an AT91Bootstrap Project Make Command 1.Go into the board directory. 2. Select your board by going into the corresponding board directory. 3. Select your project by going into the corresponding project directory. 4. Configure your project (Makefile and header file). 5. Type make.

Adding a New Board to an AT91Bootstrap Project Copy the board directory which is the most similar to your board, e.g. cd board cp -r at91sam9261ek/ my_board/ Rename board-specific files. cd my_board mv at91sam9261ek.c my_board.c mv “project“/at91sam9261ek.h “project“/my_board.h Edit corresponding “project“ Makefile and modify BOARD variable accordingly. BOARD=my_board PROJECT=“project“ Make your modifications and compile the project.

Adding a New Project to a Board Copy the board directory which is the most similar to your board. cd board/my_board mkdir new_project Copy a Makefile and my_board.h header file. cp dataflash/* new_project/. Edit corresponding “new_project“ Makefile and modify PROJECT variable accordingly. PROJECT=new_project

Adding a New Driver to an AT91Bootstrap Project Add the new driver in the driver directory. Move the pieces of code which are product or board dependent into the board/your_board/ directory. If necessary, add an include file with the same driver name in the include directory. Use pre-processor instructions to insert your new feature into the AT91Bootstrap project. Add new driver file into project Makefile.