Lizard Labs Peripheral Reflex System

Slides:



Advertisements
Similar presentations
Jordan Barry Victor Brzeski
Advertisements

STM32F10x Changes v1.5 to 1.4 HD added Changes v1.4 to 1.3
Sistemi Elettronici Programmabili13-1 MULTI OSC + CLOCK FILTER LVD POWER SUPPLY CONTROL 8 BIT CORE ALU PROGRAM MEMORY RAM I2CI2C PORT A SPI PORT B 16-BIT.
Oscilloscope Watch Teardown. Agenda History and General overview Hardware design: – Block diagram and general overview – Choice of the microcontroller.
Introduction of Holtek HT-46 series MCU
Initial Position Orientation Tracking System (IPOTS) Group Members: Keiichi McGuireHenry Pham Marc TakamoriScott Spiro.
PWM ON SAMSUNG's S3C2410X. Building Embedded LINUX SYSTEM Outline SAMSUNG's S3C2410X components CLOCK & POWER MANAGEMENT PWM TIMER I/O PORTS Finally Project.
HT46 A/D Type MCU Series Data Memory (Byte) Program Memory HT46R22 (OTP) HT46C22 (Mask) 2Kx Kx16 4Kx HT46R23 (OTP) HT46C23 (Mask) HT46R24.
Asst. Prof. Dr. Alper ŞİŞMAN
BLDC MOTOR SPEED CONTROL USING EMBEDDED PROCESSOR
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
ATMEL AVR 8 bit RISC MICROCONTROLLERS
Hardware Overview Net+ARM – Well Suited for Embedded Ethernet
Microcontrollers, Basics Fundamentals of Designing with Microcontrollers 16 January 2012 Jonathan A. Titus.
MSP432™ MCUs Training Part 5: Digital Peripherals
NetBurner MOD 5282 Network Development Kit MCF 5282 Integrated ColdFire 32 bit Microcontoller 2 DB-9 connectors for serial I/O supports: RS-232, RS-485,
Arduino Josh Villbrandt February 4, Digital Circuits Analog versus digital – What’s the difference? – How to represent an analog signal in a computer?
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 Clock Generator.
System Clocks.
A Few Words From Dilbert
Clock Options and Sleep Modes. Clock Sources Flash Fuse bits can be programmed to choose one of the following Clock sources: 1. External RC Osc. f = 1/(3RC).
AT91 Embedded Peripherals
Embedded System Design Laboratory October 11, 2002Stanford University - EE281 Lecture #4#1 Lecture #4 Outline Announcements Project Proposal AVR Processor.
Typical Microcontroller Purposes
2006 Chapter-1 L3: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill, Inc. 1 Hardware Elements in the Embedded.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
00000-A Rev a Renesas Electronics Corporation ©2010. Renesas Electronics Corporation, All rights reserved. 2015/10/19 V850 Architecture Overview.
MICROPROCESSOR AND MICRO CONTROLLER LAB
Microprocessor-based Systems
MICROPROCESSOR AND MICRO CONTROLLER
ELE22MIC Lecture 18 The AVR Sleep Modes The ATMEGA128’s Timer System
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Alexei SemenovGeneric Digitizer Generic Digitizer 10MHZ 16 bit 6U VME Board.
Embedded Network Interface (ENI). What is ENI? Embedded Network Interface Originally called DPO (Digital Product Option) card Printer without network.
TI MSP430 MICROCONTROLLERS BY ADITYA PATHAK. THE MSP FAMILY Ultra-low power; mixed signal processors Widely used in battery operated applications Uses.
AT91 Products Overview. 2 The Atmel AT91 Series of microcontrollers are based upon the powerful ARM7TDMI processor. Atmel has taken these cores, added.
Network and Systems Laboratory nslab.ee.ntu.edu.tw.
THE EMBEDDED SYSTEMDESIGN PROCESS. W HAT IS A PS O C M IXED S IGNAL D EVICE ? P rogrammable S ystem o n C hip PSoC combines: the familiarity of a microcontroller.
NET+OS 6.1 Training. GPIO APIs NET+OS 6.1 Signal Multiplexing System tradeoffs affecting pin count at design-time. –NS9750 unit cost reduced by conserving.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Memory Organisation & Modes of Operations By: Prof. Mahendra B. Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41
ECET 340 Entire Course (All ilabs and Homework) For more classes visit ECET 340 Week 1 HomeWork 1 ECET 340 Week 1 iLab 1 ECET 340.
Components of a typical full-featured microcontroller.
HOME SECURITY USING WIRELESS SENSOR NETWORK UNDER THE ESTEEMED GUIDANCE OF: P.RAMESH D.SIVOM( ) KANMANI RAVI( ) B.SAI RAJSEKHAR( )
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 AD converter.
박 유 진.  2.4-GHz IEEE Compliant RF Transceiver  Excellent Receiver Sensitivity ( -97dBm) and Robustness to Interference  6-mm × 6-mm QFN40.
STM32 및 개발보드 소개 Jang Hyunsung Embedded Systems Lab. Dept. of CSE, PNU
Case Study #1 Microcontroller System. What is a microcontroller? A microcontroller can be considered a self-contained system with a processor, memory.
Lizard Labs Peripheral Reflex System
Cypress Roadmap: Platform PSoC®
Study Report for Brushless DC (BLDC) Motors
CC2430 module Jinho Son Real-Time System Lab.
Microcontrollers, Basics Fundamentals of Designing with Microcontrollers 16 January 2012 Jonathan A. Titus.
Networked Embedded Systems Sachin Katti
Refer to Chapter 5 in the reference book
NS Training Hardware.
Programming Microcontroller
Interrupt and Exception Programming
Subject Name: Microcontroller Subject Code: 10ES42
ECET 340 Competitive Success/snaptutorial.com
ECET 340 Education for Service-- snaptutorial.com.
ECET 340 Teaching Effectively-- snaptutorial.com.
Introduction to Microprocessors and Microcontrollers
Lecture 3 - Instruction Set - Al
Introduction to the Atmel AVR Butterfly
Journey: Introduction to Embedded Systems
Getting the Most Out of Low Power MCUs
Designing with ARM Cortex-M4 (and a Real Dev Board)
AVR – ATmega103(ATMEL) Architecture & Summary
Presentation transcript:

