BACKGROUND & TWI_CLKDIV

Size: px
Start display at page:

Download "BACKGROUND & TWI_CLKDIV"

Transcription

1 BACKGROUND & TWI_CLKDIV I have one TS7500 and I2C sensors. The communication between TS7500 and sensors fail. I probed the i2c communication between the sensors and one Arduino and it was OK. This communication was in 11kbps min speed. I want get lower speed in the communication TS7500-sensors. Using this.pdf: CNS21XX-HRM-v.1.8.pdf The 146 page has TWI Time-Out reg: Where: [eq1] Insolating the variable: [eq2]

2 PERIPHERAL CLOCK(PCLK) The page 201 has the register to put PCLK value: System clock control register Where: If we choose CPU_PLL_Sel=0x0; FCLK_DIV=0x3; HCLK_DIV=0x3 we have that: Using eq2 we choose: We should have this speed: [eq2]

3 OTHERS REGISTERS TO CONSIDER From page 199:

4 From page200: Where PCLK_P2S_EN default =1 (PCLK TWI enable).

5 STEPS FOLLOWED FOR PROGRAM In first time i read the Clock gate control register 0 for AHB and APB devices, Clock gate control register 1 for AHB and APB devices and System clock control register. I use this function to access to registers: /* void *map_phys(off_t addr,int *fd): */ void *map_phys(off_t addr,int *fd) { off_t page; unsigned char *start; if (*fd == -1) //if fd it isnt -1,it was open *fd = open("/dev/mem", O_RDWR O_SYNC); if (*fd == -1) { perror("open(/dev/mem):"); //it isnt open ok return 0; } page = addr & 0xfffff000; start = mmap(0, getpagesize(), PROT_READ PROT_WRITE, MAP_SHARED, *fd, page); //start has the initial page direcction if (start == MAP_FAILED) { perror("mmap:"); return 0; } start = start + (addr & 0xfff); //now start has initial direccion + offset return start; } The TWI registers are since 0x direction. 102 page: So use the above function. reg_clk = map_phys(0x ,&fd_clk); //reg_clk[registroclk/sizeof(unsigned)] ya puede ser utilizado Now i read the registers: printf("register Clock gate control register 0 for AHB and APB devices = %X\n", reg_clk[0]); printf("register Clock gate control register 1 for AHB and APB devices = %X\n", reg_clk[0x4/sizeof(unsigned)]); printf("register System clock control register = %X\n", reg_clk[0])reg[0xc/sizeof(unsigned)]);

6 Results: Clock gate control register 0 for AHB and APB devices: 0x51F11003 Clock gate control register 1 for AHB and APB devices: 0x System clock control register: 0Xf9593 The default values are diferent from the values read. But PCLK is enable (ISNT IT???): De Clock gate control register 0 for AHB and APB devices: PCLK_NIC_EN=1; De Clock gate control register 1 for AHB and APB devices: PCLK_P2S_EN =1. De System clock control register : PCLK_DIV=1; NICCLK_Sel=1 (because HCLK<62.5MHz). In conclusion i have to change only the bits: 0, 1, 2, 3, 4 y 5 from System clock control register DUDE: DO I NEED MORE REGISTERS ENABLE FROM Clock gate control register 0 y 1 for AHB and APB devices? In second time i change PCLK y TWI_CLKDIV: void init_twi() { int TWI_CLKDIV=0; reg = map_phys(0x ,&fd); //reg[registrotwi/sizeof(unsigned)] it can use reg_clk = map_phys(0x ,&fd_clk); //reg_clk[registroclk/sizeof(unsigned)]it can use cavium_enable_twi(); } //reg_clk[0xc/sizeof(unsigned)]=0xf9593; //bydefult reg_clk[0xc/sizeof(unsigned)] = 0x3C; //CPU_PLL_SEL=0 -> PLL=175MHz; reg_clk[0xc/sizeof(unsigned)]&= (0x3C 0xFFFFC0);//FCLK_DIV=3 -> FCLK=175/4=43.75MHz //HCLK_DIV=3 -> HCLK=43.75/4= MHz //PCLK=HCLK/2= MHz TWI_CLKDIV=248; reg[0x4/sizeof(unsigned)] = (TWI_CLKDIV<<8); reg[0x4/sizeof(unsigned)] &= ((TWI_CLKDIV<<8) (0xFF)); reg[0x14/sizeof(unsigned)] = 3; //TWI_ACTDONE_FG y TWI_BUSERR_FG puestos a '0'

7 In last time i test it: int main(int argc,char *argv[]) { unsigned lectura=0; } init_twi(); //distv3 (sensor 1) write_twi_data(0x34,1,0x00); lectura=read_twi_data(0x34,4); //arduino use like a sensor (sensor2) write_twi_data(0x12,1,0xb3); lectura=read_twi_data(0x12,2); printf("lectura: 0x%X\n",lectura); cavium_disable_twi(); return 0;

8 RESULTS Distv3 sensor: Speed is not lowered and the data loss is evident. The speed is 128KBps is should be 11KBps.

9 Arduino sensor: Speed is not lowered and the data loss is evident. The speed communication is 128KBps it should be 11KBps. If Insolate PCLK from eq1: =61.5MHz. PCLK has not really changed.

10 CONCLUSIONS I think if I want lowered speed I need to enable some register that it isnt and I will can use System clock control register. The I2C speed before it s the same after that: Before (TWI_CLKDIV=511 y PCLK default): After (TWI_CLKDIV=511 y PCLK=5.4Mhz):

11 CPU_PLL_Sel=0x3; FCLK_DIV=0x0; HCLK_DIV=0x2 (when in first time they were readed): The next table its made with default PCLK, changing TWI_CLKDIV and measuring SCL frequency: It can be seen that the speed varies if it is changed TWI_CLKDIV. PCLK is 62.5MHz more or less.

F28HS2 Hardware-Software Interface. Lecture 3 - Programming in C 3

F28HS2 Hardware-Software Interface. Lecture 3 - Programming in C 3 F28HS2 Hardware-Software Interface Lecture 3 - Programming in C 3 Low level programming in C want to control hardware devices devices mapped into memory accessed at specific memory addresses set memory

More information

임베디드리눅스응용프로그래밍. Why use an Operating System? Typical ARM Cortex-A9 Boot Sequence. Linux SD card Images

임베디드리눅스응용프로그래밍. Why use an Operating System? Typical ARM Cortex-A9 Boot Sequence. Linux SD card Images Why use an Operating System? Device Drivers USB Device Drivers Keyboard, Mouse, Bluetooth 임베디드리눅스응용프로그래밍 Internet Protocol Stack Easily start using the Ethernet port Multi-threaded Applications 2 Typical

More information

How to write a Measurement Telnet Server

How to write a Measurement Telnet Server How to write a Measurement Telnet Server A measurement Telnet server allows you to access remote I/Os with a standard Telnet client program. The following samples shows a way to set the LEDs of a DNP/EVA2

More information

MMAP AND PIPE. UNIX Programming 2015 Fall by Euiseong Seo

MMAP AND PIPE. UNIX Programming 2015 Fall by Euiseong Seo MMAP AND PIPE UNIX Programming 2015 Fall by Euiseong Seo Memory Mapping mmap(2) system call allows mapping of a file into process address space Instead of using read() and write(), just write to memory

More information

Shared Memory Memory mapped files

Shared Memory Memory mapped files Shared Memory Memory mapped files 1 Shared Memory Introduction Creating a Shared Memory Segment Shared Memory Control Shared Memory Operations Using a File as Shared Memory 2 Introduction Shared memory

More information

CS 322 Operating Systems Programming Assignment 4 Writing a memory manager Due: November 16, 11:30 PM

CS 322 Operating Systems Programming Assignment 4 Writing a memory manager Due: November 16, 11:30 PM CS 322 Operating Systems Programming Assignment 4 Writing a memory manager Due: November 16, 11:30 PM Goals To understand the nuances of building a memory allocator. To create a shared library. Background

More information

ECE 650 Systems Programming & Engineering. Spring 2018

ECE 650 Systems Programming & Engineering. Spring 2018 ECE 650 Systems Programming & Engineering Spring 2018 Inter-process Communication (IPC) Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) Recall Process vs. Thread A process is

More information

ECEN 449 Microprocessor System Design. Review of C Programming. Texas A&M University

ECEN 449 Microprocessor System Design. Review of C Programming. Texas A&M University ECEN 449 Microprocessor System Design Review of C Programming 1 Objectives of this Lecture Unit Review C programming basics Refresh programming skills 2 Basic C program structure # include main()

More information

POSIX Shared Memory. Linux/UNIX IPC Programming. Outline. Michael Kerrisk, man7.org c 2017 November 2017

POSIX Shared Memory. Linux/UNIX IPC Programming. Outline. Michael Kerrisk, man7.org c 2017 November 2017 Linux/UNIX IPC Programming POSIX Shared Memory Michael Kerrisk, man7.org c 2017 mtk@man7.org November 2017 Outline 10 POSIX Shared Memory 10-1 10.1 Overview 10-3 10.2 Creating and opening shared memory

More information

The I2C BUS Interface

The I2C BUS Interface The I 2 C BUS Interface ARSLAB - Autonomous and Robotic Systems Laboratory Dipartimento di Matematica e Informatica - Università di Catania, Italy santoro@dmi.unict.it L.S.M. 1 Course What is I 2 C? I

More information

ArduCAM-M-2MP Camera Shield

ArduCAM-M-2MP Camera Shield 33275-MP ArduCAM-M-2MP Camera Shield 2MP SPI Camera Hardware Application Note Rev 1.0, Mar 2015 33275-MP ArduCAM-M-2MP Hardware Application Note Table of Contents 1 Introduction... 2 2 Typical Wiring...

More information

F28HS Hardware-Software Interface: Systems Programming

F28HS Hardware-Software Interface: Systems Programming F28HS Hardware-Software Interface: Systems Programming Hans-Wolfgang Loidl School of Mathematical and Computer Sciences, Heriot-Watt University, Edinburgh Semester 2 2016/17 0 No proprietary software has

More information

ECEN 449 Microprocessor System Design. Review of C Programming

ECEN 449 Microprocessor System Design. Review of C Programming ECEN 449 Microprocessor System Design Review of C Programming 1 Objectives of this Lecture Unit Review C programming basics Refresh es programming g skills s 2 1 Basic C program structure # include

More information

Introduction to File Systems. CSE 120 Winter 2001

Introduction to File Systems. CSE 120 Winter 2001 Introduction to File Systems CSE 120 Winter 2001 Files Files are an abstraction of memory that are stable and sharable. Typically implemented in three different layers of abstraction 3 I/O system: interrupt

More information

Trinity A Linux kernel fuzz tester.

Trinity A Linux kernel fuzz tester. Trinity A Linux kernel fuzz tester. Presented by Dave Jones Red Hat. Slides license: CC-BY-SA Syscall fuzzing. A short history lesson.. Completely random. Circa 1991: Tsys. SVR4 Circa 2001: kg_crashme.

More information

EECS 373 Midterm 2 Fall 2018

EECS 373 Midterm 2 Fall 2018 EECS 373 Midterm 2 Fall 2018 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Nor did I discuss this exam with anyone after

More information

CS C Primer. Tyler Szepesi. January 16, 2013

CS C Primer. Tyler Szepesi. January 16, 2013 January 16, 2013 Topics 1 Why C? 2 Data Types 3 Memory 4 Files 5 Endianness 6 Resources Why C? C is exteremely flexible and gives control to the programmer Allows users to break rigid rules, which are

More information

Lab 09 - Virtual Memory

Lab 09 - Virtual Memory Lab 09 - Virtual Memory Due: November 19, 2017 at 4:00pm 1 mmapcopy 1 1.1 Introduction 1 1.1.1 A door predicament 1 1.1.2 Concepts and Functions 2 1.2 Assignment 3 1.2.1 mmap copy 3 1.2.2 Tips 3 1.2.3

More information

CS 322 Operating Systems Programming Assignment 4 Writing a memory manager Due: April 5, 11:30 PM

CS 322 Operating Systems Programming Assignment 4 Writing a memory manager Due: April 5, 11:30 PM CS 322 Operating Systems Programming Assignment 4 Writing a memory manager Due: April 5, 11:30 PM Goals To understand the nuances of building a memory allocator. To create a shared library. Background

More information

MediaTek Log Filtering Driver Information Disclosure

MediaTek Log Filtering Driver Information Disclosure MediaTek Log Filtering Driver Information Disclosure 13/04/2018 Software Affected Versions Author Severity Vendor Vendor Response MediaTek Log Filtering Driver Huawei Y6 Pro Dual SIM (Version earlier than

More information

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 373 Design of Microprocessor-Based Systems Ron Dreslinski University of Michigan Lecture 5: Memory-mapped I/O review, APB, Mostly APB though J January 18 th 2018 1 Administra,ve Midterm Exam: Monday,

More information

Tutorial 1: C-Language

Tutorial 1: C-Language Tutorial 1: C-Language Problem 1: Data Type What are the ranges of the following data types? int 32 bits 2 31..2 31-1 OR -2147483648..2147483647 (0..4294967295 if unsiged) in some machines int is same

More information

Operating systems. Lecture 9

Operating systems. Lecture 9 Operating systems. Lecture 9 Michał Goliński 2018-11-27 Introduction Recall Reading and writing wiles in the C/C++ standard libraries System calls managing processes (fork, exec etc.) Plan for today fork

More information

Virtual Memory: Systems

Virtual Memory: Systems Virtual Memory: Systems 5-23: Introduction to Computer Systems 8 th Lecture, March 28, 27 Instructor: Franz Franchetti & Seth Copen Goldstein Recap: Hmmm, How Does This Work?! Process Process 2 Process

More information

CMPSC 311 Exam 2. March 27, 2015

CMPSC 311 Exam 2. March 27, 2015 Name: Section: 11:15 1:25 CMPSC 311 Exam 2 March 27, 2015 Closed book, closed neighbor, no electronic tools or additional papers. You may not share or discuss exam questions with anyone. 1 Short Questions

More information

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Lecture 5: Memory-mapped I/O review, APB, start interrupts. Mostly APB though Sept. 19 th 2018 1 Today Memory-mapped I/O

More information

EECS 373 Practice Midterm / Homework #3 Fall 2014

EECS 373 Practice Midterm / Homework #3 Fall 2014 Exam #: EECS 373 Practice Midterm / Homework #3 Fall 2014 Name: Uniquename: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: Problem #

More information

Analysis of User Level Device Driver usability in embedded application

Analysis of User Level Device Driver usability in embedded application Analysis of User Level Device Driver usability in embedded application -Technique to achieve good real-time performance- Katsuya Matsubara Takanari Hayama Hitomi Takahashi Hisao Munakata IGEL Co., Ltd

More information

Project 2 Overview: Part A: User space memory allocation

Project 2 Overview: Part A: User space memory allocation Project 2 Overview: Once again, this project will have 2 parts. In the first part, you will get to implement your own user space memory allocator. You will learn the complexities and details of memory

More information

CSCI 4061: Virtual Memory

CSCI 4061: Virtual Memory 1 CSCI 4061: Virtual Memory Chris Kauffman Last Updated: Thu Dec 7 12:52:03 CST 2017 2 Logistics: End Game Date Lecture Outside Mon 12/04 Lab 13: Sockets Tue 12/05 Sockets Thu 12/07 Virtual Memory Mon

More information

primitive arrays v. vectors (1)

primitive arrays v. vectors (1) Arrays 1 primitive arrays v. vectors (1) 2 int a[10]; allocate new, 10 elements vector v(10); // or: vector v; v.resize(10); primitive arrays v. vectors (1) 2 int a[10]; allocate new, 10 elements

More information

Processes COMPSCI 386

Processes COMPSCI 386 Processes COMPSCI 386 Elements of a Process A process is a program in execution. Distinct processes may be created from the same program, but they are separate execution sequences. call stack heap STACK

More information

ECEN : Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University. Homework #2 Solutions

ECEN : Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University. Homework #2 Solutions ECEN 449 749: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University Homework #2 Solutions Upload your homework solution to ecampus as a single file. Your homework

More information

IBM PSSC Montpellier Customer Center. Blue Gene/P ASIC IBM Corporation

IBM PSSC Montpellier Customer Center. Blue Gene/P ASIC IBM Corporation Blue Gene/P ASIC Memory Overview/Considerations No virtual Paging only the physical memory (2-4 GBytes/node) In C, C++, and Fortran, the malloc routine returns a NULL pointer when users request more memory

More information

EL2310 Scientific Programming

EL2310 Scientific Programming Lecture 11: Memory, Files and Bitoperations (yaseminb@kth.se) Overview Overview Lecture 11: Memory, Files and Bit operations Main function; reading and writing Bitwise Operations Lecture 11: Memory, Files

More information

Applications of. Virtual Memory in. OS Design

Applications of. Virtual Memory in. OS Design Applications of Virtual Memory in OS Design Nima Honarmand Introduction Virtual memory is a powerful level of indirection Indirection: IMO, the most powerful concept in Computer Science Fundamental Theorem

More information

1 Contents. Version of EnSilica Ltd, All Rights Reserved

1 Contents. Version of EnSilica Ltd, All Rights Reserved 56/SHA224 1 Contents 1 Contents 2 2 Overview 3 3 Hardware Interface 4 3.1 Area 4 4 Software Interface 5 4.1 Register Map 5 5 SHA256/SHA224 Operation 8 5.1 Introduction 8 5.2 Cycle counts 8 6 Revision History

More information

CMPS03 - Compass Module

CMPS03 - Compass Module CMPS03 - Compass Module For documentation on CMPS03 revisions prior to Rev14, click here Earlier versions can be identified by the presence of the silver 8MHz ceramic resonator in the middle of the PCB,

More information

Midterm Exam Review Slides

Midterm Exam Review Slides Midterm Exam Review Slides Original slides from Gregory Byrd, North Carolina State University Modified slides by Chris Wilcox, Colorado State University Review Topics Number Representation Base Conversion

More information

Virtual Memory. Alan L. Cox Some slides adapted from CMU slides

Virtual Memory. Alan L. Cox Some slides adapted from CMU slides Alan L. Cox alc@rice.edu Some slides adapted from CMU 5.23 slides Objectives Be able to explain the rationale for VM Be able to explain how VM is implemented Be able to translate virtual addresses to physical

More information

CanBarry PI V 1.0 INDUSTRIAL BERRY.

CanBarry PI V 1.0 INDUSTRIAL BERRY. CanBarry PI V 1.0 INDUSTRIAL BERRY www.industrialberry.com August 2013 Contents 1 License 1 2 Introduction 3 3 Hardware implementation 5 4 Software implementation 9 4.1 Real Time Clock..........................

More information

Recall: So What About a Real File System? Meet the inode: Recall: Unix File System (2/2) Recall: Unix File System (1/2)

Recall: So What About a Real File System? Meet the inode: Recall: Unix File System (2/2) Recall: Unix File System (1/2) CS162 Operating Systems and Systems Programming Lecture 19 Recall: So What About a Real File System? Meet the inode: Inode Array Inode Triple Double Data File Systems (Con t), MMAP file_number File Metadata

More information

CSE 333 SECTION 3. POSIX I/O Functions

CSE 333 SECTION 3. POSIX I/O Functions CSE 333 SECTION 3 POSIX I/O Functions Administrivia Questions (?) HW1 Due Tonight Exercise 7 due Monday (out later today) POSIX Portable Operating System Interface Family of standards specified by the

More information

CoreAPB3 v4.1. Handbook

CoreAPB3 v4.1. Handbook CoreAPB3 v4.1 Handbook CoreAPB3 v4.1 Handbook Table of Contents Introduction... 3 Core Overview... 3 Key Features... 5 Supported Microsemi FPGA Families... 5 Core Version... 5 Supported Interfaces... 5

More information

Arduino EEPROM module 512K for Sensor Shield

Arduino EEPROM module 512K for Sensor Shield Arduino EEPROM module 512K for Sensor Shield Experiment Steps This is a new designed for small data size storage. It can help to extend the EEPROM storage of Arduino. This module uses I2C to connect to

More information

I 2 C Application Note in Protocol B

I 2 C Application Note in Protocol B I 2 C Application Note in Protocol B Description This document is a reference for a possible coding method to achieve pressure, temperature, and status for SMI part readings using I 2 C. This SMI Protocol

More information

MSI-P450 USER MANUAL

MSI-P450 USER MANUAL MSI-P450 ANALOG INPUT/OUTPUT CARD USER MANUAL PC/104 Embedded Industrial Analog I/O Series Microcomputer Systems, Inc. 1814 Ryder Drive Baton Rouge, LA 70808 Ph (504)769-2154 Fax (504) 769-2155 Email:

More information

MP3: VIRTUAL MEMORY PAGE FAULT MEASUREMENT

MP3: VIRTUAL MEMORY PAGE FAULT MEASUREMENT MP3: VIRTUAL MEMORY PAGE FAULT MEASUREMENT University of Illinois at Urbana-Champaign Department of Computer Science CS423 Fall 2011 Keun Soo Yim GOAL A Linux kernel module to profile VM system events

More information

File Systems: Consistency Issues

File Systems: Consistency Issues File Systems: Consistency Issues File systems maintain many data structures Free list/bit vector Directories File headers and inode structures res Data blocks File Systems: Consistency Issues All data

More information

OPERATING SYSTEMS: Lesson 2: Operating System Services

OPERATING SYSTEMS: Lesson 2: Operating System Services OPERATING SYSTEMS: Lesson 2: Operating System Services Jesús Carretero Pérez David Expósito Singh José Daniel García Sánchez Francisco Javier García Blas Florin Isaila 1 Goals To understand what an operating

More information

Two Wire Interface (TWI) also commonly called I2C

Two Wire Interface (TWI) also commonly called I2C (TWI) also commonly called I2C MSP432 I2C 2 tj MSP432 I2C ARM (AMBA Compliant) 8 bit transmission word 7/10 bit addressing Multi-master/slave modes 4 slave addresses 4 eusci-b modules 3 tj Overview 8 bit

More information

AMP DISPLAY INC. SPECIFICATIONS AMP DISPLAY INC 9856 SIXTH STREET RANCHO CUCAMONGA CA TEL: FAX:

AMP DISPLAY INC. SPECIFICATIONS AMP DISPLAY INC 9856 SIXTH STREET RANCHO CUCAMONGA CA TEL: FAX: AMP DISPLAY INC. SPECIFICATIONS CUSTOMER CUSTOMER PART NO. AMP PART NO. AP-CTP035A0RSI3E00000 APPROVED BY DATE Approved For Specifications Approved For Specifications & Sample AMP DISPLAY INC 9856 SIXTH

More information

Owner s Manual for the. ClockMaster. Models: CM2-100-PCI

Owner s Manual for the. ClockMaster. Models: CM2-100-PCI Owner s Manual for the ClockMaster Models: CM2-100-PCI SpinCore Technologies, Inc. 3525 NW 67 th Avenue Gainesville, Florida 32653, USA Phone: (352)-271-7383 http:// Congratulations and THANK YOU for choosing

More information

Microcontrollers and Interfacing

Microcontrollers and Interfacing Microcontrollers and Interfacing Week 10 Serial communication with devices: Serial Peripheral Interconnect (SPI) and Inter-Integrated Circuit (I 2 C) protocols College of Information Science and Engineering

More information

Programmation Système Cours 5 Memory Mapping

Programmation Système Cours 5 Memory Mapping Programmation Système Cours 5 Memory Mapping Stefano Zacchiroli zack@pps.univ-paris-diderot.fr Laboratoire PPS, Université Paris Diderot 2014 2015 URL http://upsilon.cc/zack/teaching/1415/progsyst/ Copyright

More information

Programmable Device Interface PDI-1 A Versatile Hardware Controller with USB interface

Programmable Device Interface PDI-1 A Versatile Hardware Controller with USB interface Programmable Device Interface PDI-1 A Versatile Hardware Controller with USB interface Features and Specifications Arduino compatible for simple USB Programming 126 x 64 Graphic LCD 12x Digital IO ports*

More information

Lecture 24: Filesystems: FAT, FFS, NTFS

Lecture 24: Filesystems: FAT, FFS, NTFS CS162: Operating Systems and Systems Programming Lecture 24: Filesystems: FAT, FFS, NTFS 30 July 2015 Charles Reiss https://cs162.eecs.berkeley.edu/ Building a File System File System: Layer of OS that

More information

Applying User-level Drivers on

Applying User-level Drivers on Applying User-level Drivers on DTV System Gunho Lee, Senior Research Engineer, ELC, April 18, 2007 Content Background Requirements of DTV Device Drivers Design of LG DTV User-level Drivers Implementation

More information

CMSC 412 Project #4 Virtual Memory Due Friday April 11, 2014, at 5:00pm

CMSC 412 Project #4 Virtual Memory Due Friday April 11, 2014, at 5:00pm CMSC 412 Project #4 Virtual Memory Due Friday April 11, 2014, at 5:00pm Overview Introduction The purpose of this project is to add paging to your GeekOS kernel. This will require many small, but difficult,

More information

Signal Example 1. Signal Example 2

Signal Example 1. Signal Example 2 Signal Example 1 #include #include void ctrl_c_handler(int tmp) { printf("you typed CTL-C, but I don't want to die!\n"); int main(int argc, char* argv[]) { long i; signal(sigint, ctrl_c_handler);

More information

Embedded Workshop 10/28/15 Rusty Cain

Embedded Workshop 10/28/15 Rusty Cain 2 IC Embedded Workshop 10/28/15 Rusty Cain Set up for Workshop: Please Sign in on Sheet. Please include your email. While you are waiting for the Workshop to begin 1. Make sure you are connected to the

More information

P6 memory system P6/Linux Memory System October 31, Overview of P6 address translation. Review of abbreviations. Topics. Symbols: ...

P6 memory system P6/Linux Memory System October 31, Overview of P6 address translation. Review of abbreviations. Topics. Symbols: ... 15-213 P6/Linux ory System October 31, 00 Topics P6 address translation Linux memory management Linux fault handling memory mapping DRAM bus interface unit instruction fetch unit processor package P6 memory

More information

KNJN I2C bus development boards

KNJN I2C bus development boards KNJN I2C bus development boards 2005, 2006, 2007, 2008 KNJN LLC http://www.knjn.com/ Document last revision on December 5, 2008 R22 KNJN I2C bus development boards Page 1 Table of Contents 1 The I2C bus...4

More information

Virtual Memory: Systems

Virtual Memory: Systems Virtual Memory: Systems 5-23 / 8-23: Introduc2on to Computer Systems 7 th Lecture, Mar. 22, 22 Instructors: Todd C. Mowry & Anthony Rowe Today Virtual memory ques7ons and answers Simple memory system example

More information

«Defeating DEP through a mapped file»

«Defeating DEP through a mapped file» «Defeating DEP through a mapped file» by Homeostasie (Nicolas.D) 08/08/2011 (trashomeo [at] gmail [dot] com) Contents 1. Introduction...3 2. Description of the attack scenario...4 3. Building a ROP exploit...7

More information

Page Which had internal designation P5

Page Which had internal designation P5 Intel P6 Internal Designation for Successor to Pentium Which had internal designation P5 Fundamentally Different from Pentium 1 Out-of-order, superscalar operation Designed to handle server applications

More information

HW/SW Co-design Lecture 4: Lab 2 Passive HW Accelerator Design

HW/SW Co-design Lecture 4: Lab 2 Passive HW Accelerator Design HW/SW Co-design Lecture 4: Lab 2 Passive HW Accelerator Design Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU Outline Introduction to AMBA Bus System Passive

More information

Pointers (2) Applications

Pointers (2) Applications Pointers (2) Applications December 9, 2017 This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license. 0.1 const qaulifier t1.c #include #include

More information

Inter-Process Communication. Disclaimer: some slides are adopted from the book authors slides with permission 1

Inter-Process Communication. Disclaimer: some slides are adopted from the book authors slides with permission 1 Inter-Process Communication Disclaimer: some slides are adopted from the book authors slides with permission 1 Today Inter-Process Communication (IPC) What is it? What IPC mechanisms are available? 2 Inter-Process

More information

Introduction to Linux, for Embedded Engineers Tutorial on Virtual Memory. Feb. 22, 2007 Tetsuyuki Kobayashi Aplix Corporation. [translated by ikoma]

Introduction to Linux, for Embedded Engineers Tutorial on Virtual Memory. Feb. 22, 2007 Tetsuyuki Kobayashi Aplix Corporation. [translated by ikoma] Introduction to Linux, for Embedded Engineers Tutorial on Virtual Memory Feb. 22, 2007 Tetsuyuki Kobayashi Aplix Corporation [translated by ikoma] 1 Target Audience of this Presentation People who have

More information

Topic 3. ARM Cortex M3(i) Memory Management and Access. Department of Electronics Academic Year 14/15. (ver )

Topic 3. ARM Cortex M3(i) Memory Management and Access. Department of Electronics Academic Year 14/15. (ver ) Topic 3 ARM Cortex M3(i) Memory Management and Access Department of Electronics Academic Year 14/15 (ver 25-10-2014) Index 3.1. Memory maps 3.2. Memory expansion 3.3. Memory management & Data alignment

More information

F28335 I2C MODULE v1.1

F28335 I2C MODULE v1.1 1 F28335 I2C MODULE v1.1 Abstract This document describes how to configure for I2C module of F28335. 2 Table of Contents 1. Overview... 3 2. Configuration details... 3 3. Reference... 7 3 1. Overview Step

More information

CMT2119A & CMT2219A Communication Example

CMT2119A & CMT2219A Communication Example CMT2119A & CMT2219A Communication Example This chapter will guide the user to carry out the communication experiment on a pair of single transmitting and single receiving chips CMT2119A and CMT2219A. CMT2119A

More information

PACS Akira Baruah akb2158 Chaiwen Chou cc3636 Philip Schiffrin pjs2186 Sean Liu sl3497

PACS Akira Baruah akb2158 Chaiwen Chou cc3636 Philip Schiffrin pjs2186 Sean Liu sl3497 PACS 6502 Akira Baruah akb2158 Chaiwen Chou cc3636 Philip Schiffrin pjs2186 Sean Liu sl3497 1 Table of Contents Overview About the 6502 CPU Instructions Addressing Modes ALU Our Design Hardware Software

More information

TPMC917-SW-82. Linux Device Driver. User Manual. The Embedded I/O Company. 4 MB SRAM with Battery Backup and 4 Channel Serial Interface Version 1.0.

TPMC917-SW-82. Linux Device Driver. User Manual. The Embedded I/O Company. 4 MB SRAM with Battery Backup and 4 Channel Serial Interface Version 1.0. The Embedded I/O Company TPMC917-SW-82 Linux Device Driver 4 MB SRAM with Battery Backup and 4 Channel Serial Interface Version 1.0.x User Manual Issue 1.0.1 November 2006 TEWS TECHNOLOGIES GmbH Am Bahnhof

More information

Winter 2006 FINAL EXAMINATION Auxiliary Gymnasium Tuesday, April 18 7:00pm to 10:00pm

Winter 2006 FINAL EXAMINATION Auxiliary Gymnasium Tuesday, April 18 7:00pm to 10:00pm University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Lecture Instructor for L01 and L02: Dr. S. A. Norman Winter 2006 FINAL EXAMINATION Auxiliary Gymnasium

More information

Processes and Threads

Processes and Threads Process Processes and Threads A process is an abstraction that represent an executing program A program in execution An instance of a program running on a computer The entity that can be assigned to and

More information

Memory management. Single process. Multiple processes. How to: All memory assigned to the process Addresses defined at compile time

Memory management. Single process. Multiple processes. How to: All memory assigned to the process Addresses defined at compile time Memory management Single process All memory assigned to the process Addresses defined at compile time Multiple processes. How to: assign memory manage addresses? manage relocation? manage program grow?

More information

KNJN I2C bus development boards

KNJN I2C bus development boards KNJN I2C bus development boards 2005, 2006, 2007, 2008 fpga4fun.com & KNJN LLC http://www.knjn.com/ Document last revision on January 1, 2008 R12 KNJN I2C bus development boards Page 1 Table of Contents

More information

Outline. 1 Details of paging. 2 The user-level perspective. 3 Case study: 4.4 BSD 1 / 19

Outline. 1 Details of paging. 2 The user-level perspective. 3 Case study: 4.4 BSD 1 / 19 Outline 1 Details of paging 2 The user-level perspective 3 Case study: 4.4 BSD 1 / 19 Some complications of paging What happens to available memory? - Some physical memory tied up by kernel VM structures

More information

Survey. Motivation 29.5 / 40 class is required

Survey. Motivation 29.5 / 40 class is required Survey Motivation 29.5 / 40 class is required Concerns 6 / 40 not good at examination That s why we have 3 examinations 6 / 40 this class sounds difficult 8 / 40 understand the instructor Want class to

More information

Common Misunderstandings from Exam 1 Material

Common Misunderstandings from Exam 1 Material Common Misunderstandings from Exam 1 Material Kyle Dewey Stack and Heap Allocation with Pointers char c = c ; char* p1 = malloc(sizeof(char)); char** p2 = &p1; Where is c allocated? Where is p1 itself

More information

Application Note LT-1PA01. LT Series LT-1PA01. Proximity /Ambient Light Sensor. Features. Applications. Overview

Application Note LT-1PA01. LT Series LT-1PA01. Proximity /Ambient Light Sensor. Features. Applications. Overview Proximity /Ambient Light Sensor LT Series Features Proximity sensor and ambient light sensor in 1package Very small package size(l3.05 x W2.1 x H1.0 mm) Low Current consumption 80mA typical at sleeping

More information

Bus AMBA. Advanced Microcontroller Bus Architecture (AMBA)

Bus AMBA. Advanced Microcontroller Bus Architecture (AMBA) Bus AMBA Advanced Microcontroller Bus Architecture (AMBA) Rene.beuchat@epfl.ch Rene.beuchat@hesge.ch Réf: AMBA Specification (Rev 2.0) www.arm.com ARM IHI 0011A 1 What to see AMBA system architecture Derivatives

More information

PROJECT 2 - MEMORY ALLOCATOR Computer Systems Principles. October 1, 2010

PROJECT 2 - MEMORY ALLOCATOR Computer Systems Principles. October 1, 2010 PROJECT 2 - MEMORY ALLOCATOR Computer Systems Principles Emery Berger Mark Corner October 1, 2010 1 Overview The purpose of this project is to acquaint you with how memory allocators provide virtual memory

More information

8051 Peripherals. On-Chip Memory Timers Serial Port Interrupts. Computer Engineering Timers

8051 Peripherals. On-Chip Memory Timers Serial Port Interrupts. Computer Engineering Timers 8051 Peripherals On-Chip Memory Timers Serial Port Interrupts Computer Engineering 2 2-1 8051 Timers 8051 Timers The 8051 has 2 internal 16-bit timers named Timer 0 and Timer 1 Each timer is a 16-bit counter

More information

Sound Programming with PC Speaker

Sound Programming with PC Speaker 23 Let your gentleness be evident to all. Sound Programming with PC Speaker Sound programming can be classified as with PC speaker and with sound blaster card. In this chapter, let s see sound programming

More information

I2C on the HMC6352 Compass

I2C on the HMC6352 Compass I 2 C Bus The I 2 C bus is a two-wire bus(plus ground) where the two wire are called SCL Clock line SDA Data line Gnd Ground line This is a synchronous bus. SCL is the synchronizing signal. SCL and SDA

More information

EECS 373 Midterm Winter 2012

EECS 373 Midterm Winter 2012 EECS 373 Midterm Winter 2012 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Nor did I discuss this exam with anyone after

More information

coe628 Final Study Guide (2017)

coe628 Final Study Guide (2017) coe628 Final Study Guide 2017 1/6 coe628 Final Study Guide (2017) Table of Contents What is a Study Guide?...1 The Questions...2 Address of global variables in forked processes...2 Memory spaces...3 Amdahl

More information

CSE 351: The Hardware/Software Interface. Section 2 Integer representations, two s complement, and bitwise operators

CSE 351: The Hardware/Software Interface. Section 2 Integer representations, two s complement, and bitwise operators CSE 351: The Hardware/Software Interface Section 2 Integer representations, two s complement, and bitwise operators Integer representations In addition to decimal notation, it s important to be able to

More information

Subverting the C++ compiler. Gabriel Laskar

Subverting the C++ compiler. Gabriel Laskar Subverting the C++ compiler Gabriel Laskar What this talk is about? Take control back from the compiler Force the compiler to do what you want You are not compiler s slave! Sometimes

More information

The I2C controller supports only Master function. It supports the 7-bits/10-bits addressing mode and support general call address. The maximum clock f

The I2C controller supports only Master function. It supports the 7-bits/10-bits addressing mode and support general call address. The maximum clock f Chapter 52 I2C Interface 52.1 Overview The Inter-Integrated Circuit (I2C) is a two wired (SCL and SDA), bi-directional serial bus that provides an efficient and simple method of information exchange between

More information

Memory Mapped I/O. Michael Jantz. Prasad Kulkarni. EECS 678 Memory Mapped I/O Lab 1

Memory Mapped I/O. Michael Jantz. Prasad Kulkarni. EECS 678 Memory Mapped I/O Lab 1 Memory Mapped I/O Michael Jantz Prasad Kulkarni EECS 678 Memory Mapped I/O Lab 1 Introduction This lab discusses various techniques user level programmers can use to control how their process' logical

More information

Changelog. Virtual Memory (2) exercise: 64-bit system. exercise: 64-bit system

Changelog. Virtual Memory (2) exercise: 64-bit system. exercise: 64-bit system Changelog Virtual Memory (2) Changes made in this version not seen in first lecture: 21 November 2017: 1-level example: added final answer of memory value, not just location 21 November 2017: two-level

More information

Intel P The course that gives CMU its Zip! P6/Linux Memory System November 1, P6 memory system. Review of abbreviations

Intel P The course that gives CMU its Zip! P6/Linux Memory System November 1, P6 memory system. Review of abbreviations 15-213 The course that gives CMU its Zip! P6/Linux ory System November 1, 01 Topics P6 address translation Linux memory management Linux fault handling memory mapping Intel P6 Internal Designation for

More information

CS 241 Data Organization Binary

CS 241 Data Organization Binary CS 241 Data Organization Binary Brooke Chenoweth University of New Mexico Fall 2017 Combinations and Permutations In English we use the word combination loosely, without thinking if the order of things

More information

Recitation 8: Tshlab + VM

Recitation 8: Tshlab + VM Recitation 8: Tshlab + VM Instructor: TAs 1 Outline Labs Signals IO Virtual Memory 2 TshLab and MallocLab TshLab due Tuesday MallocLab is released immediately after Start early Do the checkpoint first,

More information

ADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C

ADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C Data Sheet 10 Channel Analog to Digital Converter with output via I 2 C Introduction Many microcontroller projects involve the use of sensors like Accelerometers, Gyroscopes, Temperature, Compass, Barometric,

More information

USB-MPC with MDIO and I2C support User s Manual

USB-MPC with MDIO and I2C support User s Manual USB-MPC with MDIO and I2C support User s Manual Future Designs, Inc. Your Development Partner FDI Information in this document is provided solely to enable the use of Future Designs, Inc. products. FDI

More information