Introduction aux Systèmes Embarqués 2015

Page 1 sur 12Lecteur de document UniversityLib

Introduction aux Systèmes Embarqués 2015

Embedded Systems · exam

Browse all électronique et automatique documents

Complément annexe+ Errata/ Examen Introduction aux Systèmes Embarqués 2015

Exercice 2 - page 4 - 1ère ligne: Amine➔ Taha

Problème - question 2 - page 6: But ton_ ini t _out ➔ But ton_ ini t in

Problème - question 4 - page 7: GPIO ReadOutputDataBi t ➔ GPIO _ReadinputDataBi

t

Problème question 8: Speaker_generate (uint8 t son)

Complément annexe:

typedef struct

{

-

-

Advertisement

uint32 t EXTI Line;

EXTIMode_TypeDef EXTI_Mode;

EXTITrigger_TypeDef:EXTI_Trigger;

FunctionalState /EXTI_LineCmd;

EXTI InitTypeDef;

typedef enum

{

EXTI_Trigger Rising = 0x08,

EXTI_Trigger_Falling = 0xOC,

EXTI_Trigger_Rising_Falling = OxlO

EXTITrigger TypeDef;

typedef enum

{

EXTI Mode_Interrupt = 0x0O,

-

EXTI Mode Event = 0x04

Advertisement

EXTIMode TypeDef;

-

#define EXTI Linelü

#define EXTI Linell

#define EXTI Line12

#define EXTI Linel3

#define EXTI Line14

#define EXTI Linel5

((uint32_t)0x00100)

( (uint32_t)0x008O0)

( (uint32_t)0x01000)

((uint32_t)0x02000)

( (uint32_t)0x04000)

( (uint32 t)0x08000)

void EXTI Init(EXTI InitTypeDef* EXTI InitStruct);

/**

Advertisement

  • -

.

  • @brief Selects the _g_rIQ.__p_in _µsed a . EX_TJ.,. Line.

GPIO_PortSource: selects the GPIO port to be used as

source for EXTI lines. This pararneter can be

GPIO PortSourceGPIOx where x can be (A .. G). @pararn

GPIO=PinSource: sp·e- ifies the EXTI line to be

configured. This parameter can be 1 GPIO_PinSour.cex where

x can be (0 .. 15). */

void GPIO_EXTILineConfig(uint8 t GPIO PortSource,

uint8 t GPIO PinSource) ;

typedef struct

{

• uint8 t NVIC IRQChannel;

uint8_t NVIC_IRQChannelPreemptionPriority;

/* This

Advertisement

parameter can be a value

between 0 and 15 as described in the table @ref

NVIC_Priority_Table */

r uint8 t NVIC_IRQChannelSubPriority;

parameter can be a value

between 0 and 15 as described in the table @ref

NVIC_Priority_Table */

0 FunctionalState NVIC_IRQChannelCmd;

parameter can be set either to ENABLE or DISABLE */

} NVIC InitTypeDef;

/* This

/* This

void NVIC_Init(NVIC InitTypeDef* NVIC InitStruct);