Lizard Labs Peripheral Reflex System EFM32 Training Module Welcome to Lizard Labs. This training module will explain how the Peripheral Reflex System allows EFM32 peripherals to interact without CPU involvement. 1

Peripheral Reflex System Z Z Z Z Brain Z Z The Peripheral Reflex System, PRS, is inspired by human body reflexes. The most well-known example of a human body reflex is the knee-jerk reflex; when a certain area below the patella is striked with a small hammer, the leg muscle contracts instantly and involuntarily. This happens automatically because the sensory nerve is connected directly to the motor nerve in the spine, without going the longer way through the brain. Such reflexes enables the body to react faster when in danger. Sensor nerve Motor nerve Spine

Peripheral Reflex System Z Z Z Z ARM Cortex-M3 processor Z Z Peripheral reflex system On an EFM32, the Peripheral Reflex System offers a direct connection between peripherals without having to involve the CPU. As with human body reflexes, the peripheral reflex system enables autonomous, fast and predictable interaction between peripherals. EFM32 microcontrollers feature a wide selection of low energy peripherals. Each peripheral is designed to operate autonomously, so the CPU core can be put to sleep while the peripherals perform their tasks. To let the CPU to spend even more time in sleep, the Peripheral Reflex System enables one peripheral to trigger an action on another peripheral without involving the CPU. Timer ADC

Reflexes versus Interrupts ARM Cortex-M3 processor CPU IRQ Energy Efficient Peripherals The traditional approach for interaction between peripherals is to use interrupts. This example shows a Timer that is used to trigger periodic A/D conversions. Once per sample period the timer will generate an interrupt to the CPU. Then the CPU must process the interrupt and start the A/D converter. Timer ADC

Reflexes versus Interrupts ARM Cortex-M3 processor UNKNOWN DELAY CPU IRQ Energy Efficient Peripherals There are several disadvantages with this method. If the CPU is asleep, it must wake up before the interrupt request can be processed. And if the CPU is already busy processing another interrupt, it must finish this before the timer interrupt can be processed. In both these situations, the latency from the timer to the conversion is affected, resulting in jitter on the sampling frequency. Timer ADC

Reflexes versus Interrupts ARM Cortex-M3 processor HIGH CURRENT CONSUMPTION UNKNOWN DELAY CPU IRQ Energy Efficient Peripherals It is also important to acknowledge that a large portion of the active mode current consumption is caused by the CPU. Timer ADC

Reflexes versus Interrupts Z Z Z ARM Cortex-M3 processor Energy Efficient Peripherals When using the Peripheral Reflex System, the Timer can be configured to trigger the A/D conversion directly. When leaving the CPU out of the control loop, predictable timing is ensured. It also allows the CPU to be put to sleep. Timer PRS ADC

