Compare commits

..

5 commits

Author SHA1 Message Date
f6fca418e1 rouli ok 2023-04-11 15:34:44 +02:00
c531decce4 IT_Roulis 2023-04-07 15:19:56 +02:00
06df73ad1a Accelerometre 2023-04-04 15:21:34 +02:00
0df040dc01 début rouli 2023-03-31 12:18:21 +02:00
1d8e1b3902 Debut_Weathercock 2023-03-27 16:43:03 +02:00
32 changed files with 753 additions and 4373 deletions

View file

@ -1,16 +0,0 @@
#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

View file

@ -0,0 +1,9 @@
#ifndef CAP_voilier_H
#define CAP_voilier_H
void My_cap(void);
void Madirection_IT (void);
#endif

View file

@ -1,8 +1,14 @@
#ifndef MYGPIO_H
#define MYGPIO_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
#define In_Floating 0x4 // a completer
#define In_PullDown 0x8
#define In_PullUp 0x9
#define In_Analog 0x0
@ -11,20 +17,10 @@
#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)
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 ) ;
int MyGPIO_Read ( GPIO_TypeDef * GPIO , char GPIO_Pin ) ; // renvoie 0 ou 1
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_Reset ( 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

View file

@ -18,7 +18,6 @@
#define READ 0x80
#define WRITE 0x00
/*************************************************************************************
===================== By Periph team INSA GEI 2022 ===========================
*************************************************************************************/
@ -47,7 +46,6 @@ et SPI2 par soudage jumper (SB).
SPI2_SCK PB13
SPI2_MISO PB14
SPI2_MOSI PB15

View file

@ -1,10 +1,5 @@
#ifndef ROULI_H
#define ROULI_H
#include "stm32f10x.h"
#include "GPIO.h"
#include "TIMER.h"
#include "MySPI.h"
#include "Timer.h"
typedef struct
{
@ -20,4 +15,3 @@ void rouli_GetAccel (XYZ * axe);
void rouli_IT_Bascule(void);
#endif

View file

@ -1,9 +1,7 @@
#ifndef MYTIMER_H
#define MYTIMER_H
#include "GPIO.h"
#include "stm32f10x.h"
typedef struct
{
TIM_TypeDef * Timer ; // TIM1 à TIM4
@ -40,8 +38,5 @@ void MyTimer_ActiveIT (TIM_TypeDef * Timer, char Prio, void (*IT_function)(void)
void MyPWM_init ( TIM_TypeDef * Timer,char Channel);
void MyPWM_Duty (TIM_TypeDef * Timer,char Channel, unsigned short CRR );
void init_encoder_timer(void (*IT_function)(void));
void Reset_degree (void);
int Read_CNT (void);
#endif

View file

@ -1,191 +0,0 @@
#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) // On initialise et configure le port correspondant au channel choisi
{
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_ADC2EN; // validation horloge ADC2
RCC->CFGR |= RCC_CFGR_ADCPRE_DIV6; // passage de l'horloge ADC1 à 12MHz
ADC2->CR2|= ADC_CR2_ADON; // démarrage ADC2
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) // On vérifie si le flag levé est celui de l'ADC1
{
ADC1->SR &= ~ADC_SR_EOC ; // On remet à 0 le drapeau
if(adc1_ptr_func!=0)
{
(*adc1_ptr_func)();
}
}
else if(ADC2->SR & ~ADC_SR_EOC) // On vérifie si le flag levé est celui de l'ADC2
{
ADC2->SR &= ~ADC_SR_EOC ; // On remet à 0 le drapeau
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; // On autorise l'interruption sur les ADC// On précise quelle interruption on souhaite activé// On précise la priorité qu'on souhaite lui donner
if(ADC==ADC1)
{
adc1_ptr_func=IT_function;
}
else if(ADC==ADC2)
{
adc2_ptr_func=IT_function;
}
NVIC->ISER[0] |= 0x01<<ADC1_2_IRQn; // On précise quelle interruption on souhaite activé
NVIC->IP[ADC1_2_IRQn] |= Prio << 4; // On précise la priorité qu'on souhaite lui donner
}
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;
}

View file

@ -1,13 +1,10 @@
#include "GPIO.h"
void (*gpio_ptr_func)(void);
// interruption NVIC p197 RM8 et ISER p119
void MyGPIO_Init ( MyGPIO_Struct_TypeDef * GPIOStructPtr )
{
if(GPIOStructPtr->GPIO==GPIOA)
if(GPIOStructPtr->GPIO==GPIOA)
{
RCC->APB2ENR |= RCC_APB2ENR_IOPAEN; // Active l'horloge pour
RCC->APB2ENR |= RCC_APB2ENR_IOPAEN;
}
else if (GPIOStructPtr->GPIO==GPIOB)
{
@ -22,41 +19,41 @@ void MyGPIO_Init ( MyGPIO_Struct_TypeDef * GPIOStructPtr )
RCC->APB2ENR |= RCC_APB2ENR_IOPDEN;
}
if(GPIOStructPtr->GPIO_Conf==In_PullUp)
if(GPIOStructPtr->GPIO_Conf==0x9)
{
GPIOStructPtr->GPIO_Conf=GPIOStructPtr->GPIO_Conf-1;
GPIOStructPtr->GPIO_Conf=GPIOStructPtr->GPIO_Conf-1;
GPIOStructPtr->GPIO->ODR |= 0x1<<(((GPIOStructPtr->GPIO_Pin)));
}
else if(GPIOStructPtr->GPIO_Conf==In_PullDown)
else if(GPIOStructPtr->GPIO_Conf==0x8)
{
GPIOStructPtr->GPIO->ODR &= ~0x1<<(((GPIOStructPtr->GPIO_Pin)));
}
if(GPIOStructPtr->GPIO_Pin>=8) // Si le numéro de pin est supérieur ou égal à 8 alors on écrit dans le registre CRHigh
if(GPIOStructPtr->GPIO_Pin>=8)
{
GPIOStructPtr->GPIO->CRH &= ~0xF<<(4*((GPIOStructPtr->GPIO_Pin)%8)); //on met a 0 les bit de config du pin
GPIOStructPtr->GPIO->CRH |= GPIOStructPtr->GPIO_Conf<<(4*((GPIOStructPtr->GPIO_Pin)%8)); // On met à 1 les bons bits pour obtenir la config souhaité sur le pin
GPIOStructPtr->GPIO->CRH |= GPIOStructPtr->GPIO_Conf<<(4*((GPIOStructPtr->GPIO_Pin)%8));
}
else // Si le numéro de pin est inférieur à 8 alors on écrit dans le registre CRLow
else
{
GPIOStructPtr->GPIO->CRL &= ~(0xF<<(4*((GPIOStructPtr->GPIO_Pin)%8))); //on met a 0 les bit de config du pin
GPIOStructPtr->GPIO->CRL |= GPIOStructPtr->GPIO_Conf<<(4*((GPIOStructPtr->GPIO_Pin)%8)); // On met à 1 les bons bits pour obtenir la config souhaité sur le pin
GPIOStructPtr->GPIO->CRL &= ~0xF<<(4*((GPIOStructPtr->GPIO_Pin)%8)); //on met a 0 les bit de config du pin
GPIOStructPtr->GPIO->CRL |= GPIOStructPtr->GPIO_Conf<<(4*((GPIOStructPtr->GPIO_Pin)%8)); //on met a 0 les bit de config du pin
}
}
int MyGPIO_Read ( GPIO_TypeDef * GPIO , char GPIO_Pin ) // renvoie 0 ou 1
int MyGPIO_Read ( GPIO_TypeDef * GPIO , char GPIO_Pin ) // renvoie 0 ou autre chose different de 0
{
int bit=0;
bit = (GPIO->IDR>>GPIO_Pin)&0x01; // On récupère la donnée stocké dans le data register d'entré pour le pin souhaité
bit = (GPIO->IDR>>GPIO_Pin)&0x01;
return bit;
}
void MyGPIO_Set ( GPIO_TypeDef * GPIO , char GPIO_Pin )
{
GPIO->ODR |=(0x01<<GPIO_Pin); // On envoie un 1 via le data register de sortie sur le pin souhaité
GPIO->ODR |=(0x01<<GPIO_Pin);
}
void MyGPIO_Reset ( GPIO_TypeDef * GPIO , char GPIO_Pin )
{
GPIO->ODR &= ((~0x01)<<GPIO_Pin); // On envoie un 0 via le data register de sortie sur le pin souhaité
GPIO->ODR &= ((~0x01)<<GPIO_Pin);
}
void MyGPIO_Toggle ( GPIO_TypeDef * GPIO , char GPIO_Pin )
@ -71,35 +68,3 @@ 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; // On active l'horloge pour AFIO
if (GPIO==GPIOC)
{
AFIO->EXTICR[GPIO_Pin] |= AFIO_EXTICR1_EXTI3_PC ;
}
EXTI->RTSR |= GPIO_Pin;
// EXTI->FTSR |= ~(0x01<<GPIO_Pin);
EXTI->EMR |= GPIO_Pin;
NVIC->ISER[0] |= 0x01<<EXTI3_IRQn; // On précise quelle interruption on souhaite activer
NVIC->IP[EXTI3_IRQn] |= Prio << 4; // On précise la priorité qu'on souhaite lui donner
}
void EXTI3_IRQHandler(void)
{
if(gpio_ptr_func!=0)
{
(*gpio_ptr_func)();
}
EXTI->PR &= ~(AFIO_EXTICR1_EXTI3_PC << (4*4)); // car c'est le pin4
}
void EXTI0_IRQHandler(void)
{
if(gpio_ptr_func!=0)
{
(*gpio_ptr_func)();
}
EXTI->PR &= ~(AFIO_EXTICR1_EXTI0_PC << (4*4)); // car c'est le pin4
}

View file

@ -10,6 +10,7 @@ void MyTimer_Base_Init ( MyTimer_Struct_TypeDef * Timer)
if(Timer->Timer==TIM1)
{
RCC->APB2ENR |= RCC_APB2ENR_TIM1EN;
Timer->Timer->BDTR|=TIM_BDTR_MOE;
}
else if (Timer->Timer==TIM2)
{
@ -29,7 +30,6 @@ void MyTimer_Base_Init ( MyTimer_Struct_TypeDef * Timer)
void MyPWM_init ( TIM_TypeDef * Timer,char Channel)
{
TIM1->BDTR |= TIM_BDTR_MOE;
if(Channel==1)
{
Timer->CCMR1&=~0x00FF;
@ -69,7 +69,7 @@ void MyPWM_Duty (TIM_TypeDef * Timer,char Channel, unsigned short CRR )
if(Channel==1)
{
Timer->CCR1=CRR;
Timer->CCR1=CRR;
}
if(Channel==2)
{
@ -78,6 +78,7 @@ void MyPWM_Duty (TIM_TypeDef * Timer,char Channel, unsigned short CRR )
if(Channel==3)
{
Timer->CCR3=CRR;
}
if(Channel==4)
{
@ -112,50 +113,13 @@ void MyTimer_ActiveIT (TIM_TypeDef * Timer, char Prio, void (*IT_function)(void)
NVIC->ISER[0] |= 0x01<<num_tim; // On précise quelle interruption on souhaite activé
NVIC->IP[num_tim] |= Prio << 4; // On précise la priorité qu'on souhaite lui donner
}
void init_encoder_timer(void (*IT_function)(void)) //voir page 391
void init_encoder_timer(TIM_TypeDef * Timer) //voir page 391
{
MyGPIO_Struct_TypeDef GPIO_PB6;
MyGPIO_Struct_TypeDef GPIO_PB7;
MyTimer_Struct_TypeDef Timer;
Timer->SMCR = 0x1;
GPIO_PB6.GPIO = GPIOB;
GPIO_PB6.GPIO_Conf = In_Floating;
GPIO_PB6.GPIO_Pin = 6;
GPIO_PB7.GPIO = GPIOB;
GPIO_PB7.GPIO_Conf = In_Floating;
GPIO_PB7.GPIO_Pin = 7;
Timer.Timer=TIM4;
Timer.ARR = 719;
Timer.PSC = 0;
MyTimer_Base_Init(&Timer);
MyGPIO_Init (&GPIO_PB6);
MyGPIO_Init (&GPIO_PB7);
TIM4-> SMCR &= ~0x0007;
TIM4-> SMCR |= TIM_SMCR_SMS_1;
TIM4-> CCMR1 &= ~0xF2F2; // Mise à 0 des CC1S, CC2S, IC1F et IC2F
TIM4-> CCMR1 |= TIM_CCMR1_CC1S_0;
TIM4-> CCMR1 |= TIM_CCMR1_CC2S_0;
TIM4-> CCER &= TIM_CCER_CC1P;
TIM4-> CCER &= TIM_CCER_CC2P;
TIM4-> CR1 |= TIM_CR1_CEN;
}
void Reset_degree (void)
{
TIM4->CNT = 0x0000;
}
int Read_CNT (void)
{
return TIM4->CNT;
}
void TIM2_IRQHandler (void)
@ -173,7 +137,7 @@ void TIM3_IRQHandler (void)
{
(*tim_ptr3_func)();
}
TIM3->SR &= ~(1<<0);
TIM3->SR &= ~(1<<0) ;
}
void TIM4_IRQHandler (void)
@ -191,5 +155,5 @@ void TIM1_UP_IRQHandler (void)
{
(*tim_ptr1_func)();
}
TIM1->SR &= ~(1<<0);
TIM1->SR &= ~(1<<0) ;
}

View file

@ -33,9 +33,8 @@ void UART_send(char data)
{
while(!(USART1->SR & USART_SR_TXE)) // Tant que le buffer d'envoi n'est pas vide, on n'envoie pas plus de données
{
}
USART1->DR = data; // Ecriture de la donnée dans le registre DR
USART1->DR = data; // Ecriture de la donnée dans le registre DR
}
void MyUART_ActiveIT(char Prio, void (*IT_function)(void))
@ -43,14 +42,14 @@ void MyUART_ActiveIT(char Prio, void (*IT_function)(void))
USART1->CR1 |= USART_CR1_RXNEIE; // On autorise l'interruption sur réception de l'UART
uart_rx_ptr_func=IT_function;
NVIC->ISER[1] |= 0x01<<(USART1_IRQn%32); // On précise quelle interruption on souhaite activé
NVIC->IP[USART1_IRQn] |= Prio << 4; // On précise la priorité qu'on souhaite lui donner
NVIC->IP[USART1_IRQn] |= Prio << 4; // On précise la priorité qu'on souhaite lui donner
}
void USART1_IRQHandler()
{
if (USART1->SR & USART_SR_RXNE)
{
//USART1->SR &= ~USART_SR_RXNE; // On abaisse le flag d'interruption
USART1->SR &= ~USART_SR_RXNE; // On abaisse le flag d'interruption
if(uart_rx_ptr_func!=0)
{
(*uart_rx_ptr_func)();
@ -62,3 +61,5 @@ char UART_receive()
{
return USART1->DR; // on recupere dans DR
}

View file

@ -0,0 +1,26 @@
#include "stm32f10x.h"
#include "GPIO.h"
#include "TIMER.h"
int bordage (void)
{
//int weatherCock, sailingAngle, roulis;
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);
/*if(((weatherCock > 0) && (weatherCock <= 45)) || roulis>40)
{
sailingAngle=0;
}else
{
sailingAngle=(weatherCock/2);
}*/
return 0;
}

View file

@ -1,36 +1,34 @@
#include "CAP_voilier.h"
#include "UART.h"
#include "TIMER.h"
#include "GPIO.h"
MyTimer_Struct_TypeDef timer1;
void Madirection_IT (void);
signed char direction ;
int duty_cap ;
MyGPIO_Struct_TypeDef PA8;
MyGPIO_Struct_TypeDef PA9;
MyGPIO_Struct_TypeDef PB1;
char valeur =0;
extern char MyChar;
void My_cap_init(void)
void My_cap(void)
{
PA8.GPIO=GPIOA;
PA8.GPIO_Conf=AltOut_Ppull;
PA8.GPIO_Pin=8;
MyGPIO_Init(&PA8);
PA9.GPIO=GPIOA;
PA9.GPIO_Conf=AltOut_Ppull;
PA9.GPIO_Pin=9;
MyGPIO_Init(&PA9);
PB1.GPIO=GPIOB;
PB1.GPIO_Conf=Out_Ppull;
PB1.GPIO_Pin=1;
MyGPIO_Init(&PB1);
timer1.Timer=TIM1;
timer1.ARR=100; //pour avoir 20Khz et un PWM a 100 positions
timer1.PSC=36;
timer1.ARR=20000; //pour avoir 20Khz
timer1.PSC=3600;
MyTimer_Base_Init(&timer1);
MyTimer_Base_Start(timer1.Timer);
MyPWM_init(timer1.Timer,1);
MyPWM_init(timer1.Timer,2);
MyUART_init();
MyUART_ActiveIT(1,&Madirection_IT);
MyUART_ActiveIT(2,&Madirection_IT);
}
@ -40,13 +38,11 @@ void Madirection_IT (void)
if( direction <0 )
{
MyGPIO_Set(GPIOB,1);
valeur =-direction;
}
else
}else
{
MyGPIO_Reset(GPIOB,1);
valeur = direction;
}
duty_cap=valeur;
MyPWM_Duty(timer1.Timer,1, duty_cap );
duty_cap=(20000*(int8_t) direction)/100 ;
MyPWM_Duty(timer1.Timer,2, duty_cap );
}

View file

@ -0,0 +1,80 @@
#include "stm32f10x.h"
#include "GPIO.h"
#include "TIMER.h"
#include "MyI2C.h"
#include "MySPI.h"
#include "Rouli.h"
#include "CAP_voilier.h"
#include <stdio.h>
void Mafonction_IT (void);
MyGPIO_Struct_TypeDef PA5;
MyGPIO_Struct_TypeDef PB0;
MyTimer_Struct_TypeDef timer2,timer3;
//PA5 LED
//PC13 Bouton
char X0,X1,Y0,Y1,Z0,Z1;
char read_DATA,read_BWR,read_PWRC;
int16_t gX,gY,gZ;
int test =0;
XYZ mesures;
int main ( void )
{
PA5.GPIO=GPIOA;
PA5.GPIO_Conf=Out_Ppull;
PA5.GPIO_Pin=5;
MyGPIO_Init(&PA5);
timer2.Timer=TIM2;
timer2.ARR=18000; //pour avoir 250ms
timer2.PSC=1000;
MyTimer_Base_Init(&timer2);
MyTimer_ActiveIT(timer2.Timer,1, &Mafonction_IT);
MyTimer_Base_Start(timer2.Timer);
PB0.GPIO=GPIOB;
PB0.GPIO_Conf=AltOut_Ppull;
PB0.GPIO_Pin=0;
MyGPIO_Init(&PB0);
timer3.Timer=TIM3;
timer3.ARR=14400; //pour avoir 20ms
timer3.PSC=100;
MyTimer_Base_Init(&timer3);
//MyTimer_ActiveIT(timer3.Timer,2, &Mafonction_IT);
MyTimer_Base_Start(timer3.Timer);
MyPWM_init(timer3.Timer,3);
MySPI_Init(SPI1);
rouli_InitAccel();
MySPI_Send(READ|DATA_FORMAT);
read_DATA = MySPI_Read();
MySPI_Send(READ|BW_RATE);
read_BWR = MySPI_Read();
MySPI_Send(READ|POWER_CTL);
read_PWRC = MySPI_Read();
while(1)
{
rouli_GetAccel(&mesures);
My_cap();
}
return 0;
}
void Mafonction_IT (void)
{
if((mesures.gY <= (-0.7)) || (mesures.gY >= 0.7))
{
MyPWM_Duty(timer3.Timer,3,720);//0.985ms
test = test+1;
}
}

View file

@ -1,3 +1,7 @@
#include "stm32f10x.h"
#include "GPIO.h"
#include "TIMER.h"
#include "MySPI.h"
#include "Rouli.h"
@ -9,11 +13,11 @@ void rouli_InitAccel(void)
MySPI_Clear_NSS();
/* Init de l'accelerometre avec SPI */
MySPI_Send(WRITE|DATA_FORMAT); /* Ecriture dans le data Format */
MySPI_Send(0x0B); /* Envoi des param<EFBFBD>tres */
MySPI_Send(0x0B); /* Envoi des paramètres */
MySPI_Send(WRITE|BW_RATE); /* Ecriture dans le BW rate */
MySPI_Send(0x0A); /* Envoi des param<EFBFBD>tres */
MySPI_Send(0x0A); /* Envoi des paramètres */
MySPI_Send(WRITE|POWER_CTL); /* Ecriture dans le POWER_CTL */
MySPI_Send(0x08); /* Envoi des param<EFBFBD>tre */
MySPI_Send(0x08); /* Envoi des paramètre */
MySPI_Set_NSS();
}
@ -41,3 +45,4 @@ void rouli_GetAccel (XYZ * axe)
// axe y entre -0.7 et 0.7

View file

@ -26,7 +26,7 @@
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<CLKADS>8000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
@ -125,7 +125,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGDARM</Key>
<Name>(1010=710,304,1086,861,1)(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=1161,471,1582,898,1)(121=1064,158,1485,585,1)(122=1317,323,1738,750,0)(123=-1,-1,-1,-1,0)(140=1117,100,1805,440,1)(240=263,238,662,583,1)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=150,186,744,937,1)(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)(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=733,260,1154,687,0)(121=667,158,1088,585,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=1141,158,1735,909,0)(131=1302,9,1896,760,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=715,50,1163,464,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>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -138,40 +138,32 @@
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>90</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219870</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\DRIVERS\Src\GPIO.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\TP1\../DRIVERS/Src/GPIO.c\90</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>100</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219834</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\DRIVERS\Src\GPIO.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\TP1\../DRIVERS/Src/GPIO.c\100</Expression>
</Bp>
</Breakpoint>
<Breakpoint/>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>test</ItemText>
</Ww>
<Ww>
<count>1</count>
<WinNumber>1</WinNumber>
<ItemText>duty_cap</ItemText>
</Ww>
<Ww>
<count>2</count>
<WinNumber>1</WinNumber>
<ItemText>direction</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>0</SubType>
<ItemText>0x20000018</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
@ -180,7 +172,7 @@
<periodic>1</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer1>1</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
@ -192,7 +184,7 @@
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aLa>1</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
@ -214,6 +206,23 @@
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<LogicAnalyzers>
<Wi>
<IntNumber>0</IntNumber>
<FirstString>((porta &amp; 0x00000200) &gt;&gt; 9 &amp; 0x200) &gt;&gt; 9</FirstString>
<SecondString>00800000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274612026203078303030303032303029203E3E2039000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F170000000000000000000000000000000000000004010008</SecondString>
</Wi>
</LogicAnalyzers>
<SystemViewers>
<Entry>
<Name>System Viewer\ADC1</Name>
<WinId>35905</WinId>
</Entry>
<Entry>
<Name>System Viewer\TIM2</Name>
<WinId>35904</WinId>
</Entry>
</SystemViewers>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>1</EnableFlashSeq>
@ -328,7 +337,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=457,337,833,894,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=1478,659,1899,1064,1)(121=996,383,1417,788,1)(122=353,663,774,1068,0)(123=-1,-1,-1,-1,0)(140=1031,78,1719,418,0)(240=1050,425,1449,770,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=815,202,1409,896,1)(131=-1,-1,-1,-1,0)(132=854,318,1448,1012,0)(133=139,242,733,936,0)(160=1441,248,1889,662,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>
<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=692,211,912,671,1)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=1499,644,1920,1049,0)(121=1391,503,1812,908,1)(122=950,270,1371,675,1)(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=1215,466,1809,1160,0)(132=1326,108,1920,802,1)(133=-1,-1,-1,-1,0)(160=972,135,1420,549,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>
<Number>0</Number>
@ -351,29 +360,60 @@
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>33</LineNumber>
<EnabledFlag>0</EnabledFlag>
<Address>134218882</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\Sources\CAP_voilier.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\TP1\Sources/CAP_voilier.c\33</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>50</LineNumber>
<EnabledFlag>0</EnabledFlag>
<Address>134221314</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\Drivers\Src\UART.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\TP1\../Drivers/Src/UART.c\50</Expression>
</Bp>
</Breakpoint>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>cnt,0x0A</ItemText>
<ItemText>mesures</ItemText>
</Ww>
<Ww>
<count>1</count>
<WinNumber>1</WinNumber>
<ItemText>MyChar</ItemText>
</Ww>
<Ww>
<count>2</count>
<WinNumber>1</WinNumber>
<ItemText>direction,0x0A</ItemText>
</Ww>
<Ww>
<count>3</count>
<WinNumber>1</WinNumber>
<ItemText>valeur,0x0A</ItemText>
<ItemText>test</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>0</SubType>
<ItemText>0x20000018</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
@ -436,7 +476,7 @@
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Sources\Principal.c</PathWithFileName>
@ -451,18 +491,6 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Sources\Girouette.c</PathWithFileName>
<FilenameWithoutPath>Girouette.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\DRIVERS\Src\GPIO.c</PathWithFileName>
<FilenameWithoutPath>GPIO.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
@ -470,7 +498,7 @@
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>4</FileNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -482,13 +510,25 @@
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>5</FileNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\Drivers\Src\ADC.c</PathWithFileName>
<FilenameWithoutPath>ADC.c</FilenameWithoutPath>
<PathWithFileName>.\Sources\Bordage.c</PathWithFileName>
<FilenameWithoutPath>Bordage.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\Drivers\Inc\Lib_Com_Periph_2022.lib</PathWithFileName>
<FilenameWithoutPath>Lib_Com_Periph_2022.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
@ -499,30 +539,6 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\Drivers\Src\UART.c</PathWithFileName>
<FilenameWithoutPath>UART.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>7</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Sources\Pwm_voile.c</PathWithFileName>
<FilenameWithoutPath>Pwm_voile.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>8</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Sources\Rouli.c</PathWithFileName>
<FilenameWithoutPath>Rouli.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
@ -530,25 +546,37 @@
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>1</FileType>
<tvExp>1</tvExp>
<FileNumber>7</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Sources\CAP_voilier.c</PathWithFileName>
<FilenameWithoutPath>CAP_voilier.c</FilenameWithoutPath>
<PathWithFileName>..\Drivers\Inc\UART.h</PathWithFileName>
<FilenameWithoutPath>UART.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>10</FileNumber>
<FileType>4</FileType>
<FileNumber>8</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>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\Drivers\Inc\Lib_Com_Periph_2022.lib</PathWithFileName>
<FilenameWithoutPath>Lib_Com_Periph_2022.lib</FilenameWithoutPath>
<PathWithFileName>.\Sources\CAP_voilier.c</PathWithFileName>
<FilenameWithoutPath>CAP_voilier.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>

View file

@ -10,443 +10,6 @@
<TargetName>Simulé</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>STM32F103RB</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32F1xx_DFP.2.3.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00005000) IROM(0x08000000,0x00020000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM))</FlashDriverDll>
<DeviceId>4231</DeviceId>
<RegisterFile>$$Device:STM32F103RB$Device\Include\stm32f10x.h</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
<Linker></Linker>
<OHString></OHString>
<InfinionOptionDll></InfinionOptionDll>
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile>C:\Users\noelj\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\SVD\STM32F103xx.SFR</SFDFile>
<bCustSvd>1</bCustSvd>
<UseEnv>0</UseEnv>
<BinPath></BinPath>
<IncludePath></IncludePath>
<LibPath></LibPath>
<RegisterFilePath></RegisterFilePath>
<DBRegisterFilePath></DBRegisterFilePath>
<TargetStatus>
<Error>0</Error>
<ExitCodeStop>0</ExitCodeStop>
<ButtonStop>0</ButtonStop>
<NotGenerated>0</NotGenerated>
<InvalidFlash>1</InvalidFlash>
</TargetStatus>
<OutputDirectory>.\Objects\</OutputDirectory>
<OutputName>TP1</OutputName>
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>0</CreateHexFile>
<DebugInformation>1</DebugInformation>
<BrowseInformation>1</BrowseInformation>
<ListingPath>.\Listings\</ListingPath>
<HexFormatSelection>1</HexFormatSelection>
<Merge32K>0</Merge32K>
<CreateBatchFile>0</CreateBatchFile>
<BeforeCompile>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopU1X>0</nStopU1X>
<nStopU2X>0</nStopU2X>
</BeforeCompile>
<BeforeMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopB1X>0</nStopB1X>
<nStopB2X>0</nStopB2X>
</BeforeMake>
<AfterMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopA1X>0</nStopA1X>
<nStopA2X>0</nStopA2X>
</AfterMake>
<SelectedForBatchBuild>0</SelectedForBatchBuild>
<SVCSIdString></SVCSIdString>
</TargetCommonOption>
<CommonProperty>
<UseCPPCompiler>0</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>1</IncludeInBuild>
<AlwaysBuild>0</AlwaysBuild>
<GenerateAssemblyFile>0</GenerateAssemblyFile>
<AssembleAssemblyFile>0</AssembleAssemblyFile>
<PublicsOnly>0</PublicsOnly>
<StopOnExitCode>3</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<DllOption>
<SimDllName>SARMCM3.DLL</SimDllName>
<SimDllArguments></SimDllArguments>
<SimDlgDll>DARMSTM.DLL</SimDlgDll>
<SimDlgDllArguments>-pSTM32F103RB</SimDlgDllArguments>
<TargetDllName>SARMCM3.DLL</TargetDllName>
<TargetDllArguments></TargetDllArguments>
<TargetDlgDll>TARMSTM.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pSTM32F103RB</TargetDlgDllArguments>
</DllOption>
<DebugOption>
<OPTHX>
<HexSelection>1</HexSelection>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
<Oh166RecLen>16</Oh166RecLen>
</OPTHX>
</DebugOption>
<Utilities>
<Flash1>
<UseTargetDll>1</UseTargetDll>
<UseExternalTool>0</UseExternalTool>
<RunIndependent>0</RunIndependent>
<UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
<Capability>1</Capability>
<DriverSelection>4096</DriverSelection>
</Flash1>
<bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2CM3.DLL</Flash2>
<Flash3>"" ()</Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>
<pFcarmGrp></pFcarmGrp>
<pFcArmRoot></pFcArmRoot>
<FcArmLst>0</FcArmLst>
</Utilities>
<TargetArmAds>
<ArmAdsMisc>
<GenerateListings>0</GenerateListings>
<asHll>1</asHll>
<asAsm>1</asAsm>
<asMacX>1</asMacX>
<asSyms>1</asSyms>
<asFals>1</asFals>
<asDbgD>1</asDbgD>
<asForm>1</asForm>
<ldLst>0</ldLst>
<ldmm>1</ldmm>
<ldXref>1</ldXref>
<BigEnd>0</BigEnd>
<AdsALst>1</AdsALst>
<AdsACrf>1</AdsACrf>
<AdsANop>0</AdsANop>
<AdsANot>0</AdsANot>
<AdsLLst>1</AdsLLst>
<AdsLmap>1</AdsLmap>
<AdsLcgr>1</AdsLcgr>
<AdsLsym>1</AdsLsym>
<AdsLszi>1</AdsLszi>
<AdsLtoi>1</AdsLtoi>
<AdsLsun>1</AdsLsun>
<AdsLven>1</AdsLven>
<AdsLsxf>1</AdsLsxf>
<RvctClst>0</RvctClst>
<GenPPlst>0</GenPPlst>
<AdsCpuType>"Cortex-M3"</AdsCpuType>
<RvctDeviceName></RvctDeviceName>
<mOS>0</mOS>
<uocRom>0</uocRom>
<uocRam>0</uocRam>
<hadIROM>1</hadIROM>
<hadIRAM>1</hadIRAM>
<hadXRAM>0</hadXRAM>
<uocXRam>0</uocXRam>
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
<useUlib>1</useUlib>
<EndSel>0</EndSel>
<uLtcg>0</uLtcg>
<nSecure>0</nSecure>
<RoSelD>3</RoSelD>
<RwSelD>3</RwSelD>
<CodeSel>0</CodeSel>
<OptFeed>0</OptFeed>
<NoZi1>0</NoZi1>
<NoZi2>0</NoZi2>
<NoZi3>0</NoZi3>
<NoZi4>0</NoZi4>
<NoZi5>0</NoZi5>
<Ro1Chk>0</Ro1Chk>
<Ro2Chk>0</Ro2Chk>
<Ro3Chk>0</Ro3Chk>
<Ir1Chk>1</Ir1Chk>
<Ir2Chk>0</Ir2Chk>
<Ra1Chk>0</Ra1Chk>
<Ra2Chk>0</Ra2Chk>
<Ra3Chk>0</Ra3Chk>
<Im1Chk>1</Im1Chk>
<Im2Chk>0</Im2Chk>
<OnChipMemories>
<Ocm1>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm1>
<Ocm2>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm2>
<Ocm3>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm3>
<Ocm4>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm4>
<Ocm5>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm5>
<Ocm6>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm6>
<IRAM>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x5000</Size>
</IRAM>
<IROM>
<Type>1</Type>
<StartAddress>0x8000000</StartAddress>
<Size>0x20000</Size>
</IROM>
<XRAM>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</XRAM>
<OCR_RVCT1>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT1>
<OCR_RVCT2>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT2>
<OCR_RVCT3>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT3>
<OCR_RVCT4>
<Type>1</Type>
<StartAddress>0x8000000</StartAddress>
<Size>0x20000</Size>
</OCR_RVCT4>
<OCR_RVCT5>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT5>
<OCR_RVCT6>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT6>
<OCR_RVCT7>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT7>
<OCR_RVCT8>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT8>
<OCR_RVCT9>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x5000</Size>
</OCR_RVCT9>
<OCR_RVCT10>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
<Strict>0</Strict>
<EnumInt>0</EnumInt>
<PlainCh>0</PlainCh>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<wLevel>3</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>0</uC99>
<uGnu>0</uGnu>
<useXO>0</useXO>
<v6Lang>1</v6Lang>
<v6LangP>5</v6LangP>
<vShortEn>1</vShortEn>
<vShortWch>1</vShortWch>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath>..\Drivers\Inc;.\Includes</IncludePath>
</VariousControls>
</Cads>
<Aads>
<interw>1</interw>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<thumb>0</thumb>
<SplitLS>0</SplitLS>
<SwStkChk>0</SwStkChk>
<NoWarn>0</NoWarn>
<uSurpInc>0</uSurpInc>
<useXO>0</useXO>
<ClangAsOpt>1</ClangAsOpt>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Aads>
<LDads>
<umfTarg>0</umfTarg>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<noStLib>0</noStLib>
<RepFail>1</RepFail>
<useFile>0</useFile>
<TextAddressRange>0x08000000</TextAddressRange>
<DataAddressRange>0x20000000</DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile></ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
<LinkerInputFile></LinkerInputFile>
<DisabledWarnings></DisabledWarnings>
</LDads>
</TargetArmAds>
</TargetOption>
<Groups>
<Group>
<GroupName>MesSources</GroupName>
<Files>
<File>
<FileName>Principal.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\Principal.c</FilePath>
</File>
<File>
<FileName>Girouette.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\Girouette.c</FilePath>
</File>
<File>
<FileName>GPIO.c</FileName>
<FileType>1</FileType>
<FilePath>..\DRIVERS\Src\GPIO.c</FilePath>
</File>
<File>
<FileName>TIMER.c</FileName>
<FileType>1</FileType>
<FilePath>..\Drivers\Src\TIMER.c</FilePath>
</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>
<File>
<FileName>Pwm_voile.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\Pwm_voile.c</FilePath>
</File>
<File>
<FileName>Rouli.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\Rouli.c</FilePath>
</File>
<File>
<FileName>CAP_voilier.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\CAP_voilier.c</FilePath>
</File>
<File>
<FileName>Lib_Com_Periph_2022.lib</FileName>
<FileType>4</FileType>
<FilePath>..\Drivers\Inc\Lib_Com_Periph_2022.lib</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
</Group>
<Group>
<GroupName>::Device</GroupName>
</Group>
</Groups>
</Target>
<Target>
<TargetName>Réel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
@ -826,9 +389,436 @@
<FilePath>.\Sources\Principal.c</FilePath>
</File>
<File>
<FileName>Girouette.c</FileName>
<FileName>GPIO.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\Girouette.c</FilePath>
<FilePath>..\DRIVERS\Src\GPIO.c</FilePath>
</File>
<File>
<FileName>TIMER.c</FileName>
<FileType>1</FileType>
<FilePath>..\Drivers\Src\TIMER.c</FilePath>
</File>
<File>
<FileName>Bordage.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\Bordage.c</FilePath>
</File>
<File>
<FileName>Lib_Com_Periph_2022.lib</FileName>
<FileType>4</FileType>
<FilePath>..\Drivers\Inc\Lib_Com_Periph_2022.lib</FilePath>
</File>
<File>
<FileName>Rouli.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\Rouli.c</FilePath>
</File>
<File>
<FileName>UART.h</FileName>
<FileType>5</FileType>
<FilePath>..\Drivers\Inc\UART.h</FilePath>
</File>
<File>
<FileName>UART.c</FileName>
<FileType>1</FileType>
<FilePath>..\Drivers\Src\UART.c</FilePath>
</File>
<File>
<FileName>CAP_voilier.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\CAP_voilier.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
</Group>
<Group>
<GroupName>::Device</GroupName>
</Group>
</Groups>
</Target>
<Target>
<TargetName>Réel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>STM32F103RB</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32F1xx_DFP.2.3.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00005000) IROM(0x08000000,0x00020000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM))</FlashDriverDll>
<DeviceId>4231</DeviceId>
<RegisterFile>$$Device:STM32F103RB$Device\Include\stm32f10x.h</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
<Linker></Linker>
<OHString></OHString>
<InfinionOptionDll></InfinionOptionDll>
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile>$$Device:STM32F103RB$SVD\STM32F103xx.svd</SFDFile>
<bCustSvd>0</bCustSvd>
<UseEnv>0</UseEnv>
<BinPath></BinPath>
<IncludePath></IncludePath>
<LibPath></LibPath>
<RegisterFilePath></RegisterFilePath>
<DBRegisterFilePath></DBRegisterFilePath>
<TargetStatus>
<Error>0</Error>
<ExitCodeStop>0</ExitCodeStop>
<ButtonStop>0</ButtonStop>
<NotGenerated>0</NotGenerated>
<InvalidFlash>1</InvalidFlash>
</TargetStatus>
<OutputDirectory>.\Objects\</OutputDirectory>
<OutputName>TP1</OutputName>
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>0</CreateHexFile>
<DebugInformation>1</DebugInformation>
<BrowseInformation>1</BrowseInformation>
<ListingPath>.\Listings\</ListingPath>
<HexFormatSelection>1</HexFormatSelection>
<Merge32K>0</Merge32K>
<CreateBatchFile>0</CreateBatchFile>
<BeforeCompile>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopU1X>0</nStopU1X>
<nStopU2X>0</nStopU2X>
</BeforeCompile>
<BeforeMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopB1X>0</nStopB1X>
<nStopB2X>0</nStopB2X>
</BeforeMake>
<AfterMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopA1X>0</nStopA1X>
<nStopA2X>0</nStopA2X>
</AfterMake>
<SelectedForBatchBuild>0</SelectedForBatchBuild>
<SVCSIdString></SVCSIdString>
</TargetCommonOption>
<CommonProperty>
<UseCPPCompiler>0</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>1</IncludeInBuild>
<AlwaysBuild>0</AlwaysBuild>
<GenerateAssemblyFile>0</GenerateAssemblyFile>
<AssembleAssemblyFile>0</AssembleAssemblyFile>
<PublicsOnly>0</PublicsOnly>
<StopOnExitCode>3</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<DllOption>
<SimDllName>SARMCM3.DLL</SimDllName>
<SimDllArguments></SimDllArguments>
<SimDlgDll>DARMSTM.DLL</SimDlgDll>
<SimDlgDllArguments>-pSTM32F103RB</SimDlgDllArguments>
<TargetDllName>SARMCM3.DLL</TargetDllName>
<TargetDllArguments></TargetDllArguments>
<TargetDlgDll>TARMSTM.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pSTM32F103RB</TargetDlgDllArguments>
</DllOption>
<DebugOption>
<OPTHX>
<HexSelection>1</HexSelection>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
<Oh166RecLen>16</Oh166RecLen>
</OPTHX>
</DebugOption>
<Utilities>
<Flash1>
<UseTargetDll>1</UseTargetDll>
<UseExternalTool>0</UseExternalTool>
<RunIndependent>0</RunIndependent>
<UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
<Capability>1</Capability>
<DriverSelection>-1</DriverSelection>
</Flash1>
<bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2CM3.DLL</Flash2>
<Flash3></Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>
<pFcarmGrp></pFcarmGrp>
<pFcArmRoot></pFcArmRoot>
<FcArmLst>0</FcArmLst>
</Utilities>
<TargetArmAds>
<ArmAdsMisc>
<GenerateListings>0</GenerateListings>
<asHll>1</asHll>
<asAsm>1</asAsm>
<asMacX>1</asMacX>
<asSyms>1</asSyms>
<asFals>1</asFals>
<asDbgD>1</asDbgD>
<asForm>1</asForm>
<ldLst>0</ldLst>
<ldmm>1</ldmm>
<ldXref>1</ldXref>
<BigEnd>0</BigEnd>
<AdsALst>1</AdsALst>
<AdsACrf>1</AdsACrf>
<AdsANop>0</AdsANop>
<AdsANot>0</AdsANot>
<AdsLLst>1</AdsLLst>
<AdsLmap>1</AdsLmap>
<AdsLcgr>1</AdsLcgr>
<AdsLsym>1</AdsLsym>
<AdsLszi>1</AdsLszi>
<AdsLtoi>1</AdsLtoi>
<AdsLsun>1</AdsLsun>
<AdsLven>1</AdsLven>
<AdsLsxf>1</AdsLsxf>
<RvctClst>0</RvctClst>
<GenPPlst>0</GenPPlst>
<AdsCpuType>"Cortex-M3"</AdsCpuType>
<RvctDeviceName></RvctDeviceName>
<mOS>0</mOS>
<uocRom>0</uocRom>
<uocRam>0</uocRam>
<hadIROM>1</hadIROM>
<hadIRAM>1</hadIRAM>
<hadXRAM>0</hadXRAM>
<uocXRam>0</uocXRam>
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
<useUlib>1</useUlib>
<EndSel>0</EndSel>
<uLtcg>0</uLtcg>
<nSecure>0</nSecure>
<RoSelD>3</RoSelD>
<RwSelD>3</RwSelD>
<CodeSel>0</CodeSel>
<OptFeed>0</OptFeed>
<NoZi1>0</NoZi1>
<NoZi2>0</NoZi2>
<NoZi3>0</NoZi3>
<NoZi4>0</NoZi4>
<NoZi5>0</NoZi5>
<Ro1Chk>0</Ro1Chk>
<Ro2Chk>0</Ro2Chk>
<Ro3Chk>0</Ro3Chk>
<Ir1Chk>1</Ir1Chk>
<Ir2Chk>0</Ir2Chk>
<Ra1Chk>0</Ra1Chk>
<Ra2Chk>0</Ra2Chk>
<Ra3Chk>0</Ra3Chk>
<Im1Chk>1</Im1Chk>
<Im2Chk>0</Im2Chk>
<OnChipMemories>
<Ocm1>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm1>
<Ocm2>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm2>
<Ocm3>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm3>
<Ocm4>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm4>
<Ocm5>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm5>
<Ocm6>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm6>
<IRAM>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x5000</Size>
</IRAM>
<IROM>
<Type>1</Type>
<StartAddress>0x8000000</StartAddress>
<Size>0x20000</Size>
</IROM>
<XRAM>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</XRAM>
<OCR_RVCT1>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT1>
<OCR_RVCT2>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT2>
<OCR_RVCT3>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT3>
<OCR_RVCT4>
<Type>1</Type>
<StartAddress>0x8000000</StartAddress>
<Size>0x20000</Size>
</OCR_RVCT4>
<OCR_RVCT5>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT5>
<OCR_RVCT6>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT6>
<OCR_RVCT7>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT7>
<OCR_RVCT8>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT8>
<OCR_RVCT9>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x5000</Size>
</OCR_RVCT9>
<OCR_RVCT10>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>1</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
<Strict>0</Strict>
<EnumInt>0</EnumInt>
<PlainCh>0</PlainCh>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<wLevel>2</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>0</uC99>
<uGnu>0</uGnu>
<useXO>0</useXO>
<v6Lang>3</v6Lang>
<v6LangP>3</v6LangP>
<vShortEn>1</vShortEn>
<vShortWch>1</vShortWch>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath>.\Includes;..\DRIVERS\Inc</IncludePath>
</VariousControls>
</Cads>
<Aads>
<interw>1</interw>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<thumb>0</thumb>
<SplitLS>0</SplitLS>
<SwStkChk>0</SwStkChk>
<NoWarn>0</NoWarn>
<uSurpInc>0</uSurpInc>
<useXO>0</useXO>
<ClangAsOpt>1</ClangAsOpt>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Aads>
<LDads>
<umfTarg>0</umfTarg>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<noStLib>0</noStLib>
<RepFail>1</RepFail>
<useFile>0</useFile>
<TextAddressRange>0x08000000</TextAddressRange>
<DataAddressRange>0x20000000</DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile></ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
<LinkerInputFile></LinkerInputFile>
<DisabledWarnings></DisabledWarnings>
</LDads>
</TargetArmAds>
</TargetOption>
<Groups>
<Group>
<GroupName>MesSources</GroupName>
<Files>
<File>
<FileName>Principal.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\Principal.c</FilePath>
</File>
<File>
<FileName>GPIO.c</FileName>
@ -841,54 +831,35 @@
<FilePath>..\Drivers\Src\TIMER.c</FilePath>
</File>
<File>
<FileName>ADC.c</FileName>
<FileName>Bordage.c</FileName>
<FileType>1</FileType>
<FilePath>..\Drivers\Src\ADC.c</FilePath>
<FilePath>.\Sources\Bordage.c</FilePath>
</File>
<File>
<FileName>UART.c</FileName>
<FileType>1</FileType>
<FilePath>..\Drivers\Src\UART.c</FilePath>
</File>
<File>
<FileName>Pwm_voile.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\Pwm_voile.c</FilePath>
<FileName>Lib_Com_Periph_2022.lib</FileName>
<FileType>4</FileType>
<FilePath>..\Drivers\Inc\Lib_Com_Periph_2022.lib</FilePath>
</File>
<File>
<FileName>Rouli.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\Rouli.c</FilePath>
</File>
<File>
<FileName>UART.h</FileName>
<FileType>5</FileType>
<FilePath>..\Drivers\Inc\UART.h</FilePath>
</File>
<File>
<FileName>UART.c</FileName>
<FileType>1</FileType>
<FilePath>..\Drivers\Src\UART.c</FilePath>
</File>
<File>
<FileName>CAP_voilier.c</FileName>
<FileType>1</FileType>
<FilePath>.\Sources\CAP_voilier.c</FilePath>
</File>
<File>
<FileName>Lib_Com_Periph_2022.lib</FileName>
<FileType>4</FileType>
<FilePath>..\Drivers\Inc\Lib_Com_Periph_2022.lib</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>1</IncludeInBuild>
<AlwaysBuild>2</AlwaysBuild>
<GenerateAssemblyFile>2</GenerateAssemblyFile>
<AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<FileArmAds/>
</FileOption>
</File>
</Files>
</Group>
<Group>
@ -904,15 +875,15 @@
<RTE>
<apis/>
<components>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.6.0" condition="ARMv6_7_8-M Device">
<package name="CMSIS" schemaVersion="1.7.7" url="http://www.keil.com/pack/" vendor="ARM" version="5.9.0"/>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.4.0" condition="ARMv6_7_8-M Device">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.7.0"/>
<targetInfos>
<targetInfo name="Réel"/>
<targetInfo name="Simulé"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.0.0" condition="STM32F1xx CMSIS">
<package name="STM32F1xx_DFP" schemaVersion="1.7.2" url="http://www.keil.com/pack/" vendor="Keil" version="2.4.0"/>
<package name="STM32F1xx_DFP" schemaVersion="1.4.0" url="http://www.keil.com/pack/" vendor="Keil" version="2.3.0"/>
<targetInfos>
<targetInfo name="Réel"/>
<targetInfo name="Simulé"/>

