1-1 NET+OS Software Group Flash API Multiple flash memory bank support New Flash API introduction Detailed Flash API Function presentation Supporting.

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

MPI Message Passing Interface
CS 450 Module R4. R4 Overview Due on March 11 th along with R3. R4 is a small yet critical part of the MPX system. In this module, you will add the functionality.
Programming and Data Structure
The Linux Kernel: Memory Management
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming Introduction to Arrays.
6/10/2015C++ for Java Programmers1 Pointers and References Timothy Budd.
Inline Assembly Section 1: Recitation 7. In the early days of computing, most programs were written in assembly code. –Unmanageable because No type checking,
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Web siteWeb site ExamplesExamples 1 Mode of Operation Protected mode  4 GB  32-bit address  Windows, Linux Real-address mode  1 MB space  20-bit address.
CS 333 Introduction to Operating Systems Class 11 – Virtual Memory (1)
Files. System Calls for File System Accessing files –Open, read, write, lseek, close Creating files –Create, mknod.
Computer System Overview
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
Chapter 6 C Arrays Acknowledgment The notes are adapted from those provided by Deitel & Associates, Inc. and Pearson Education Inc. Arrays are data structures.
1 COMP541 Interrupts, DMA, Serial I/O Montek Singh April 24, 2007.
 2007 Pearson Education, Inc. All rights reserved C Arrays.