Peripheral Reflex System Z Z Z ARM Cortex-M3 processor PRS Producers PRS Consumers Timer GPIO ADC DAC Peripheral Reflex System The Peripheral Reflex System can be seen as a network of wires that are routed between the different EFM32 peripherals. When using PRS, two peripherals connect to the same PRS channel; one as a producer, the other as a consumer. A PRS producer is a peripheral that generates a reflex signal on a PRS channel, while a PRS consumer is a peripheral that is triggered by a reflex signal. Each PRS channel selects one producer, while several consumers can be set up to listen to the same PRS channel. The number of PRS channels varies between 4 to 12 on the different device families. Some peripherals can act as both a producer and a consumer, enabling complex PRS event chains to be set up.

Peripheral Reflex System Z Z Z ARM Cortex-M3 processor PRS Producers PRS Consumers Timer GPIO ADC DAC Peripheral Reflex System Here, two typical examples of PRS usage are shown. As you can see, a TIMER is configured as a producer on one of the PRS channels, while the A/D converter is a consumer on the same channel. The timer is generating PRS trigger signals with a fixed interval so the A/D converter can sample at a given rate. On another PRS channel, a GPIO input pin is configured as producer and the D/A converter as a consumer. This enables the EFM32 to output a voltage when triggered by an external event such as a trigger signal from another chip, a button push, or similar. PRS enables both these tasks to happen simultaneously, while the CPU is sleeping. Now, let us take a closer look at how PRS is used to trigger periodic A/D conversions while the EFM32 is in Energy Mode 1.

Example: ADC samples to RAM Peripheral Reflex System Timer Start conversion Overflow Analog input DMA Request Direct Memory Access RAM Sample done Sample Data Sample Data The TIMER peripheral is selected as producer on one of the PRS channels. The TIMER is set up to count forever, and wrap around each time it overflows. On every overflow, a PRS trigger pulse is generated. The A/D converter is configured to perform one sample of a single channel when triggered by PRS. PRS can also trigger a scan mode conversion. In scan mode, a pre-configured set of ADC channels are sampled. This example also shows that DMA can be used to store the sampled data in memory. It is important to understand that data transfers are not part of the Peripheral Reflex System, but that DMA can be a very useful complement to PRS when data transfers are required. If DMA is not used, the ADC must wake the CPU with an interrupt when sample data is ready. A software example that shows how to implement this without DMA support is found in application note AN0021 Analog to Digital Converter, while AN0013 on DMA shows how to implement this with DMA support. ----------------------------------------------------- Configuration summary: PRS: - Producer on channel #n: TIMER overflow TIMER: no PRS setup ADC: - Sample on PRS channel #n Additionally, DMA is configured to move ADC data to RAM when available. SW Examples: AN0021 Analog to Digital Converter AN0013 Direct Memory Access

Example: Pulse width measurement Timer Analog input + Reset & Start Peripheral Reflex System ACMP Capture Overflow Reference - Reference Analog input Reflex signal Another example of PRS use is pulse width measurement. Here the analog comparator and the timer is used to measure pulse length of analog pulses, or pulses with a lower voltage level than the EFM32. The analog comparator output is high as long as the input is higher than the reference input. Routing the ACMP output to the TIMER through PRS, allows using the TIMER to measure how long the input signal is higher than the reference level. This example shows several of the advanced features of PRS. The PRS output of the ACMP is a level signal that is high as long as the ACMP output is high. The TIMER is configured to take different actions on the positive and the negative edge. When the PRS signal goes high, the counter is reset and starts counting from zero. When the PRS signal goes low, the timer counter value is captured. All this can be done while the EFM32 is in Energy Mode 1 and the CPU is sleeping. When the timer value is captured, an interrupt can wake the CPU so the measured length can be processed. Optionally, DMA can be used to fetch the captured data, enabling a measurement of several pulses between each wake-up. An example of how to implement this in software is found in application note AN0025 on the Peripheral Reflex System. ----------------------------------------------------- Configuration summary: PRS: Producer = ACMP Edge detector = off Timer: Input = PRS (select prs channel) Input positive edge: reset&start Input negative edge: stop Compare/Capture channel: capture mode Compare/Capture channel: capture on input negative edge TIMER Count value Reset & Start Capture Reset & Start Capture SW Example: AN0025 Peripheral Reflex System