View file

@ -1,11 +0,0 @@
#ifndef CAP_voilier_H
#define CAP_voilier_H
#include "UART.h"
#include "TIMER.h"
#include "GPIO.h"
void My_cap_init(void);
void Madirection_IT (void);
#endif

View file

@ -1,10 +0,0 @@
#ifndef MYGIROUETTE_H
#define MYGIROUETTE_H
#include "stm32f10x.h"
#include "GPIO.h"
#include "TIMER.h"
void init_girouette (void);
void Test_tour_girouette(void);
#endif

View file

@ -1,10 +0,0 @@
#ifndef MYPWMVOILE_H
#define MYPWMVOILE_H
#include "stm32f10x.h"
#include "GPIO.h"
#include "TIMER.h"
#include "Rouli.h"
void init_pwm_voile(void);
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,308 +0,0 @@
;******************** (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

View file

@ -1,27 +0,0 @@
#include "Girouette.h"
MyGPIO_Struct_TypeDef GPIOC3;
void Test_Encoder (void)
{
Reset_degree();
}
void init_girouette (void)
{
GPIOC3.GPIO = GPIOC;
GPIOC3.GPIO_Conf = In_Floating;
GPIOC3.GPIO_Pin = 3;
MyGPIO_Init (&GPIOC3);
init_encoder_timer(&Test_Encoder);
}
void Test_tour_girouette(void){
if(MyGPIO_Read(GPIOC3.GPIO, GPIOC3.GPIO_Pin))
{
Reset_degree();
}
}

View file

@ -1,59 +0,0 @@
#include "stm32f10x.h"
#include <stdio.h>
#include <string.h>
#include "GPIO.h"
#include "UART.h"
#include "TIMER.h"
#include "Girouette.h"
#include "Pwm_voile.h"
#include "MyI2C.h"
#include "MySPI.h"
#include "CAP_voilier.h"
char MyChar;
char X0,X1,Y0,Y1,Z0,Z1;
char read_DATA,read_BWR,read_PWRC;
int16_t gX,gY,gZ;
int test =0;
//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 GPIOA5;
GPIOA5.GPIO = GPIOA;
GPIOA5.GPIO_Conf = Out_Ppull;
GPIOA5.GPIO_Pin = 5;
MyGPIO_Init (&GPIOA5);
init_girouette();
init_pwm_voile();
MySPI_Init(SPI1);
rouli_InitAccel();
My_cap_init();
MySPI_Send(READ|DATA_FORMAT);
read_DATA = MySPI_Read();
MySPI_Send(READ|BW_RATE);
read_BWR = MySPI_Read();
MySPI_Send(READ|POWER_CTL);
read_PWRC = MySPI_Read();
// MyUART_init();
// MyUART_ActiveIT(1, &UART_RX_IT); //mode permet d'activer soit l'interruption sur TX
while(1)
{
Test_tour_girouette();
}
}