CCNA 2 v3.1 Module 2.
Embedded ‘C’.  It is a ‘mid-level’, with ‘high-level’ features (such as support for functions and modules), and ‘low-level’ features (such as good access.
1-1 NET+OS Software Group Serial EEPROM API Supported Serial EEPROM parts Serial EEPROM API introduction Detailed Serial EEPROM API Function presentation.
Compact Flash for CoolRunner™-II CPLDs. Quick Start Training Agenda Introduction What is Compact Flash? CoolRunner-II Implementation Block Diagram Applications.
File System. NET+OS 6 File System Architecture Design Goals File System Layer Design Storage Services Layer Design RAM Services Layer Design Flash Services.
POSIX: Files Introduction to Operating Systems: Discussion 1 Read Solaris System Interface Guide: Ch. 5.1 Basic File I/O.
Real-Time Concepts for Embedded Systems Author: Qing Li with Caroline Yao ISBN: CMPBooks.
Chapter 1 Algorithm Analysis
Programming Languages -1 (Introduction to C) arrays Instructor: M.Fatih AMASYALI
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
Dr. José M. Reyes Álamo 1.  The 80x86 memory addressing modes provide flexible access to memory, allowing you to easily access ◦ Variables ◦ Arrays ◦
Computer Systems Overview. Page 2 W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware resources of one.
Operator Precedence First the contents of all parentheses are evaluated beginning with the innermost set of parenthesis. Second all multiplications, divisions,
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Data Structures January 2012.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Comp 248 Introduction to Programming Chapter 6 Arrays Part B Dr. Aiman Hanna Department of Computer Science & Software Engineering Concordia University,
CS-1030 Dr. Mark L. Hornick 1 Pointers are fun!
Ethernet Driver Changes for NET+OS V5.1. Design Changes Resides in bsp\devices\ethernet directory. Source code broken into more C files. Native driver.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Renesas Technology America, Inc. Flash!. CPU Rewrite CPU-rewrite is a term that refers to an Renesas MCU’s ability to erase/program its own internal Flash.
MEMORY ORGANIZTION & ADDRESSING Presented by: Bshara Choufany.
The Management API What it is (and isn’t) Defining variables Accessing “singleton” variables Accessing Table variables.
Microprocessors The ia32 User Instruction Set Jan 31st, 2002.
Microprocessor Microprocessor (cont..) It is a 16 bit μp has a 20 bit address bus can access upto 220 memory locations ( 1 MB). It can support.
RTX - 51 Objectives  Resources needed  Architecture  Components of RTX-51 - Task - Memory pools - Mail box - Signals.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 2 Computer-System Structures Slide 1 Chapter 2 Computer-System Structures.
 2007 Pearson Education, Inc. All rights reserved C Arrays.
Lecture 3 Introduction to Computer Programming CUIT A.M. Gamundani Presentation Layout from Lecture 1 Background.
Sequencers SQO,SQC,SQL.
C++ Programming Lecture 14 Arrays – Part I The Hashemite University Computer Engineering Department (Adapted from the textbook slides)
CHAPTER 07 Arrays and Vectors (part II). OBJECTIVES In this part you will learn:  To pass arrays to functions.  Basic searching techniques.
Programming Fundamentals. Today’s Lecture Array Fundamentals Arrays as Class Member Data Arrays of Objects C-Strings The Standard C++ string Class.
© Janice Regan, CMPT 128, January CMPT 128: Introduction to Computing Science for Engineering Students Introduction to Arrays.
Array and Pointers An Introduction Unit Unit Introduction This unit covers the usage of pointers and arrays in C++
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edit9on Lecture 3 Chapter 1: Introduction Provided & Updated by Sameer Akram.
Programming in Arduino Materials:Arduino Board Casperelectronics Pre Pres. Notes Photos from workshop?
Real Numbers Device driver process within the operating system that interacts with I/O controller logical record 1 logical record 2 logical record 3.
CSCI 125 & 161 / ENGR 144 Lecture 16 Martin van Bommel.
Computer Systems Overview. Lecture 1/Page 2AE4B33OSS W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware.
C LANGUAGE UNIT 3. UNIT 3 Arrays Arrays – The concept of array – Defining arrays – Initializing arrays.
CS501 Advanced Computer Architecture
Protection of System Resources
Full Exam Name: Microsoft Dynamics CRM 2016 Online Deployment
Flash EEPROM Emulation Concepts
Interfacing Memory Interfacing.
C Arrays.
Module 2: Computer-System Structures
Operating Systems Chapter 5: Input/Output Management
Module 2: Computer-System Structures
CS150 Introduction to Computer Science 1
CS150 Introduction to Computer Science 1
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Presentation transcript:

1-1 NET+OS Software Group Flash API Multiple flash memory bank support New Flash API introduction Detailed Flash API Function presentation Supporting custom flash configurations Flash API example application

Multiple Flash Memory Banks Multiple flash memory banks must be “continuously addressable” NET+ARM board has 2 banks of flash memory Modify the BSP_FLASH_BANKS constant in bspconf.h to inform flash driver of the configured flash memory banks. FBANK1 and FBANK2 switches on the NET+ARM board must be set accordingly

New Flash API NAFlashBase() NAFlashEnable() NAFlashInit() NAFlashCreateSemaphores() NAFlashSectors() NAFlashSectorSizes() NAFlashSectorOffsets() NAFlashErase() NAFlashEraseStatus() NAFlashRead() NAFlashWrite()

NAFlashBase() unsigned short * NAFlashBase(); Retrieves the flash memory base address

NAFlashEnable() void NAFlashEnable(); Enables flash memory so it can be read.

NAFlashInit() int NAFlashInit(unsigned long flashBanks); Enables the flash memory so it can be read. Sets the number of flash memory banks. Called by the startup or initialization code ONCE after power up.

NAFlashCreateSemaphores() int NAFlashCreateSemaphores(); Creates the semaphores to synchronize access to the flash driver API functions. Called by the user application ONCE after power up. NAFlashWrite(), NAFlashRead(), NAFlashErase(), NAFlashEraseStatus() are semaphore protected.

NAFlashSectors() int NAFlashSectors(); Retrieves the number of physical sectors for the flash memory configuration. In single bank 16 or 32 bit configurations, the number of physical sectors returned is identical. In multiple bank configurations, the number of sectors returned is a multiple of the physical sectors for the flash memory part.

NAFlashSectorSizes() int NAFlashSectorSizes (unsigned long * sectorSizeArray); Retrieves the physical sector sizes for the flash memory configuration. Should be called after NAFlashSectors(), so an appropriately sized array is passed to the function to store the sector size data. In 16 bit mode, the sector sizes are the sector sizes of one flash part. In 32 bit mode, the sector sizes are twice the sector sizes of one flash part (since two flash parts are accessed per I/O cycle).

NAFlashSectorOffsets() int NAFlashSectorOffsets (unsigned long * sectorOffsetArray); Retrieves the flash “sector offsets” from flash “base address” in bytes. Should be called after NAFlashSectors(), so an appropriately sized array is passed to the function to store the sector offset data.

NAFlashErase() int NAFlashErase(unsigned long firstSectorNumber, unsigned long lastSectorNumber); Erases the specified range of flash sectors.

NAFlashEraseStatus() int NAFlashEraseStatus (unsigned long firstSectorNumber, unsigned long lastSectorNumber, char * status); Checks the erase status of the specified range of flash sectors. Sector erase status is retrieved through the "status" argument. If the array element accessed through “status” is 0, the corresponding sector is not erased; otherwise, if the array element accessed through “status” is 1, the corresponding sector is erased.

NAFlashEraseStatus() (continued) For example, a flash part with 19 sectors is indexed from 0 to 18. To check the status of sectors 3 to 7, do NAFlashEraseStatus(3, 7, status) where "status" is an array of 5 elements (i.e. char status[5]), and the erase status of sector "firstSectorNumber" is stored in status[0]. If a char array of 19 elements (i.e. char status[19]) is used, and the erase status of sectors 3 to 7 is needed, do NAFlashEraseStatus(3, 7, &status[3]), and the erase status of sector "firstSectorNumber" is stored in status[firstSectorNumber].

NAFlashRead() int NAFlashRead(unsigned long sectorNumber, unsigned long sectorOffset, unsigned long bytesToRead, char * buffer); Reads data starting from a specified sector number and offset location and stores it in a buffer. This routine allows reading: One or more consecutive sectors (including the entire flash memory). Partial sectors. Any combination of the above.

NAFlashWrite() int NAFlashWrite(unsigned long sectorNumber, unsigned long sectorOffset, unsigned long bytesToWrite, char * buffer, char options); Writes data starting from a specified sector number and offset location. This routine allows writing: One or more consecutive sectors (including the entire flash memory) Partial sectors Any combination of the above

NAFlashWrite() (continued) The “options” argument specifies the advanced write options: ERASE_AS_NEEDED Full sector write - Erases the sector (if it is not erased) before writing new data. Partial sector write - Updates new data to the sector, but does not destroy the rest of the sector data. ALWAYS_ERASE Full sector write - Erases the sector before writing new data.

NAFlashWrite() (continued) Partial sector write - Updates new data to the sector, but erases the rest of the sector data. DO_NOT_ERASE Full sector write - Writes new data to the sector without first erasing the sector. If writing to the sector changes a bit from 0 to 1, the function returns an error. Partial sector write - Writes new data to the sector without first erasing the sector. If writing to the sector changes a bit from 0 to 1, the function returns an error.

Custom Flash Configurations Modify 3 constants in flash.h MAX_SECTORS - Maximum number of flash sectors supported. Increase value to support flash parts with a larger sector count. MAX_SECTOR_SIZE - Maximum sector size supported. Increase value to support flash parts with a larger sector size. MAX_FLASH_BANKS - Maximum flash memory banks supported. Increase value to support a larger number of flash banks.

Flash Example Application \netosx\src\examples\naflash Allows accessing up to 4MB in 32 bit mode on the standard NET50 board. Automatically adjusts MASK bits on CS0 option register to access amount of flash memory configured. Allows reading / writing entire flash memory 1 byte per NAFlashRead() / NAFlashWrite() call to reading / writing 4MB with one NAFlashRead() / NAFlashWrite() call.