TP3 bosio@lirmm.fr.

Slides:



Advertisements
Présentations similaires
How to play Divide class into 2 teams Teams take in turns to pick a number, read the word aloud & identify the word class and decide if they want to keep.
Advertisements

The Present Perfect Tense
QCA Unit 16 – Scène de Plage (part 3d – a class poem) Jo Rhys-Jones - Kingswear Primary School 2008.
QCA Unit 16 – Scène de Plage (part 3a – extended sentences) Jo Rhys-Jones - Kingswear Primary School 2008.
Before you start: If prompted (or if there is a security warning at the top of the screen) you must click enable macros which will make this powerpoint.
QCA Unit 16 – Scène de Plage Jo Rhys-Jones - Kingswear Primary School 2008 Warm – up revision of colours.
OTB Analog module: Input configuration with TSX PREMIUM (TSXCPP110)
Status report SOLEIL April 2008
The Passé Composé Tense Look at the following 3 sentences. Ali played football. Ali did play football. Ali has played football. What do they have in.
Finger Rhyme 6 Summer Term Module 6 Culturethèque-ifru2013 May not be copied for commercial purposes.
The Passé Composé Tense Describes past actions, things that happened in the past (yesterday, last Monday, last year, last summer, two hours ago, etc.
Ce document est la propriété d ’EADS CCR ; il ne peut être communiqué à des tiers et/ou reproduit sans l’autorisation préalable écrite d ’EADS CCR et son.
Etudes statistiques de la puissance des ondes à la magnétopause et à son voisinage (Traversées Cluster). Corrélations avec la pression du vent solaire.
C’est combien ? Les euros
Database irregular verbs Français II. database This is a year-long project. Slide 3 gives students a sample of how to set up the database. Excel (or other.
What is a compound tense? It is also called “Complex Tense”. It is a tense that requires an “Auxiliary Verb” in addition to the Ending at the end of the.
Overview %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%
1 Programmation en C++ Marianne Morris. 2 Intro générale à la programmation On a déjà étudié le langage assembleur Langage de bas niveau Meilleur que.
Le Passé Composé - avec “avoir” Look at the following 3 sentences. Ali played football yesterday They have visited Paris 3 times We did tidy the bedroom.
The Passé Composé Tense Look at the following 3 sentences. Ali played football. Ali did play football. Ali has played football. What do they have in.
Structures de données et algorithmes – TP7 Maria-Iuliana Dascalu, PhD
FRANÇAIS DEUX Deux pronoms dans la même phrase.  It is possible to use both a direct and an indirect object pronoun in the same sentence.
EU Joint Programming: Belgium Expert meeting on EU Joint Programming April 26th 2013.
The Passé Composé Regular verbs with avoir Look at the following 3 sentences. Ali played football yesterday They have visited Paris 3 times We did tidy.
The Passé Composé Objective: to talk about things we have done on a visit to explain what events happened to speak and write about events in the past.
What’s the weather like?. Look at the verb phrase fait-il above Turn it around and you have il fait The phrase Il fait can be used to describe lots of.
© and ® 2011 Vista Higher Learning, Inc.7B.2-1 Point de départ You’ve learned how the passé composé can express past actions. Now you’ll learn another.
The imparfait can be translated several ways into English.
Méthodes d’utilisabilité pour les nuls Alain Désilets National Research Council of Canada.
An Introduction To Two – Port Networks The University of Tennessee Electrical and Computer Engineering Knoxville, TN wlg.
Traffic Sign Recognition Jacob Carlson Sean St. Onge Advisor: Dr. Thomas L. Stewart.
The cancer is a deadly disease, it starts when cells in the body begin to grow out of control and multiply too much. Cancer can start almost anywhere in.
Template Provided By Genigraphics – Replace This Text With Your Title John Smith, MD 1 ; Jane Doe, PhD 2 ; Frederick Smith, MD, PhD 1,2 1.
UBC104 Embedded Systems Review: Interrupts & Timers.
TP4
The Passé Composé Tense
The Passé Composé Tense
Overview %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DMA MEMMEM Enoncé polling novembre 2014 J.Callot L.Piedfort.
CONNAÎTRE ET SAVOIR les notes.
JC2 - LE PASSE COMPOSE with ÊTRE
Quantum Computer A New Era of Future Computing Ahmed WAFDI ??????
Les questions et les mots interrogatifs
The Passé Composé Tense
Exercices: Système d’Information
Top right corner for field-mark, customer or partner logotypes. See Best practice for example. Slide title 40 pt Slide subtitle 24 pt Text 24 pt Bullets.
The Passé Composé Tense
Efficacité des algorithmes
LEARNING OBJECTIVE: RECOGNISE NUMBERS UP TO 100 IN FRENCH
Introductory slide to see what pupils remember.
Nous allons apprendre…
® Microsoft Office 2010 Exploring the Basics of Microsoft Windows 7.
Roots of a Polynomial: Root of a polynomial is the value of the independent variable at which the polynomial intersects the horizontal axis (the function.
4.1.5 Je peux parler de mon avenir
1-1 Introduction to ArcGIS Introductions Who are you? Any GIS background? What do you want to get out of the class?
Question formation In English, you can change a statement into a question by adding a helping verb (auxiliary): does he sing? do we sing? did they sing.
Global Challenge Capteur de nuit Leçon 2.
What’s the weather like?
POWERPOINT PRESENTATION FOR INTRODUCTION TO THE USE OF SPSS SOFTWARE FOR STATISTICAL ANALISYS BY AMINOU Faozyath UIL/PG2018/1866 JANUARY 2019.
© by Vista Higher Learning, Inc. All rights reserved.4A.1-1 Point de départ In Leçon 1A, you saw a form of the verb aller (to go) in the expression ça.
The Passé Composé Tense
Paul Eluard Dans Paris.
5S Methodology How to implement "5S" and get extraordinary results.
1 Sensitivity Analysis Introduction to Sensitivity Analysis Introduction to Sensitivity Analysis Graphical Sensitivity Analysis Graphical Sensitivity Analysis.
Le Passé Composé (Perfect Tense)
Lequel The Last Part.
How do you say I like and I don’t like in French???
Journée 2ème: introduction
TP RC.
Transcription de la présentation:

TP3 bosio@lirmm.fr

TP3 Objectif Comprendre la différence entre l'attente active de périphériques (polling) et la gestion de périphériques par interruptions La périphérique est le USER BUTTON disponible sur la carte Gestion avec interruption: on génère une interruption matérielle a chaque « click » du bouton Gestion en polling: on boucle tant qu’on a un « click » du bouton

Nested Vector Interrupt Controller NVIC Up to 81 interrupts (depends on the STM32 device type) Programmable priority level of 0-15 A higher level corresponds to a lower priority, so level 0 is the highest interrupt priority Dynamic reprioritization of interrupts Grouping of priority values into group priority and sub- priority fields Interrupt tail-chaining An external Non-maskable interrupt (NMI)

Nested Vector Interrupt Controller NVIC

Nested Vector Interrupt Controller NVIC

Connecting button to interrupt * *STM32F3_refmanual_DM00043574.pdf

Connecting button to interrupt

USER BUTTON Look at the file stm32f3_discovery.h It is located in the stm32f3discovery_hal_lib It contains two functions to manage the button: void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode); It specifies the way the button is used (Button_Mode) GPIO : polling EXTI : interrupt

USER BUTTON (INTERRUPT) void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode) { if (ButtonMode == BUTTON_MODE_EXTI) /* Configure Button pin as input with External interrupt */ GPIO_InitStruct.Pin = BUTTON_PIN[Button]; // GPIO_PIN_0 GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; HAL_GPIO_Init(BUTTON_PORT[Button], &GPIO_InitStruct); /* Enable and set Button EXTI Interrupt to the lowest priority */ HAL_NVIC_SetPriority((IRQn_Type)(BUTTON_IRQn[Button]), 0x0F, 0x00); HAL_NVIC_EnableIRQ((IRQn_Type)(BUTTON_IRQn[Button])); }

USER BUTTON (Polling) uint32_t BSP_PB_GetState (Button_TypeDef Button); It returns the state of the button 0 the button is not pressed 1 the button is pressed

Interrupt If the button is programmed to be used with interrupt, the ISR is the void EXTI0_IRQHandler(void) { … LL_EXTI_ClearFlag_0_31 (LL_EXTI_LINE_0); /* mandatory function to clear the Interrupt request */ }

Exercice 1 Allumer le LED7 quand on appui sur le bouton. Si on appui une deuxième fois le LED7 s’étaint Version a) utiliser l’interruption Version b) utiliser le polling (boucle pour tester l’état du bouton

Exercice 2 Ecrire un programme qui peut faire au même temps: Clignoter le LED4 (freq = 2Hz) Allumer le LED7 quand on appuie sur le bouton. Si on appuie une deuxième fois le LED7 s’éteint

Exercice 3 Ecrire un programme pour faire Clignoter le LED4 à 2Hz Reconnaitre un double-click du bouton et donc modifier la freq à 10Hz Second click doit arriver avant 1s du premiere click Un deuxième double-click modifier le freq à 2Hz