View file

@ -1,54 +0,0 @@
# include "Pwm_voile.h"
MyTimer_Struct_TypeDef Timer2, Timer3;
MyGPIO_Struct_TypeDef PB0;
XYZ mesures;
void write_pwm(void)
{
int val_pwm;
float cnt;
rouli_GetAccel(&mesures);
if((mesures.gY <= (-0.7)) || (mesures.gY >= 0.7))
{
val_pwm = 720;//0.985ms
}
else
{
cnt=Read_CNT();
if(cnt>=360)
{
cnt=cnt-360;
val_pwm=(Timer3.ARR/20)+((Timer3.ARR/20)*(cnt/360.0));
}
else
{
val_pwm=2*(Timer3.ARR/20)-((Timer3.ARR/20)*(cnt/360.0));
}
}
MyPWM_Duty(Timer3.Timer,3,val_pwm);
}
void init_pwm_voile(void)
{
Timer2.Timer=TIM2;
Timer2.ARR=18000;
Timer2.PSC=1000;
MyTimer_Base_Init(&Timer2);
MyTimer_ActiveIT(Timer2.Timer,2,&write_pwm);
MyTimer_Base_Start(Timer2.Timer);
PB0.GPIO=GPIOB;
PB0.GPIO_Conf=AltOut_Ppull;
PB0.GPIO_Pin=0;
MyGPIO_Init(&PB0);
Timer3.Timer=TIM3;
Timer3.ARR=14400;
Timer3.PSC=100;
MyTimer_Base_Init(&Timer3);
MyPWM_init(Timer3.Timer,3);
MyTimer_Base_Start(Timer3.Timer);
}

