Resolution merge conflict
This commit is contained in:
commit
f0159d79d5
21 changed files with 3771 additions and 30 deletions
16
Drivers/Inc/ADC.h
Normal file
16
Drivers/Inc/ADC.h
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#ifndef MYADC_H
|
||||||
|
#define MYADC_H
|
||||||
|
#include "stm32f10x.h"
|
||||||
|
#include "GPIO.h"
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
ADC_TypeDef * ADC;
|
||||||
|
char channel;
|
||||||
|
} MyADC_Struct_TypeDef;
|
||||||
|
|
||||||
|
void MyADC_init(MyADC_Struct_TypeDef* myADC);
|
||||||
|
void MyADC_start_conversion(ADC_TypeDef* ADC);
|
||||||
|
void MyADC_ActiveIT (ADC_TypeDef * ADC, char Prio, void (*IT_function)(void));
|
||||||
|
int MyADC_result(ADC_TypeDef* ADC);
|
||||||
|
#endif
|
|
@ -1,12 +1,6 @@
|
||||||
#ifndef MYGPIO_H
|
#ifndef MYGPIO_H
|
||||||
#define MYGPIO_H
|
#define MYGPIO_H
|
||||||
#include "stm32f10x.h"
|
#include "stm32f10x.h"
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
GPIO_TypeDef * GPIO ;
|
|
||||||
char GPIO_Pin ; // numero de 0 a 15
|
|
||||||
char GPIO_Conf ; // voir ci dessous
|
|
||||||
} MyGPIO_Struct_TypeDef ;
|
|
||||||
|
|
||||||
#define In_Floating 0x4 // a completer
|
#define In_Floating 0x4 // a completer
|
||||||
#define In_PullDown 0x8
|
#define In_PullDown 0x8
|
||||||
|
@ -17,10 +11,20 @@ typedef struct
|
||||||
#define AltOut_Ppull 0xA // deux derniers bits pour regler la vitesse max (due a la valeur de res) (01:10MHz 10:2MHz 11:50MHz)
|
#define AltOut_Ppull 0xA // deux derniers bits pour regler la vitesse max (due a la valeur de res) (01:10MHz 10:2MHz 11:50MHz)
|
||||||
#define AltOut_OD 0xD // deux derniers bits pour regler la vitesse max (due a la valeur de res) (01:10MHz 10:2MHz 11:50MHz)
|
#define AltOut_OD 0xD // deux derniers bits pour regler la vitesse max (due a la valeur de res) (01:10MHz 10:2MHz 11:50MHz)
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
GPIO_TypeDef * GPIO ;
|
||||||
|
char GPIO_Pin ; // numero de 0 a 15
|
||||||
|
char GPIO_Conf ; // voir ci dessous
|
||||||
|
} MyGPIO_Struct_TypeDef ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void MyGPIO_Init ( MyGPIO_Struct_TypeDef * GPIOStructPtr ) ;
|
void MyGPIO_Init ( MyGPIO_Struct_TypeDef * GPIOStructPtr ) ;
|
||||||
int MyGPIO_Read ( GPIO_TypeDef * GPIO , char GPIO_Pin ) ; // renvoie 0 ou autre chose different de 0
|
int MyGPIO_Read ( GPIO_TypeDef * GPIO , char GPIO_Pin ) ; // renvoie 0 ou autre chose different de 0
|
||||||
void MyGPIO_Set ( GPIO_TypeDef * GPIO , char GPIO_Pin ) ;
|
void MyGPIO_Set ( GPIO_TypeDef * GPIO , char GPIO_Pin ) ;
|
||||||
void MyGPIO_Reset ( GPIO_TypeDef * GPIO , char GPIO_Pin ) ;
|
void MyGPIO_Reset ( GPIO_TypeDef * GPIO , char GPIO_Pin ) ;
|
||||||
void MyGPIO_Toggle ( GPIO_TypeDef * GPIO , char GPIO_Pin ) ;
|
void MyGPIO_Toggle ( GPIO_TypeDef * GPIO , char GPIO_Pin ) ;
|
||||||
|
void MyGPIO_ActiveIT (GPIO_TypeDef * GPIO, char GPIO_Pin, char Prio, void (*IT_function)(void))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
10
Drivers/Inc/UART.h
Normal file
10
Drivers/Inc/UART.h
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#ifndef MYUART_H
|
||||||
|
#define MYUART_H
|
||||||
|
#include "stm32f10x.h"
|
||||||
|
|
||||||
|
void MyUART_init(void);
|
||||||
|
void UART_send(char data);
|
||||||
|
void MyUART_ActiveIT(char Prio, void (*IT_function)(void));
|
||||||
|
char UART_receive(void);
|
||||||
|
|
||||||
|
#endif
|
191
Drivers/Src/ADC.c
Normal file
191
Drivers/Src/ADC.c
Normal file
|
@ -0,0 +1,191 @@
|
||||||
|
#include "ADC.h"
|
||||||
|
|
||||||
|
void (*adc1_ptr_func)(void);
|
||||||
|
void (*adc2_ptr_func)(void);
|
||||||
|
|
||||||
|
void MyADC_init(MyADC_Struct_TypeDef* myADC)
|
||||||
|
{
|
||||||
|
MyGPIO_Struct_TypeDef Port_ADC;
|
||||||
|
switch (myADC->channel)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
Port_ADC.GPIO=GPIOA;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=0;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
Port_ADC.GPIO=GPIOA;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=1;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
Port_ADC.GPIO=GPIOA;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=2;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Port_ADC.GPIO=GPIOA;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=3;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
Port_ADC.GPIO=GPIOA;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=4;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
Port_ADC.GPIO=GPIOA;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=5;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
Port_ADC.GPIO=GPIOA;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=6;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
Port_ADC.GPIO=GPIOA;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=7;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
Port_ADC.GPIO=GPIOB;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=0;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
Port_ADC.GPIO=GPIOB;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=1;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
Port_ADC.GPIO=GPIOC;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=0;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
Port_ADC.GPIO=GPIOC;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=1;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
Port_ADC.GPIO=GPIOC;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=2;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
Port_ADC.GPIO=GPIOC;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=3;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
Port_ADC.GPIO=GPIOC;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=4;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
Port_ADC.GPIO=GPIOC;
|
||||||
|
Port_ADC.GPIO_Conf=In_Analog;
|
||||||
|
Port_ADC.GPIO_Pin=5;
|
||||||
|
MyGPIO_Init(&Port_ADC);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(myADC->ADC==ADC1)
|
||||||
|
{
|
||||||
|
RCC->APB2ENR |= RCC_APB2ENR_ADC1EN; // validation horloge ADC1
|
||||||
|
RCC->CFGR |= RCC_CFGR_ADCPRE_DIV6; // passage de l'horloge ADC1 à 12MHz
|
||||||
|
ADC1->CR2|= ADC_CR2_ADON; // démarrage ADC1
|
||||||
|
ADC1->SQR1&= ADC_SQR1_L; // fixe le nombre de conversion à 1
|
||||||
|
ADC1->SQR3|= myADC->channel; // indique la voie à convertir
|
||||||
|
ADC1->CR2 |= ADC_CR2_CAL; // début de la calibration
|
||||||
|
while ((ADC1->CR2 & ADC_CR2_CAL)); // attente de la fin de la calibration
|
||||||
|
}
|
||||||
|
else if(myADC->ADC==ADC2)
|
||||||
|
{
|
||||||
|
RCC->APB2ENR |= RCC_APB2ENR_ADC1EN; // validation horloge ADC1
|
||||||
|
RCC->CFGR |= RCC_CFGR_ADCPRE_DIV6; // passage de l'horloge ADC1 à 12MHz
|
||||||
|
ADC2->CR2|= ADC_CR2_ADON; // démarrage ADC1
|
||||||
|
ADC2->SQR1&= ADC_SQR1_L; // fixe le nombre de conversion à 1
|
||||||
|
ADC2->SQR3|= myADC->channel; // indique la voie à convertir
|
||||||
|
ADC2->CR2 |= ADC_CR2_CAL; // début de la calibration
|
||||||
|
while ((ADC2->CR2 & ADC_CR2_CAL)); // attente de la fin de la calibration
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MyADC_start_conversion(ADC_TypeDef* ADC)
|
||||||
|
{
|
||||||
|
if(ADC==ADC1)
|
||||||
|
{
|
||||||
|
ADC1->CR2 |= ADC_CR2_ADON; // lancement de la conversion
|
||||||
|
}
|
||||||
|
else if(ADC==ADC2)
|
||||||
|
{
|
||||||
|
ADC2->CR2 |= ADC_CR2_ADON; // lancement de la conversion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ADC1_2_IRQHandler(void)
|
||||||
|
{
|
||||||
|
if(ADC1->SR & ~ADC_SR_EOC)
|
||||||
|
{
|
||||||
|
ADC1->SR &= ~ADC_SR_EOC ;
|
||||||
|
if(adc1_ptr_func!=0)
|
||||||
|
{
|
||||||
|
(*adc1_ptr_func)();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(ADC2->SR & ~ADC_SR_EOC)
|
||||||
|
{
|
||||||
|
ADC2->SR &= ~ADC_SR_EOC ;
|
||||||
|
if(adc2_ptr_func!=0)
|
||||||
|
{
|
||||||
|
(*adc2_ptr_func)();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyADC_ActiveIT (ADC_TypeDef * ADC, char Prio, void (*IT_function)(void))
|
||||||
|
{
|
||||||
|
ADC->CR1 |= ADC_CR1_EOCIE;
|
||||||
|
if(ADC==ADC1)
|
||||||
|
{
|
||||||
|
adc1_ptr_func=IT_function;
|
||||||
|
}
|
||||||
|
else if(ADC==ADC2)
|
||||||
|
{
|
||||||
|
adc2_ptr_func=IT_function;
|
||||||
|
}
|
||||||
|
NVIC->ISER[0] |= 0x01<<ADC1_2_IRQn;
|
||||||
|
NVIC->IP[ADC1_2_IRQn] |= Prio << 4;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int MyADC_result(ADC_TypeDef* ADC)
|
||||||
|
{
|
||||||
|
if (ADC==ADC1)
|
||||||
|
{
|
||||||
|
return ADC1->DR & ~((0x0F) << 12); // retour de la conversion
|
||||||
|
}
|
||||||
|
else if(ADC==ADC2)
|
||||||
|
{
|
||||||
|
return ADC2->DR & ~((0x0F) << 12); // retour de la conversion
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -1,5 +1,8 @@
|
||||||
#include "GPIO.h"
|
#include "GPIO.h"
|
||||||
|
|
||||||
|
void (*gpio_ptr_func)(void);
|
||||||
|
// interruption NVIC p197 RM8 et ISER p119
|
||||||
|
|
||||||
void MyGPIO_Init ( MyGPIO_Struct_TypeDef * GPIOStructPtr )
|
void MyGPIO_Init ( MyGPIO_Struct_TypeDef * GPIOStructPtr )
|
||||||
{
|
{
|
||||||
if(GPIOStructPtr->GPIO==GPIOA)
|
if(GPIOStructPtr->GPIO==GPIOA)
|
||||||
|
@ -68,3 +71,40 @@ void MyGPIO_Toggle ( GPIO_TypeDef * GPIO , char GPIO_Pin )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MyGPIO_ActiveIT (GPIO_TypeDef * GPIO, char GPIO_Pin, char Prio, void (*IT_function)(void)) //p210
|
||||||
|
{
|
||||||
|
RCC->APB2ENR |= RCC_APB2ENR_AFIOEN;
|
||||||
|
if (GPIO==GPIOA)
|
||||||
|
{
|
||||||
|
AFIO->EXTICR[0] |= (AFIO_EXTICR1_EXTI0_PA << (4*GPIO_Pin));
|
||||||
|
}
|
||||||
|
else if (GPIO==GPIOB)
|
||||||
|
{
|
||||||
|
AFIO->EXTICR[0] |= (AFIO_EXTICR1_EXTI0_PB << (4*GPIO_Pin));
|
||||||
|
}
|
||||||
|
else if (GPIO==GPIOC)
|
||||||
|
{
|
||||||
|
AFIO->EXTICR[0] |= (AFIO_EXTICR1_EXTI0_PC << (4*GPIO_Pin));
|
||||||
|
}
|
||||||
|
else if (GPIO==GPIOD)
|
||||||
|
{
|
||||||
|
AFIO->EXTICR[0] |= (AFIO_EXTICR1_EXTI0_PD << (4*GPIO_Pin));
|
||||||
|
}
|
||||||
|
// manque ligne pour activer l'interruption
|
||||||
|
NVIC->ISER[0] |= 0x01<<EXTI0_IRQn;
|
||||||
|
NVIC->IP[EXTI0_IRQn] |= Prio << 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EXTI0_IRQHandler(void)
|
||||||
|
{
|
||||||
|
if (EXTI->RTSR) //on test si RTSR est différent de 0
|
||||||
|
{
|
||||||
|
if(gpio_ptr_func!=0)
|
||||||
|
{
|
||||||
|
(*gpio_ptr_func)();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EXTI->RTSR &=0xFFFFF;
|
||||||
|
|
||||||
|
//reset flag
|
||||||
|
}
|
||||||
|
|
|
@ -5,7 +5,10 @@ debordement stock
|
||||||
fixer val prescaler+ autoreload(equivalent resolution)
|
fixer val prescaler+ autoreload(equivalent resolution)
|
||||||
demarrage timer => CEN=1*/
|
demarrage timer => CEN=1*/
|
||||||
|
|
||||||
void (*ptr_func)(void);
|
void (*tim_ptr1_func)(void);
|
||||||
|
void (*tim_ptr2_func)(void);
|
||||||
|
void (*tim_ptr3_func)(void);
|
||||||
|
void (*tim_ptr4_func)(void);
|
||||||
|
|
||||||
void MyTimer_Base_Init ( MyTimer_Struct_TypeDef * Timer)
|
void MyTimer_Base_Init ( MyTimer_Struct_TypeDef * Timer)
|
||||||
{
|
{
|
||||||
|
@ -90,61 +93,70 @@ void MyPWM_Duty (TIM_TypeDef * Timer,char Channel, unsigned short CRR )
|
||||||
void MyTimer_ActiveIT (TIM_TypeDef * Timer, char Prio, void (*IT_function)(void))
|
void MyTimer_ActiveIT (TIM_TypeDef * Timer, char Prio, void (*IT_function)(void))
|
||||||
{
|
{
|
||||||
int num_tim;
|
int num_tim;
|
||||||
ptr_func=IT_function;
|
|
||||||
Timer->DIER |= 0x01;
|
Timer->DIER |= 0x01;
|
||||||
if(Timer==TIM1)
|
if(Timer==TIM1)
|
||||||
{
|
{
|
||||||
num_tim=TIM1_UP_IRQn;
|
num_tim=TIM1_UP_IRQn;
|
||||||
|
tim_ptr1_func=IT_function;
|
||||||
}
|
}
|
||||||
else if(Timer==TIM2)
|
else if(Timer==TIM2)
|
||||||
{
|
{
|
||||||
num_tim=TIM2_IRQn;
|
num_tim=TIM2_IRQn;
|
||||||
|
tim_ptr2_func=IT_function;
|
||||||
}
|
}
|
||||||
else if(Timer==TIM3)
|
else if(Timer==TIM3)
|
||||||
{
|
{
|
||||||
num_tim=TIM3_IRQn;
|
num_tim=TIM3_IRQn;
|
||||||
|
tim_ptr3_func=IT_function;
|
||||||
}
|
}
|
||||||
else if(Timer==TIM4)
|
else if(Timer==TIM4)
|
||||||
{
|
{
|
||||||
num_tim=TIM4_IRQn;
|
num_tim=TIM4_IRQn;
|
||||||
|
tim_ptr4_func=IT_function;
|
||||||
}
|
}
|
||||||
NVIC->ISER[0] |= 0x01<<num_tim;
|
NVIC->ISER[0] |= 0x01<<num_tim;
|
||||||
NVIC->IP[num_tim] |= Prio << 4;
|
NVIC->IP[num_tim] |= Prio << 4;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void init_encoder_timer(TIM_TypeDef * Timer) //voir page 391
|
||||||
|
{
|
||||||
|
Timer->SMCR = 0x1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void TIM2_IRQHandler (void)
|
void TIM2_IRQHandler (void)
|
||||||
{
|
{
|
||||||
if(ptr_func!=0)
|
if(tim_ptr2_func!=0)
|
||||||
{
|
{
|
||||||
(*ptr_func)();
|
(*tim_ptr2_func)();
|
||||||
}
|
}
|
||||||
TIM2->SR &= ~(1<<0) ;
|
TIM2->SR &= ~(1<<0) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TIM3_IRQHandler (void)
|
void TIM3_IRQHandler (void)
|
||||||
{
|
{
|
||||||
if(ptr_func!=0)
|
if(tim_ptr3_func!=0)
|
||||||
{
|
{
|
||||||
(*ptr_func)();
|
(*tim_ptr3_func)();
|
||||||
}
|
}
|
||||||
TIM3->SR &= ~(1<<0) ;
|
TIM3->SR &= ~(1<<0) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TIM4_IRQHandler (void)
|
void TIM4_IRQHandler (void)
|
||||||
{
|
{
|
||||||
if(ptr_func!=0)
|
if(tim_ptr4_func!=0)
|
||||||
{
|
{
|
||||||
(*ptr_func)();
|
(*tim_ptr4_func)();
|
||||||
}
|
}
|
||||||
TIM4->SR &= ~(1<<0) ;
|
TIM4->SR &= ~(1<<0) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TIM1_UP_IRQHandler (void) // à vérifier
|
void TIM1_UP_IRQHandler (void)
|
||||||
{
|
{
|
||||||
if(ptr_func!=0)
|
if(tim_ptr1_func!=0)
|
||||||
{
|
{
|
||||||
(*ptr_func)();
|
(*tim_ptr1_func)();
|
||||||
}
|
}
|
||||||
TIM1->SR &= ~(1<<0) ;
|
TIM1->SR &= ~(1<<0) ;
|
||||||
}
|
}
|
||||||
|
|
65
Drivers/Src/UART.c
Normal file
65
Drivers/Src/UART.c
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
#include "UART.h"
|
||||||
|
#include "GPIO.h"
|
||||||
|
|
||||||
|
void (*uart_rx_ptr_func)(void);
|
||||||
|
char buffer[1000]={0};
|
||||||
|
|
||||||
|
void MyUART_init(void) // que pour du 9600 bauds
|
||||||
|
{
|
||||||
|
MyGPIO_Struct_TypeDef RX_pin;
|
||||||
|
MyGPIO_Struct_TypeDef TX_pin;
|
||||||
|
|
||||||
|
RX_pin.GPIO = GPIOA;
|
||||||
|
RX_pin.GPIO_Conf = In_Floating;
|
||||||
|
RX_pin.GPIO_Pin = 10;
|
||||||
|
|
||||||
|
TX_pin.GPIO = GPIOA;
|
||||||
|
TX_pin.GPIO_Conf = AltOut_Ppull;
|
||||||
|
TX_pin.GPIO_Pin = 9;
|
||||||
|
|
||||||
|
MyGPIO_Init (&RX_pin);
|
||||||
|
MyGPIO_Init (&TX_pin);
|
||||||
|
|
||||||
|
RCC->APB2ENR |= RCC_APB2ENR_USART1EN; // validation horloge USART1
|
||||||
|
USART1->CR1 |= USART_CR1_UE; // Activation de l'USART
|
||||||
|
USART1->CR1 &= ~USART_CR1_M; // Choix d'une taille de 8 bits de données
|
||||||
|
USART1->CR2 &= USART_CR2_STOP; // Choix d'un seul bit de stop
|
||||||
|
USART1->BRR |= 468 << 4; // Fixe le baud rate à 9600bps //valeurs trouvé p804
|
||||||
|
USART1->BRR |= 75; // Fixe le baud rate à 9600bps
|
||||||
|
USART1->CR1 |= USART_CR1_RE;
|
||||||
|
USART1->CR1 |= USART_CR1_TE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UART_send(char data)
|
||||||
|
{
|
||||||
|
while(!(USART1->SR & USART_SR_TXE))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
USART1->DR = data; // Ecriture de la donnée dans le registre DR
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyUART_ActiveIT(char Prio, void (*IT_function)(void))
|
||||||
|
{
|
||||||
|
//activer l'interrupt sur reception
|
||||||
|
USART1->CR1 |= USART_CR1_RXNEIE;
|
||||||
|
uart_rx_ptr_func=IT_function;
|
||||||
|
NVIC->ISER[1] |= 0x01<<(USART1_IRQn%32);
|
||||||
|
NVIC->IP[USART1_IRQn] |= Prio << 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
void USART1_IRQHandler()
|
||||||
|
{
|
||||||
|
if (USART1->SR & USART_SR_RXNE)
|
||||||
|
{
|
||||||
|
USART1->SR &= ~USART_SR_RXNE;
|
||||||
|
if(uart_rx_ptr_func!=0)
|
||||||
|
{
|
||||||
|
(*uart_rx_ptr_func)();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
char UART_receive()
|
||||||
|
{
|
||||||
|
return USART1->DR; // on recupere dans DR
|
||||||
|
}
|
8
Projet_voile/Includes/Girouette.h
Normal file
8
Projet_voile/Includes/Girouette.h
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#ifndef MYGIROUETTE_H
|
||||||
|
#define MYGIROUETTE_H
|
||||||
|
#include "stm32f10x.h"
|
||||||
|
#include "GPIO.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
1828
Projet_voile/RTE/Device/STM32F103RB/RTE_Device.h.base@1.1.2
Normal file
1828
Projet_voile/RTE/Device/STM32F103RB/RTE_Device.h.base@1.1.2
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,308 @@
|
||||||
|
;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
|
||||||
|
;* File Name : startup_stm32f10x_md.s
|
||||||
|
;* Author : MCD Application Team
|
||||||
|
;* Version : V3.5.1
|
||||||
|
;* Date : 08-September-2021
|
||||||
|
;* Description : STM32F10x Medium Density Devices vector table for MDK-ARM
|
||||||
|
;* toolchain.
|
||||||
|
;* This module performs:
|
||||||
|
;* - Set the initial SP
|
||||||
|
;* - Set the initial PC == Reset_Handler
|
||||||
|
;* - Set the vector table entries with the exceptions ISR address
|
||||||
|
;* - Configure the clock system
|
||||||
|
;* - Branches to __main in the C library (which eventually
|
||||||
|
;* calls main()).
|
||||||
|
;* After Reset the CortexM3 processor is in Thread mode,
|
||||||
|
;* priority is Privileged, and the Stack is set to Main.
|
||||||
|
;* <<< Use Configuration Wizard in Context Menu >>>
|
||||||
|
;*******************************************************************************
|
||||||
|
;*
|
||||||
|
;* Copyright (c) 2011 STMicroelectronics.
|
||||||
|
;* All rights reserved.
|
||||||
|
;*
|
||||||
|
;* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
;* in the root directory of this software component.
|
||||||
|
;* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
;
|
||||||
|
;*******************************************************************************
|
||||||
|
|
||||||
|
; Amount of memory (in bytes) allocated for Stack
|
||||||
|
; Tailor this value to your application needs
|
||||||
|
; <h> Stack Configuration
|
||||||
|
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
|
||||||
|
Stack_Size EQU 0x00000400
|
||||||
|
|
||||||
|
AREA STACK, NOINIT, READWRITE, ALIGN=3
|
||||||
|
Stack_Mem SPACE Stack_Size
|
||||||
|
__initial_sp
|
||||||
|
|
||||||
|
|
||||||
|
; <h> Heap Configuration
|
||||||
|
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
|
||||||
|
Heap_Size EQU 0x00000200
|
||||||
|
|
||||||
|
AREA HEAP, NOINIT, READWRITE, ALIGN=3
|
||||||
|
__heap_base
|
||||||
|
Heap_Mem SPACE Heap_Size
|
||||||
|
__heap_limit
|
||||||
|
|
||||||
|
PRESERVE8
|
||||||
|
THUMB
|
||||||
|
|
||||||
|
|
||||||
|
; Vector Table Mapped to Address 0 at Reset
|
||||||
|
AREA RESET, DATA, READONLY
|
||||||
|
EXPORT __Vectors
|
||||||
|
EXPORT __Vectors_End
|
||||||
|
EXPORT __Vectors_Size
|
||||||
|
|
||||||
|
__Vectors DCD __initial_sp ; Top of Stack
|
||||||
|
DCD Reset_Handler ; Reset Handler
|
||||||
|
DCD NMI_Handler ; NMI Handler
|
||||||
|
DCD HardFault_Handler ; Hard Fault Handler
|
||||||
|
DCD MemManage_Handler ; MPU Fault Handler
|
||||||
|
DCD BusFault_Handler ; Bus Fault Handler
|
||||||
|
DCD UsageFault_Handler ; Usage Fault Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD SVC_Handler ; SVCall Handler
|
||||||
|
DCD DebugMon_Handler ; Debug Monitor Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD PendSV_Handler ; PendSV Handler
|
||||||
|
DCD SysTick_Handler ; SysTick Handler
|
||||||
|
|
||||||
|
; External Interrupts
|
||||||
|
DCD WWDG_IRQHandler ; Window Watchdog
|
||||||
|
DCD PVD_IRQHandler ; PVD through EXTI Line detect
|
||||||
|
DCD TAMPER_IRQHandler ; Tamper
|
||||||
|
DCD RTC_IRQHandler ; RTC
|
||||||
|
DCD FLASH_IRQHandler ; Flash
|
||||||
|
DCD RCC_IRQHandler ; RCC
|
||||||
|
DCD EXTI0_IRQHandler ; EXTI Line 0
|
||||||
|
DCD EXTI1_IRQHandler ; EXTI Line 1
|
||||||
|
DCD EXTI2_IRQHandler ; EXTI Line 2
|
||||||
|
DCD EXTI3_IRQHandler ; EXTI Line 3
|
||||||
|
DCD EXTI4_IRQHandler ; EXTI Line 4
|
||||||
|
DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
|
||||||
|
DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2
|
||||||
|
DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3
|
||||||
|
DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4
|
||||||
|
DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5
|
||||||
|
DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6
|
||||||
|
DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7
|
||||||
|
DCD ADC1_2_IRQHandler ; ADC1_2
|
||||||
|
DCD USB_HP_CAN1_TX_IRQHandler ; USB High Priority or CAN1 TX
|
||||||
|
DCD USB_LP_CAN1_RX0_IRQHandler ; USB Low Priority or CAN1 RX0
|
||||||
|
DCD CAN1_RX1_IRQHandler ; CAN1 RX1
|
||||||
|
DCD CAN1_SCE_IRQHandler ; CAN1 SCE
|
||||||
|
DCD EXTI9_5_IRQHandler ; EXTI Line 9..5
|
||||||
|
DCD TIM1_BRK_IRQHandler ; TIM1 Break
|
||||||
|
DCD TIM1_UP_IRQHandler ; TIM1 Update
|
||||||
|
DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation
|
||||||
|
DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
|
||||||
|
DCD TIM2_IRQHandler ; TIM2
|
||||||
|
DCD TIM3_IRQHandler ; TIM3
|
||||||
|
DCD TIM4_IRQHandler ; TIM4
|
||||||
|
DCD I2C1_EV_IRQHandler ; I2C1 Event
|
||||||
|
DCD I2C1_ER_IRQHandler ; I2C1 Error
|
||||||
|
DCD I2C2_EV_IRQHandler ; I2C2 Event
|
||||||
|
DCD I2C2_ER_IRQHandler ; I2C2 Error
|
||||||
|
DCD SPI1_IRQHandler ; SPI1
|
||||||
|
DCD SPI2_IRQHandler ; SPI2
|
||||||
|
DCD USART1_IRQHandler ; USART1
|
||||||
|
DCD USART2_IRQHandler ; USART2
|
||||||
|
DCD USART3_IRQHandler ; USART3
|
||||||
|
DCD EXTI15_10_IRQHandler ; EXTI Line 15..10
|
||||||
|
DCD RTCAlarm_IRQHandler ; RTC Alarm through EXTI Line
|
||||||
|
DCD USBWakeUp_IRQHandler ; USB Wakeup from suspend
|
||||||
|
__Vectors_End
|
||||||
|
|
||||||
|
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||||
|
|
||||||
|
AREA |.text|, CODE, READONLY
|
||||||
|
|
||||||
|
; Reset handler
|
||||||
|
Reset_Handler PROC
|
||||||
|
EXPORT Reset_Handler [WEAK]
|
||||||
|
IMPORT __main
|
||||||
|
IMPORT SystemInit
|
||||||
|
LDR R0, =SystemInit
|
||||||
|
BLX R0
|
||||||
|
LDR R0, =__main
|
||||||
|
BX R0
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; Dummy Exception Handlers (infinite loops which can be modified)
|
||||||
|
|
||||||
|
NMI_Handler PROC
|
||||||
|
EXPORT NMI_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
HardFault_Handler\
|
||||||
|
PROC
|
||||||
|
EXPORT HardFault_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
MemManage_Handler\
|
||||||
|
PROC
|
||||||
|
EXPORT MemManage_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
BusFault_Handler\
|
||||||
|
PROC
|
||||||
|
EXPORT BusFault_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
UsageFault_Handler\
|
||||||
|
PROC
|
||||||
|
EXPORT UsageFault_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
SVC_Handler PROC
|
||||||
|
EXPORT SVC_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
DebugMon_Handler\
|
||||||
|
PROC
|
||||||
|
EXPORT DebugMon_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
PendSV_Handler PROC
|
||||||
|
EXPORT PendSV_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
SysTick_Handler PROC
|
||||||
|
EXPORT SysTick_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
Default_Handler PROC
|
||||||
|
|
||||||
|
EXPORT WWDG_IRQHandler [WEAK]
|
||||||
|
EXPORT PVD_IRQHandler [WEAK]
|
||||||
|
EXPORT TAMPER_IRQHandler [WEAK]
|
||||||
|
EXPORT RTC_IRQHandler [WEAK]
|
||||||
|
EXPORT FLASH_IRQHandler [WEAK]
|
||||||
|
EXPORT RCC_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI0_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI1_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI2_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI3_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI4_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel1_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel2_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel3_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel4_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel5_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel6_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel7_IRQHandler [WEAK]
|
||||||
|
EXPORT ADC1_2_IRQHandler [WEAK]
|
||||||
|
EXPORT USB_HP_CAN1_TX_IRQHandler [WEAK]
|
||||||
|
EXPORT USB_LP_CAN1_RX0_IRQHandler [WEAK]
|
||||||
|
EXPORT CAN1_RX1_IRQHandler [WEAK]
|
||||||
|
EXPORT CAN1_SCE_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI9_5_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM1_BRK_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM1_UP_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM1_TRG_COM_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM1_CC_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM2_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM3_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM4_IRQHandler [WEAK]
|
||||||
|
EXPORT I2C1_EV_IRQHandler [WEAK]
|
||||||
|
EXPORT I2C1_ER_IRQHandler [WEAK]
|
||||||
|
EXPORT I2C2_EV_IRQHandler [WEAK]
|
||||||
|
EXPORT I2C2_ER_IRQHandler [WEAK]
|
||||||
|
EXPORT SPI1_IRQHandler [WEAK]
|
||||||
|
EXPORT SPI2_IRQHandler [WEAK]
|
||||||
|
EXPORT USART1_IRQHandler [WEAK]
|
||||||
|
EXPORT USART2_IRQHandler [WEAK]
|
||||||
|
EXPORT USART3_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI15_10_IRQHandler [WEAK]
|
||||||
|
EXPORT RTCAlarm_IRQHandler [WEAK]
|
||||||
|
EXPORT USBWakeUp_IRQHandler [WEAK]
|
||||||
|
|
||||||
|
WWDG_IRQHandler
|
||||||
|
PVD_IRQHandler
|
||||||
|
TAMPER_IRQHandler
|
||||||
|
RTC_IRQHandler
|
||||||
|
FLASH_IRQHandler
|
||||||
|
RCC_IRQHandler
|
||||||
|
EXTI0_IRQHandler
|
||||||
|
EXTI1_IRQHandler
|
||||||
|
EXTI2_IRQHandler
|
||||||
|
EXTI3_IRQHandler
|
||||||
|
EXTI4_IRQHandler
|
||||||
|
DMA1_Channel1_IRQHandler
|
||||||
|
DMA1_Channel2_IRQHandler
|
||||||
|
DMA1_Channel3_IRQHandler
|
||||||
|
DMA1_Channel4_IRQHandler
|
||||||
|
DMA1_Channel5_IRQHandler
|
||||||
|
DMA1_Channel6_IRQHandler
|
||||||
|
DMA1_Channel7_IRQHandler
|
||||||
|
ADC1_2_IRQHandler
|
||||||
|
USB_HP_CAN1_TX_IRQHandler
|
||||||
|
USB_LP_CAN1_RX0_IRQHandler
|
||||||
|
CAN1_RX1_IRQHandler
|
||||||
|
CAN1_SCE_IRQHandler
|
||||||
|
EXTI9_5_IRQHandler
|
||||||
|
TIM1_BRK_IRQHandler
|
||||||
|
TIM1_UP_IRQHandler
|
||||||
|
TIM1_TRG_COM_IRQHandler
|
||||||
|
TIM1_CC_IRQHandler
|
||||||
|
TIM2_IRQHandler
|
||||||
|
TIM3_IRQHandler
|
||||||
|
TIM4_IRQHandler
|
||||||
|
I2C1_EV_IRQHandler
|
||||||
|
I2C1_ER_IRQHandler
|
||||||
|
I2C2_EV_IRQHandler
|
||||||
|
I2C2_ER_IRQHandler
|
||||||
|
SPI1_IRQHandler
|
||||||
|
SPI2_IRQHandler
|
||||||
|
USART1_IRQHandler
|
||||||
|
USART2_IRQHandler
|
||||||
|
USART3_IRQHandler
|
||||||
|
EXTI15_10_IRQHandler
|
||||||
|
RTCAlarm_IRQHandler
|
||||||
|
USBWakeUp_IRQHandler
|
||||||
|
|
||||||
|
B .
|
||||||
|
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
ALIGN
|
||||||
|
|
||||||
|
;*******************************************************************************
|
||||||
|
; User Stack and Heap initialization
|
||||||
|
;*******************************************************************************
|
||||||
|
IF :DEF:__MICROLIB
|
||||||
|
|
||||||
|
EXPORT __initial_sp
|
||||||
|
EXPORT __heap_base
|
||||||
|
EXPORT __heap_limit
|
||||||
|
|
||||||
|
ELSE
|
||||||
|
|
||||||
|
IMPORT __use_two_region_memory
|
||||||
|
EXPORT __user_initial_stackheap
|
||||||
|
|
||||||
|
__user_initial_stackheap
|
||||||
|
|
||||||
|
LDR R0, = Heap_Mem
|
||||||
|
LDR R1, =(Stack_Mem + Stack_Size)
|
||||||
|
LDR R2, = (Heap_Mem + Heap_Size)
|
||||||
|
LDR R3, = Stack_Mem
|
||||||
|
BX LR
|
||||||
|
|
||||||
|
ALIGN
|
||||||
|
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
END
|
||||||
|
|
1092
Projet_voile/RTE/Device/STM32F103RB/system_stm32f10x.c.update@1.0.1
Normal file
1092
Projet_voile/RTE/Device/STM32F103RB/system_stm32f10x.c.update@1.0.1
Normal file
File diff suppressed because it is too large
Load diff
13
Projet_voile/Sources/Girouette.c
Normal file
13
Projet_voile/Sources/Girouette.c
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#include "Girouette.h"
|
||||||
|
|
||||||
|
int bordage(void){
|
||||||
|
/*MyGPIO_Struct_TypeDef signalA = (GPIOC, 6, In_PullDown);
|
||||||
|
MyGPIO_Struct_TypeDef signalB = (GPIOC, 7, In_PullDown);
|
||||||
|
MyGPIO_Struct_TypeDef signalI = (GPIOC, 8, In_PullDown);
|
||||||
|
|
||||||
|
MyGPIO_Init(&signalA);
|
||||||
|
MyGPIO_Init(&signalB);
|
||||||
|
MyGPIO_Init(&signalI);*/
|
||||||
|
|
||||||
|
|
||||||
|
}
|
35
Projet_voile/Sources/Principal.c
Normal file
35
Projet_voile/Sources/Principal.c
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#include "stm32f10x.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "GPIO.h"
|
||||||
|
#include "UART.h"
|
||||||
|
|
||||||
|
char MyChar;
|
||||||
|
|
||||||
|
//MyGPIO_Struct_TypeDef PA5; //PA5 LED
|
||||||
|
//MyGPIO_Struct_TypeDef PC13; //PC13 Bouton
|
||||||
|
|
||||||
|
void UART_RX_IT (void)
|
||||||
|
{
|
||||||
|
MyChar=UART_receive();
|
||||||
|
}
|
||||||
|
|
||||||
|
int main ( void )
|
||||||
|
{
|
||||||
|
MyGPIO_Struct_TypeDef myGPIO;
|
||||||
|
myGPIO.GPIO = GPIOA;
|
||||||
|
myGPIO.GPIO_Conf = Out_Ppull;
|
||||||
|
myGPIO.GPIO_Pin = 5;
|
||||||
|
|
||||||
|
MyGPIO_Init (&myGPIO);
|
||||||
|
|
||||||
|
MyUART_init();
|
||||||
|
MyUART_ActiveIT(1, &UART_RX_IT); //mode permet d'activer soit l'interruption sur TX
|
||||||
|
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,11 @@
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Key>DLGDARM</Key>
|
<Key>DLGDARM</Key>
|
||||||
|
<<<<<<< HEAD:Projet_DevDrivers/TP1.uvoptx
|
||||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=873,10,1294,437,1)(121=-1,-1,-1,-1,0)(122=1345,565,1766,992,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=862,435,1456,1186,0)(132=870,423,1464,1174,1)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
|
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=873,10,1294,437,1)(121=-1,-1,-1,-1,0)(122=1345,565,1766,992,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=862,435,1456,1186,0)(132=870,423,1464,1174,1)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
|
||||||
|
=======
|
||||||
|
<Name>(1010=984,109,1360,666,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=1084,185,1505,612,0)(121=-1,-1,-1,-1,0)(122=939,341,1360,768,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=335,17,929,768,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=1177,417,1625,831,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=298,17,901,768,0)(151=-1,-1,-1,-1,0)</Name>
|
||||||
|
>>>>>>> Noel_Olivier:Projet_voile/TP1.uvoptx
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
|
@ -138,14 +142,63 @@
|
||||||
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM))</Name>
|
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM))</Name>
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
</TargetDriverDllRegistry>
|
</TargetDriverDllRegistry>
|
||||||
<Breakpoint/>
|
<Breakpoint>
|
||||||
|
<Bp>
|
||||||
|
<Number>0</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>15</LineNumber>
|
||||||
|
<EnabledFlag>1</EnabledFlag>
|
||||||
|
<Address>0</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
|
<Filename>.\Sources\Principal.c</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
|
</Breakpoint>
|
||||||
|
<WatchWindow1>
|
||||||
|
<Ww>
|
||||||
|
<count>0</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>mode</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>1</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>ADC</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>2</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>MyChar</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>3</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>RX_pin</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>4</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>RX_pin</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>5</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>MyChar</ItemText>
|
||||||
|
</Ww>
|
||||||
|
</WatchWindow1>
|
||||||
<Tracepoint>
|
<Tracepoint>
|
||||||
<THDelay>0</THDelay>
|
<THDelay>0</THDelay>
|
||||||
</Tracepoint>
|
</Tracepoint>
|
||||||
<DebugFlag>
|
<DebugFlag>
|
||||||
<trace>0</trace>
|
<trace>0</trace>
|
||||||
<periodic>1</periodic>
|
<periodic>1</periodic>
|
||||||
<aLwin>1</aLwin>
|
<aLwin>0</aLwin>
|
||||||
<aCover>0</aCover>
|
<aCover>0</aCover>
|
||||||
<aSer1>0</aSer1>
|
<aSer1>0</aSer1>
|
||||||
<aSer2>0</aSer2>
|
<aSer2>0</aSer2>
|
||||||
|
@ -302,7 +355,7 @@
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Key>DLGTARM</Key>
|
<Key>DLGTARM</Key>
|
||||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=318,388,739,793,0)(121=1101,403,1522,808,0)(122=1281,393,1702,798,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
|
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=318,388,739,793,0)(121=1101,403,1522,808,0)(122=1281,393,1702,798,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=1106,213,1554,627,1)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
|
@ -334,7 +387,7 @@
|
||||||
<periodic>1</periodic>
|
<periodic>1</periodic>
|
||||||
<aLwin>1</aLwin>
|
<aLwin>1</aLwin>
|
||||||
<aCover>0</aCover>
|
<aCover>0</aCover>
|
||||||
<aSer1>0</aSer1>
|
<aSer1>1</aSer1>
|
||||||
<aSer2>0</aSer2>
|
<aSer2>0</aSer2>
|
||||||
<aPa>0</aPa>
|
<aPa>0</aPa>
|
||||||
<viewmode>1</viewmode>
|
<viewmode>1</viewmode>
|
||||||
|
@ -346,7 +399,7 @@
|
||||||
<AscS3>0</AscS3>
|
<AscS3>0</AscS3>
|
||||||
<aSer3>0</aSer3>
|
<aSer3>0</aSer3>
|
||||||
<eProf>0</eProf>
|
<eProf>0</eProf>
|
||||||
<aLa>1</aLa>
|
<aLa>0</aLa>
|
||||||
<aPa1>0</aPa1>
|
<aPa1>0</aPa1>
|
||||||
<AscS4>0</AscS4>
|
<AscS4>0</AscS4>
|
||||||
<aSer4>0</aSer4>
|
<aSer4>0</aSer4>
|
||||||
|
@ -403,8 +456,8 @@
|
||||||
<tvExp>1</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>..\DRIVERS\Src\GPIO.c</PathWithFileName>
|
<PathWithFileName>.\Sources\Girouette.c</PathWithFileName>
|
||||||
<FilenameWithoutPath>GPIO.c</FilenameWithoutPath>
|
<FilenameWithoutPath>Girouette.c</FilenameWithoutPath>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<bShared>0</bShared>
|
<bShared>0</bShared>
|
||||||
</File>
|
</File>
|
||||||
|
@ -415,11 +468,47 @@
|
||||||
<tvExp>1</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>..\DRIVERS\Src\GPIO.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>GPIO.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>1</GroupNumber>
|
||||||
|
<FileNumber>4</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>1</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>..\Drivers\Src\TIMER.c</PathWithFileName>
|
<PathWithFileName>..\Drivers\Src\TIMER.c</PathWithFileName>
|
||||||
<FilenameWithoutPath>TIMER.c</FilenameWithoutPath>
|
<FilenameWithoutPath>TIMER.c</FilenameWithoutPath>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<bShared>0</bShared>
|
<bShared>0</bShared>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>1</GroupNumber>
|
||||||
|
<FileNumber>5</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>1</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>..\Drivers\Src\ADC.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>ADC.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>1</GroupNumber>
|
||||||
|
<FileNumber>6</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>1</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>..\Drivers\Src\UART.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>UART.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Group>
|
<Group>
|
|
@ -33,8 +33,8 @@
|
||||||
<SLE66CMisc></SLE66CMisc>
|
<SLE66CMisc></SLE66CMisc>
|
||||||
<SLE66AMisc></SLE66AMisc>
|
<SLE66AMisc></SLE66AMisc>
|
||||||
<SLE66LinkerMisc></SLE66LinkerMisc>
|
<SLE66LinkerMisc></SLE66LinkerMisc>
|
||||||
<SFDFile>$$Device:STM32F103RB$SVD\STM32F103xx.svd</SFDFile>
|
<SFDFile>C:\Users\noelj\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\SVD\STM32F103xx.SFR</SFDFile>
|
||||||
<bCustSvd>0</bCustSvd>
|
<bCustSvd>1</bCustSvd>
|
||||||
<UseEnv>0</UseEnv>
|
<UseEnv>0</UseEnv>
|
||||||
<BinPath></BinPath>
|
<BinPath></BinPath>
|
||||||
<IncludePath></IncludePath>
|
<IncludePath></IncludePath>
|
||||||
|
@ -328,8 +328,8 @@
|
||||||
<uC99>0</uC99>
|
<uC99>0</uC99>
|
||||||
<uGnu>0</uGnu>
|
<uGnu>0</uGnu>
|
||||||
<useXO>0</useXO>
|
<useXO>0</useXO>
|
||||||
<v6Lang>3</v6Lang>
|
<v6Lang>1</v6Lang>
|
||||||
<v6LangP>3</v6LangP>
|
<v6LangP>5</v6LangP>
|
||||||
<vShortEn>1</vShortEn>
|
<vShortEn>1</vShortEn>
|
||||||
<vShortWch>1</vShortWch>
|
<vShortWch>1</vShortWch>
|
||||||
<v6Lto>0</v6Lto>
|
<v6Lto>0</v6Lto>
|
||||||
|
@ -339,7 +339,7 @@
|
||||||
<MiscControls></MiscControls>
|
<MiscControls></MiscControls>
|
||||||
<Define></Define>
|
<Define></Define>
|
||||||
<Undefine></Undefine>
|
<Undefine></Undefine>
|
||||||
<IncludePath>..\Drivers\Inc</IncludePath>
|
<IncludePath>..\Drivers\Inc;.\Includes</IncludePath>
|
||||||
</VariousControls>
|
</VariousControls>
|
||||||
</Cads>
|
</Cads>
|
||||||
<Aads>
|
<Aads>
|
||||||
|
@ -388,6 +388,11 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\Sources\Principal.c</FilePath>
|
<FilePath>.\Sources\Principal.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>Girouette.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>.\Sources\Girouette.c</FilePath>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>GPIO.c</FileName>
|
<FileName>GPIO.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
|
@ -398,6 +403,16 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\Drivers\Src\TIMER.c</FilePath>
|
<FilePath>..\Drivers\Src\TIMER.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>ADC.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\Drivers\Src\ADC.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>UART.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\Drivers\Src\UART.c</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -790,6 +805,11 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\Sources\Principal.c</FilePath>
|
<FilePath>.\Sources\Principal.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>Girouette.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>.\Sources\Girouette.c</FilePath>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>GPIO.c</FileName>
|
<FileName>GPIO.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
|
@ -800,6 +820,16 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\Drivers\Src\TIMER.c</FilePath>
|
<FilePath>..\Drivers\Src\TIMER.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>ADC.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\Drivers\Src\ADC.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>UART.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\Drivers\Src\UART.c</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
Loading…
Reference in a new issue