Peripherals With PRS Support Reflex Producers ACMP ADC DAC GPIO RTC BURTC TIMER LETIMER LESENSE UART USART USB VCMP Reflex Consumers ADC DAC TIMER LESENSE UART USART PCNT Reflex signals This list presents the wide selection of peripherals that can be used with the Peripheral Reflex System. As you can see from these two quite long lists, PRS gives you lots of options for configuring direct interaction between different peripherals. To further extend the usability of PRS, most producers can trigger reflex channels on different events. One example of this is the USART, which can generate a reflex signal on one channel when a byte transmitted, and a PRS signal on another channel when a byte is received. Consumers can also perform different tasks when triggered by a reflex signal. The previous slides have already mentioned the ADC, where one reflex channel can trigger a single channel conversion and another reflex channel can trigger a scan mode conversion. The TIMER was also used as an example of a peripheral that can do different tasks on the positive and negative edge of a reflex signal.

PRS and Energy Modes ARM Cortex-M processor ARM Cortex-M3 processor CPU and Memory Clock Management Energy Management ARM Cortex-M processor ARM Cortex-M3 processor Memory Protection Unit Memory Protection Unit Embedded Trace Macrocell High Freq Crystal Osc High Freq RC Osc Voltage Regulator Voltage Comparator Low Freq Crystal Osc Low Freq RC Osc Brown-out Detector Power-on Reset Flash Program Memory RAM Memory Debug Interface DMA Ultra Low Freq RC Osc Auxiliary RC Osc Auxiliary RC Osc Back-up Power Domain Peripheral Reflex System 32-bit bus Serial Interfaces I/O Ports Timers and Triggers Analog Modules Security USART UART External Bus Interface TFT Driver Timer/ Counter Low Energy Sensor IF ADC DAC AES Accelerator Low Energy Timer Real Time Counter Low Energy UART I2C External Interrupt General Purpose I/O LCD Controller Operational Amplifier PRS supports operation down to Energy Mode 3. When using PRS in low energy modes, it is important to acknowledge that both the producer and consumer peripheral must be able to operate in the wanted energy mode. For the example where periodic A/D conversions are triggered by the TIMER, we can read from the color codes in the block diagram that both peripherals are available down to EM1, so in this case any lower energy mode can not be used. The pulse width measurement example uses the analog comparator and the TIMER. The ACMP is available down to EM3, but since the TIMER requires Energy Mode 1 or above, the EFM32 can not use any energy mode below Energy Mode 1. Pulse Counter Watchdog Timer USB Pin Reset GPIO Wake-up Analog Comparator Backup RTC Available down to: EM0 Run Mode EM1 Sleep EM2 Deep Sleep EM3 Stop Mode EM4 Shutoff Mode

PRS API in emlib Use emlib API functions to configure PRS: 1) Configure producer as normal 2) Configure PRS channel 3) Configure consumer Emlib includes API functions for configuring PRS. When emlib is used, three simple steps will configure PRS: The first step is to configure the producer peripheral as normal. Just as if PRS is not used. Then, use the PRS API functions to configure the PRS channel itself as well as selecting a producer signal. Note that PRS_SourceSignalSet takes two input values to select the producer. One parameter to select the producer itself, and one to select a specific reflex signal from the chosen peripheral. Please refer to the device family reference manual for a complete list of reflex signals. The last step is to configure the consumer peripheral. Use the consumer peripheral API to select which reflex channel a consumer monitors, and which actions to take when a reflex signal is detected.

PRS on external pins PRS channels 0-3 can be routed to external pins Useful when debugging autonomous peripherals Timer ADC PRS output on some channels can be routed to external pins. This allows PRS to connect to external devices. Routing a PRS signal to an external pin can also be a useful tool when debugging peripherals that operate while the CPU is asleep. In this example, two PRS channels are used. The first channel is used by the TIMER to trigger the A/D converter, and the second channel is used by the A/D converter to signal when the conversion is done. When routing these two PRS channels to external pins, you can connect an instrument and measure the delay from a sample is triggered to the sample is done.

PRS advantages Summary Energy Efficient Autonomous Highly configurable Fast Predictable latency Highly configurable Finally, let us summarize the advantages of PRS quickly: PRS saves energy by letting peripherals communicate directly while the CPU is sleeping. PRS offers fast and predictable timing between peripherals. And PRS is highly configurable.

www.silabs.com Thank you for watching this lesson from Lizard Labs. For more information, go to the Silicon Labs website. 17