View file

@ -1,42 +0,0 @@
# Projet Voilier
## Equipe 2
#### Noel JUMIN
#### Olivier Chevilley
#### Paul Jaulhiac
#### Cyril Vasseur
## Description du projet
Ce projet a été réalisé lors de séances de microcontroleur durant lesquels nous avons appris à maitriser l'utilisation des registres du STM32F103RB.
Le projet se sépare en 2 grandes parties :
- [La réalisation des drivers](#id_drivers)
- [La réalisation des différentes fonctions du bateau](#id_bateau)
## <a id="id_drivers">Réalisation des drivers</a>
Pour cela, nous avons utilisé les 3 documentations disponibles dans la première section de ce [cours moodle](https://moodle.insa-toulouse.fr/course/view.php?id=79#section-1).
Nous avons donc réalisé les drivers suivant :
- [x] l'[ADC](Drivers/Inc/ADC.h)
- [x] les [GPIOs](Drivers/Inc/GPIO.h)
- [x] l'[UART](Drivers/Inc/UART.h)
- [x] les [Timers et le PWM](Drivers/Inc/TIMER.h)
Les drivers pour l'utilisation du SPI et de l'I2C nous sont fournis.
## <a id="id_bateau">Réalisation des différentes fonctions du bateau</a>
Pour cela nous avons utilisé les documentations disponible dans la [section suivante](https://moodle.insa-toulouse.fr/course/view.php?id=79#section-16) du cours moodle précédemment cité.
Nous avons donc réalisé les fonctions suivantes :
- [x] la [Girouette](Projet_voile/Includes/Girouette.h)
- [ ] l' [Horloge](Drivers/Inc/Horloge.h)
- [x] l'[IMU](Drivers/Inc/IMU.h)
- [x] le [Moteur des voiles](Drivers/Inc/Moteur_voile.h)
- [x] le [Moteur du plateau](Drivers/Inc/Moteur_plateau.h)
- [ ] la [Mesure de tension de la batterie](Drivers/Inc/Mesure_tension.h)
- [x] la [télécommande](Drivers/Inc/Telecommande.h)
Evidemment chacune de ces fonctions font appel aux drivers de la couche en dessous.
Enfin pour controler l'entiereté de ce bateau, nous utiliserons un code [principal](Projet_voile/Includes/Principal.h). Celui-ci fera appel aux sous programmes présents au dessus.