Compare commits
No commits in common. "master" and "master" have entirely different histories.
33 changed files with 520 additions and 5060 deletions
|
@ -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
|
|
@ -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
|
||||
|
|
Binary file not shown.
|
@ -1,229 +0,0 @@
|
|||
#ifndef _I2C_
|
||||
#define _I2C_
|
||||
|
||||
#include "stm32f10x.h"
|
||||
|
||||
/*************************************************************************************
|
||||
===================== By Periph team INSA GEI 2022 ===========================
|
||||
*************************************************************************************/
|
||||
|
||||
/*
|
||||
*************************************************************************************
|
||||
===================== I2C les IO STM32F103 =================================
|
||||
*************************************************************************************
|
||||
|
||||
Les IO sont pris en charge par la lib, pas besoin de faire les configurations Alt OD.
|
||||
|
||||
**I2C1**
|
||||
SCL PB6
|
||||
SDA PB7
|
||||
|
||||
**I2C2**
|
||||
SCL PB10
|
||||
SDA PB11
|
||||
|
||||
|
||||
*************************************************************************************
|
||||
==================== Fondamentaux I2C ==========================================
|
||||
*************************************************************************************
|
||||
- Bus synchrone Low speed (<100kHz) ou high speed (=400kHz), Ici Low speed 100kHz.
|
||||
- Transfert octet par octet, poids fort en premier, avec aquittement pour chaque octet
|
||||
- Deux lignes SDA et SCL (horloge) en open drain, repos '1'
|
||||
- bit "normal" = SDA stable lors du pulse SCL (ie durant l'état haut de SCL, SDA est stable)
|
||||
- bit Start/Stop/Restart = SDA non stable lorsque SCL vaut '1' (violation règle précédente)
|
||||
* Start : front descendant de SDA lorsque SCL vaut '1'
|
||||
* Stop : front montant de SDA lorsque SCL = '1'
|
||||
* Restart = Start en cours de trame (typiquement pour changer Write/read).
|
||||
- uC en Mode Master uniquement (c'est notre choix) : c'est le uC qui est maître de l'horloge SCL.
|
||||
- Le Slave a une @ 7 bits. On ajoute un bit LSB qui est /WR (donc 0 pour écriture, 1 pour lecture)
|
||||
- Une adresse s'écrit donc |a6 a5 a4 a3 a2 a1 a0 /WR| ce qui donne 8 bits. Elle indique une future
|
||||
lecture ou écriture.
|
||||
On parle d'@ 7 bits en regroupant |a6 a5 a4 a3 a2 a1 a0|
|
||||
On parle d'@ 8 bits en regroupant |a6 a5 a4 a3 a2 a1 a0 /WR| (donc une @ écriture, une @ lecture)
|
||||
NB : préférer le concept @7bits...c'est plus clair.
|
||||
|
||||
- On peut lire ou écrire une ou plusieurs données à la suite. C'est lors de l'envoie de l'adresse Slave
|
||||
par le Master que le sens à venir pour les datas est indiqué.
|
||||
- En écriture,
|
||||
* les Ack sont faits par le slave après chaque octet envoyé par le master (Ack = mise à 0 le bit 9).
|
||||
- En lecture,
|
||||
* dès que le l@ slave est transmise (/RW = 1), et le Ack réalisé, le slave positionne le bit 7
|
||||
du prochain octet à lire sur SDA par anticipation ,
|
||||
* le master enchaîne ses pulses (9), lors du pulse 9 (le dernier) c'est le master qui acquite.
|
||||
* Après chaque acquitement, le Slave amorce le prochain octet en positionnant son bit 7 sur SDA
|
||||
* Après le dernier octet, le Master génère un stop.
|
||||
* Pour pouvoir générer le stop, le Master doit piloter SDA, or ce n'est pas possible puisque
|
||||
le Slave positionne le futur bit 7 ... Pour régler ce problème :
|
||||
lors du dernier transfert, le Master N'acquitte PAS (NACK). Ainsi le Slave ne
|
||||
propose plus le bit 7 du prochain octet sur SDA et libère SDA. Le Master peut alors clôturer la
|
||||
communication avec un Stop.
|
||||
|
||||
|
||||
|
||||
|
||||
======= Echange typique avec un Slave ================================================================
|
||||
- Une lecture ou écriture se fait vers un Slave et à partir d'une adresse mémoire donnée (pointeur interne).
|
||||
Ce pointeur est automatiquement incrémenté dans le slave lors des accès écriture ou lecture.
|
||||
|
||||
- Ecriture de N octets , trame complète (@ = adresse slave, pt = valeur de chargement du pointeur interne)
|
||||
|Start Cond |@6|@5|@4|@3|@2|@1|@0| Wr =0 |Slave ACK|
|
||||
|pt7|pt6|pt5|pt4|pt3|pt2|pt1|pt0|Slave ACK|
|
||||
|d7|d6|d5|d4|d3|d2|d1|d0|Slave ACK| (data 1)
|
||||
.....
|
||||
|d7|d6|d5|d4|d3|d2|d1|d0|Salve ACK|Stop Cond| (data N)
|
||||
|
||||
- Lecture de N octets à partir d'une adresse de pointeur donnée
|
||||
|Start Cond |@6|@5|@4|@3|@2|@1|@0| Wr =0 |Slave ACK|
|
||||
|pt7|pt6|pt5|pt4|pt3|pt2|pt1|pt0|Slave ACK|
|
||||
|ReStart Cond |@6|@5|@4|@3|@2|@1|@0| Wr =1 |Slave ACK| (NB: restart nécessaire pour changer écriture / lecture)
|
||||
|d7|d6|d5|d4|d3|d2|d1|d0|Master ACK| (data 1)
|
||||
.....
|
||||
|d7|d6|d5|d4|d3|d2|d1|d0|Master ACK| (data N-1)
|
||||
|d7|d6|d5|d4|d3|d2|d1|d0|Master NACK|Stop Cond| (data N)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*************************************************************************************
|
||||
==================== La lib I2C ==========================================
|
||||
*************************************************************************************
|
||||
|
||||
3 fonctions essentielles :
|
||||
MyI2C_Init
|
||||
MyI2C_PutString
|
||||
MyI2C_GetString
|
||||
|
||||
1 fonction spéciale : MyI2C_Get_Error
|
||||
|
||||
Les fonctions Put/Get string fonctionnent sur le principe classique décrit précédemment
|
||||
(Slave@, Pter @, Data...).
|
||||
La fonction init prend parmi ses paramètres le nom d'une fct callback d'erreur.
|
||||
En fait, le driver gère en IT les erreurs possibles I2C. La fonction MyI2C_Get_Error permet de
|
||||
recevoir un code erreur.
|
||||
Il est conseillé d'utiliser ce callback. Si on tombe dedans, c'est qu'une erreur s'est produite.
|
||||
Si le code erreur est "inconnu", souvent c'est qu'il y a un soucis à l'adressage slave:
|
||||
Vérifier alors la connectique physique SDA/SCL ainsi que l'alimentation du slave ou tout simplement
|
||||
l'@ slave !
|
||||
|
||||
|
||||
==========================================================================================*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*=========================================================================================
|
||||
GESTION ERREURS
|
||||
========================================================================================= */
|
||||
typedef enum
|
||||
{
|
||||
OK,
|
||||
BusError, //
|
||||
AckFail, // Pas,d'ack
|
||||
TimeOut, // SCL est resté plus de 25ms à l'état bas
|
||||
UnknownError // IT erreur déclenchée mais pas de flag explicite ...
|
||||
} MyI2C_Err_Enum;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Retourne les erreurs I2C
|
||||
* @param I2Cx: where x can be 1 or 2 to select the I2C peripheral.
|
||||
* @retval Type d'erreur rencontrée , voir MyI2C_Err_Enum
|
||||
*/
|
||||
|
||||
MyI2C_Err_Enum MyI2C_Get_Error(I2C_TypeDef * I2Cx);
|
||||
|
||||
|
||||
|
||||
/*=========================================================================================
|
||||
INITIALISATION I2C
|
||||
========================================================================================= */
|
||||
|
||||
|
||||
/**
|
||||
* @brief Initialise l'interface I2C (1 ou 2)
|
||||
* @param I2Cx: where x can be 1 or 2 to select the I2C peripheral.
|
||||
* @param char IT_Prio_I2CErr 0 à 15 (utilisé en cas d'erreur, IT courte et non bloquante
|
||||
* @param *ITErr_function : callback à utiliser pour sortir d'un plantage transmission
|
||||
* @retval None
|
||||
* @Example MyI2C_Init(I2C1, 2,My_CallbackErr);
|
||||
|
||||
|
||||
|
||||
*/
|
||||
void MyI2C_Init(I2C_TypeDef * I2Cx, char IT_Prio_I2CErr, void (*ITErr_function) (void));
|
||||
|
||||
|
||||
|
||||
/*=========================================================================================
|
||||
EMISSION I2C : PutString
|
||||
========================================================================================= */
|
||||
|
||||
|
||||
// Structure de données pour l'émission ou la réception I2C :
|
||||
typedef struct
|
||||
{
|
||||
char SlaveAdress7bits; // l'adresse I2C du slave device
|
||||
char * Ptr_Data; // l'adresse du début de tableau char à recevoir/émettre (tableau en RAM uC)
|
||||
char Nb_Data; // le nbre d'octets à envoyer / recevoir
|
||||
}
|
||||
MyI2C_RecSendData_Typedef;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief|Start Cond |@6|@5|@4|@3|@2|@1|@0| Wr =0 |Slave ACK|
|
||||
|pt7|pt6|pt5|pt4|pt3|pt2|pt1|pt0|Slave ACK|
|
||||
|d7|d6|d5|d4|d3|d2|d1|d0|Slave ACK| (data 1)
|
||||
.....
|
||||
|d7|d6|d5|d4|d3|d2|d1|d0|Salve ACK|Stop Cond| (data N)
|
||||
|
||||
* @param I2Cx: where x can be 1 or 2 to select the I2C peripheral.
|
||||
* @param PteurAdress = adresse de démarrage écriture à l'interieur du slave I2C
|
||||
* @param DataToSend, adresse de la structure qui contient les informations à transmettre
|
||||
voir définition MyI2C_RecSendData_Typedef
|
||||
* @retval None
|
||||
* @Example MyI2C_PutString(I2C1,0xAA, &MyI2C_SendTimeData);
|
||||
* Ecrit dans le slave câblé sur I2C1 à partir de l'@ mémoire interne Slave 0xAA
|
||||
|
||||
*/
|
||||
void MyI2C_PutString(I2C_TypeDef * I2Cx, char PteurAdress, MyI2C_RecSendData_Typedef * DataToSend);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*=========================================================================================
|
||||
Réception I2C : GetString
|
||||
========================================================================================= */
|
||||
|
||||
/**
|
||||
* @brief |Start Cond |@6|@5|@4|@3|@2|@1|@0| Wr =0 |Slave ACK|
|
||||
|pt7|pt6|pt5|pt4|pt3|pt2|pt1|pt0|Slave ACK|
|
||||
|ReStart Cond |@6|@5|@4|@3|@2|@1|@0| Wr =1 |Slave ACK|
|
||||
|d7|d6|d5|d4|d3|d2|d1|d0|Master ACK| (data 1)
|
||||
.....
|
||||
|d7|d6|d5|d4|d3|d2|d1|d0|Master NACK|Stop Cond| (data N)
|
||||
|
||||
* @param I2Cx: where x can be 1 or 2 to select the I2C peripheral.
|
||||
* @param PteurAdress = adresse de démarrage lecture à l'interieur du slave I2C
|
||||
* @param DataToSend, adresse de la structure qui contient les informations nécessaires à la
|
||||
réception des données voir définition MyI2C_RecSendData_Typedef
|
||||
* @retval None
|
||||
* @Example MyI2C_GetString(I2C1,0xAA, &MyI2C_RecevievedTimeData);
|
||||
Lit dans le slave câblé sur I2C1 à partir de l'@ mémoire interne Slave 0xAA
|
||||
*/
|
||||
void MyI2C_GetString(I2C_TypeDef * I2Cx, char PteurAdress, MyI2C_RecSendData_Typedef * DataToReceive);
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
|
@ -1,145 +0,0 @@
|
|||
|
||||
#ifndef INC_MYSPI_H_
|
||||
#define INC_MYSPI_H_
|
||||
|
||||
#include "stm32f10x.h"
|
||||
|
||||
#define DATAX0 0x32
|
||||
#define DATAX1 0x33
|
||||
#define DATAY0 0x34
|
||||
#define DATAY1 0x35
|
||||
#define DATAZ0 0x36
|
||||
#define DATAZ1 0x37
|
||||
#define DATA_FORMAT 0x31
|
||||
#define BW_RATE 0x2C
|
||||
#define POWER_CTL 0x2D
|
||||
#define READ_MB 0xC0
|
||||
#define WRITE_MB 0x40
|
||||
#define READ 0x80
|
||||
#define WRITE 0x00
|
||||
|
||||
|
||||
/*************************************************************************************
|
||||
===================== By Periph team INSA GEI 2022 ===========================
|
||||
*************************************************************************************/
|
||||
|
||||
/*
|
||||
*************************************************************************************
|
||||
===================== I2C les IO STM32F103 =================================
|
||||
*************************************************************************************
|
||||
Les IO sont pris en charge par la lib, pas besoin de faire les configurations
|
||||
|
||||
|
||||
Sur la Nucléo , le SPI1 est perturbé par la LED2 (PA5), mais doit pouvoir subir les front SCK qd même (LED clignote vite..)
|
||||
le SPI2 n'est pas utilisable car pin non connectées par défaut (sauf à modifier les SB). En fait la Nucléo fait un choix entre SPI1
|
||||
et SPI2 par soudage jumper (SB).
|
||||
|
||||
-> Utiliser SPI1 avec la carte Nucléo
|
||||
|
||||
* **IO SPI 1**
|
||||
SPI1_NSS PA4
|
||||
SPI1_SCK PA5
|
||||
SPI1_MISO PA6
|
||||
SPI1_MOSI PA7
|
||||
|
||||
**IO SPI 2**
|
||||
SPI2_NSS PB12
|
||||
SPI2_SCK PB13
|
||||
SPI2_MISO PB14
|
||||
SPI2_MOSI PB15
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*************************************************************************************
|
||||
==================== Fondamentaux SPI ==========================================
|
||||
*************************************************************************************
|
||||
- Bus Synchrone, 4 fils (même si on peut l'utiliser en 3 fils)
|
||||
- Transfert à l'octet
|
||||
- Protocole entre un Master (contrôle SCK) et un Slave
|
||||
- SCK permet de synchroniser les bits de chaque octet. Il se configure par :
|
||||
* son niveau de repos : ici niveau '1'
|
||||
* le front actif de synchronisation pour chaque bit : ici front montant (front up durant bit stable)
|
||||
- /CS ou /NSS active le slave sur l'état bas
|
||||
- MOSI : Master Out Slave In (donc data circulant du Master vers le Slave, donc écriture dans le Slave)
|
||||
- MISO : Master In Slave Out (donc data circulant du Slave vers le Master, donc lecture du Slave)
|
||||
|
||||
Bien que la lib propose une fonction d'écriture et de lecture :
|
||||
* une écriture s'accompagne obligatoirement d'une lecture (bidon)
|
||||
* une lecture s'accompagne obligatoirement d'une écriture (bidon)
|
||||
La gestion /CS = /NSS se fait "à la main". On peut alors lire toute une série d'octets
|
||||
en laissant /CS à l'état bas pendant toute la durée de circulation des octets.
|
||||
|
||||
|
||||
*************************************************************************************
|
||||
==================== La lib SPI ==========================================
|
||||
*************************************************************************************
|
||||
|
||||
fonctions essentielles :
|
||||
|
||||
MySPI_Init
|
||||
MySPI_Send
|
||||
MySPI_Read
|
||||
MySPI_Set_NSS
|
||||
MySPI_Clear_NSS
|
||||
|
||||
|
||||
==========================================================================================*/
|
||||
|
||||
|
||||
|
||||
|
||||
/*=========================================================================================
|
||||
INITIALISATION SPI
|
||||
========================================================================================= */
|
||||
|
||||
/**
|
||||
* @brief Configure le SPI spécifié : FSCK = 281kHz, Repos SCK = '1', Front actif = up
|
||||
Gestion /CS logicielle à part, configure les 4 IO
|
||||
- SCK, MOSI : Out Alt push pull
|
||||
- MISO : floating input
|
||||
- /NSS (/CS) : Out push pull
|
||||
* @param SPI_TypeDef * SPI : SPI1 ou SPI2
|
||||
*/
|
||||
void MySPI_Init(SPI_TypeDef * SPI);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Envoie un octet (/CS non géré, à faire logiciellement)
|
||||
Plus en détail, émission de l'octet souhaité sur MOSI
|
||||
Lecture en même temps d'un octet poubelle sur MISO (non exploité)
|
||||
* @param : char ByteToSend : l'octet à envoyer
|
||||
*/
|
||||
void MySPI_Send(char ByteToSend);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Reçoit un octet (/CS non géré, à faire logiciellement)
|
||||
Plus en détail, émission d'un octet bidon sur MOSI (0x00)
|
||||
pour élaborer les 8 fronts sur SCK et donc piloter le slave en lecture
|
||||
qui répond sur MISO
|
||||
* @param : none
|
||||
* @retval : l'octet lu.
|
||||
*/
|
||||
char MySPI_Read(void);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Positionne /CS = /NSS à '1'. A utiliser pour borner les octets à transmettre/recevoir
|
||||
* @param : none
|
||||
*/
|
||||
void MySPI_Set_NSS(void);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Positionne /CS = /NSS à '0'. A utiliser pour borner les octets à transmettre/recevoir
|
||||
* @param :none
|
||||
*/
|
||||
void MySPI_Clear_NSS(void);
|
||||
|
||||
#endif
|
|
@ -1,9 +1,7 @@
|
|||
#ifndef MYTIMER_H
|
||||
#define MYTIMER_H
|
||||
#include "GPIO.h"
|
||||
#include "stm32f10x.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
TIM_TypeDef * Timer ; // TIM1 à TIM4
|
||||
|
@ -33,15 +31,6 @@ void MyTimer_ActiveIT (TIM_TypeDef * Timer, char Prio, void (*IT_function)(void)
|
|||
|
||||
#define MyTimer_Base_Start(Timer) (Timer->CR1 |= 0x01)
|
||||
#define MyTimer_Base_Stop(Timer) (Timer->CR1 &= ~0x01)
|
||||
#define PWM_output 0x00
|
||||
#define PWM_inputTI1 0x01
|
||||
#define PWM_inputTI2 0x10
|
||||
#define PWM_inputTRC 0x11
|
||||
|
||||
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
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
#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
|
|
@ -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;
|
||||
}
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -1,195 +1,92 @@
|
|||
#include "TIMER.h"
|
||||
|
||||
void (*tim_ptr1_func)(void);
|
||||
void (*tim_ptr2_func)(void);
|
||||
void (*tim_ptr3_func)(void);
|
||||
void (*tim_ptr4_func)(void);
|
||||
/*periode_timer=peridoe_horloge*prescaler*resolution
|
||||
debordement stocké dans registre UIF
|
||||
fixer val prescaler+ autoreload(equivalent resolution)
|
||||
demarrage timer => CEN=1*/
|
||||
|
||||
void (*ptr_func)(void);
|
||||
|
||||
void MyTimer_Base_Init ( MyTimer_Struct_TypeDef * Timer)
|
||||
{
|
||||
if(Timer->Timer==TIM1)
|
||||
{
|
||||
RCC->APB2ENR |= RCC_APB2ENR_TIM1EN;
|
||||
RCC->APB2ENR |= 0x01<<11;
|
||||
}
|
||||
else if (Timer->Timer==TIM2)
|
||||
{
|
||||
RCC->APB1ENR |= RCC_APB1ENR_TIM2EN;
|
||||
RCC->APB1ENR |= 0x01;
|
||||
}
|
||||
else if (Timer->Timer==TIM3)
|
||||
{
|
||||
RCC->APB1ENR |= RCC_APB1ENR_TIM3EN;
|
||||
RCC->APB1ENR |= 0x01<<1;
|
||||
}
|
||||
else if (Timer->Timer==TIM4)
|
||||
{
|
||||
RCC->APB1ENR |= RCC_APB1ENR_TIM4EN;
|
||||
RCC->APB1ENR |= 0x01<<2;
|
||||
}
|
||||
Timer->Timer->ARR=Timer->ARR; // On set la donnée d'autoreload
|
||||
Timer->Timer->PSC=Timer->PSC; // On set la donnée de prescaler (ce qui va nous permettre de diviser la valeur d'autoreaload)
|
||||
Timer->Timer->ARR=Timer->ARR;
|
||||
Timer->Timer->PSC=Timer->PSC;
|
||||
}
|
||||
|
||||
void MyPWM_init ( TIM_TypeDef * Timer,char Channel)
|
||||
{
|
||||
TIM1->BDTR |= TIM_BDTR_MOE;
|
||||
if(Channel==1)
|
||||
{
|
||||
Timer->CCMR1&=~0x00FF;
|
||||
Timer->CCMR1 &= ~TIM_CCMR1_OC1M_0;
|
||||
Timer->CCMR1 |= TIM_CCMR1_OC1M_1| TIM_CCMR1_OC1M_2;
|
||||
Timer->CCER |= TIM_CCER_CC1E;
|
||||
|
||||
}
|
||||
if(Channel==2)
|
||||
{
|
||||
Timer->CCMR1&=~0xFF00;
|
||||
Timer->CCMR1 &= ~TIM_CCMR1_OC2M_0;
|
||||
Timer->CCMR1 |= TIM_CCMR1_OC2M_1| TIM_CCMR1_OC2M_2;
|
||||
Timer->CCER |= TIM_CCER_CC2E;
|
||||
|
||||
}
|
||||
if(Channel==3)
|
||||
{
|
||||
Timer->CCMR2&=~0x00FF;
|
||||
Timer->CCMR2 &= ~TIM_CCMR2_OC3M_0;
|
||||
Timer->CCMR2 |= TIM_CCMR2_OC3M_1| TIM_CCMR2_OC3M_2;
|
||||
Timer->CCER |= TIM_CCER_CC3E;
|
||||
|
||||
}
|
||||
if(Channel==4)
|
||||
{
|
||||
Timer->CCMR2&=~0xFF00;
|
||||
Timer->CCMR2 &= ~TIM_CCMR2_OC4M_0;
|
||||
Timer->CCMR2 |= TIM_CCMR2_OC4M_1| TIM_CCMR2_OC4M_2;
|
||||
Timer->CCER |= TIM_CCER_CC4E;
|
||||
|
||||
}
|
||||
}
|
||||
void MyPWM_Duty (TIM_TypeDef * Timer,char Channel, unsigned short CRR )
|
||||
{
|
||||
|
||||
|
||||
if(Channel==1)
|
||||
{
|
||||
Timer->CCR1=CRR;
|
||||
}
|
||||
if(Channel==2)
|
||||
{
|
||||
Timer->CCR2=CRR;
|
||||
}
|
||||
if(Channel==3)
|
||||
{
|
||||
Timer->CCR3=CRR;
|
||||
}
|
||||
if(Channel==4)
|
||||
{
|
||||
Timer->CCR4=CRR;
|
||||
}
|
||||
|
||||
}
|
||||
void MyTimer_ActiveIT (TIM_TypeDef * Timer, char Prio, void (*IT_function)(void))
|
||||
{
|
||||
int num_tim;
|
||||
Timer->DIER |= 0x01; // On autorise les interruptions sur timer
|
||||
ptr_func=IT_function;
|
||||
Timer->DIER |= 0x01;
|
||||
if(Timer==TIM1)
|
||||
{
|
||||
num_tim=TIM1_UP_IRQn;
|
||||
tim_ptr1_func=IT_function;
|
||||
num_tim=TIM1_UP_IRQn;
|
||||
}
|
||||
else if(Timer==TIM2)
|
||||
{
|
||||
num_tim=TIM2_IRQn;
|
||||
tim_ptr2_func=IT_function;
|
||||
}
|
||||
else if(Timer==TIM3)
|
||||
{
|
||||
num_tim=TIM3_IRQn;
|
||||
tim_ptr3_func=IT_function;
|
||||
}
|
||||
else if(Timer==TIM4)
|
||||
{
|
||||
num_tim=TIM4_IRQn;
|
||||
tim_ptr4_func=IT_function;
|
||||
}
|
||||
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
|
||||
NVIC->ISER[0] |= 0x01<<num_tim;
|
||||
NVIC->IP[num_tim] |= Prio << 4;
|
||||
|
||||
}
|
||||
|
||||
void init_encoder_timer(void (*IT_function)(void)) //voir page 391
|
||||
{
|
||||
MyGPIO_Struct_TypeDef GPIO_PB6;
|
||||
MyGPIO_Struct_TypeDef GPIO_PB7;
|
||||
MyTimer_Struct_TypeDef Timer;
|
||||
|
||||
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)
|
||||
{
|
||||
if(tim_ptr2_func!=0)
|
||||
if(ptr_func!=0)
|
||||
{
|
||||
(*tim_ptr2_func)();
|
||||
(*ptr_func)();
|
||||
}
|
||||
TIM2->SR &= ~(1<<0) ; // Remet à 0 le flag de l'interruption
|
||||
TIM2->SR &= ~(1<<0) ;
|
||||
}
|
||||
|
||||
void TIM3_IRQHandler (void)
|
||||
{
|
||||
if(tim_ptr3_func!=0)
|
||||
if(ptr_func!=0)
|
||||
{
|
||||
(*tim_ptr3_func)();
|
||||
(*ptr_func)();
|
||||
}
|
||||
TIM3->SR &= ~(1<<0);
|
||||
TIM3->SR &= ~(1<<0) ;
|
||||
}
|
||||
|
||||
void TIM4_IRQHandler (void)
|
||||
{
|
||||
if(tim_ptr4_func!=0)
|
||||
if(ptr_func!=0)
|
||||
{
|
||||
(*tim_ptr4_func)();
|
||||
(*ptr_func)();
|
||||
}
|
||||
TIM4->SR &= ~(1<<0) ;
|
||||
}
|
||||
|
||||
void TIM1_UP_IRQHandler (void)
|
||||
void TIM1_UP_IRQHandler (void) // à vérifier
|
||||
{
|
||||
if(tim_ptr1_func!=0)
|
||||
if(ptr_func!=0)
|
||||
{
|
||||
(*tim_ptr1_func)();
|
||||
(*ptr_func)();
|
||||
}
|
||||
TIM1->SR &= ~(1<<0);
|
||||
TIM1->SR &= ~(1<<0) ;
|
||||
}
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
#include "UART.h"
|
||||
#include "GPIO.h"
|
||||
|
||||
void (*uart_rx_ptr_func)(void);
|
||||
|
||||
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)) // 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
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
void USART1_IRQHandler()
|
||||
{
|
||||
if (USART1->SR & USART_SR_RXNE)
|
||||
{
|
||||
//USART1->SR &= ~USART_SR_RXNE; // On abaisse le flag d'interruption
|
||||
if(uart_rx_ptr_func!=0)
|
||||
{
|
||||
(*uart_rx_ptr_func)();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
char UART_receive()
|
||||
{
|
||||
return USART1->DR; // on recupere dans DR
|
||||
}
|
38
Projet_DevDrivers/Sources/Principal.c
Normal file
38
Projet_DevDrivers/Sources/Principal.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include "stm32f10x.h"
|
||||
#include "GPIO.h"
|
||||
#include "TIMER.h"
|
||||
|
||||
|
||||
|
||||
void Mafonction_IT (void);
|
||||
MyGPIO_Struct_TypeDef PA5;
|
||||
MyGPIO_Struct_TypeDef PC13;
|
||||
MyTimer_Struct_TypeDef timer2;
|
||||
//PA5 LED
|
||||
//PC13 Bouton
|
||||
|
||||
int main ( void )
|
||||
{
|
||||
PA5.GPIO=GPIOA;
|
||||
PA5.GPIO_Conf=Out_Ppull;
|
||||
PA5.GPIO_Pin=5;
|
||||
MyGPIO_Init(&PA5);
|
||||
timer2.Timer=TIM2;
|
||||
timer2.ARR=35999; //pour avoir 500ms
|
||||
timer2.PSC=1000;
|
||||
MyTimer_Base_Init(&timer2);
|
||||
MyTimer_ActiveIT(timer2.Timer,1, &Mafonction_IT);
|
||||
MyTimer_Base_Start(timer2.Timer);
|
||||
|
||||
while(1)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Mafonction_IT (void)
|
||||
{
|
||||
MyGPIO_Toggle(PA5.GPIO,5);
|
||||
}
|
|
@ -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>
|
||||
|
@ -75,7 +75,7 @@
|
|||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>0</IsCurrentTarget>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>18</CpuCode>
|
||||
<DebugOpt>
|
||||
|
@ -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=-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=1189,292,1783,1043,1)(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>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
|
@ -138,40 +138,7 @@
|
|||
<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/>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
|
@ -192,7 +159,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 +181,23 @@
|
|||
<pszMrulep></pszMrulep>
|
||||
<pSingCmdsp></pSingCmdsp>
|
||||
<pMultCmdsp></pMultCmdsp>
|
||||
<LogicAnalyzers>
|
||||
<Wi>
|
||||
<IntNumber>0</IntNumber>
|
||||
<FirstString>((PORTA & 0x00000020) >> 5 & 0x20) >> 5</FirstString>
|
||||
<SecondString>FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028504F5254412026203078303030303030323029203E3E2035000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F170000000000000000000000000000000000000090020008</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>
|
||||
|
@ -278,7 +262,7 @@
|
|||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
<IsCurrentTarget>0</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>18</CpuCode>
|
||||
<DebugOpt>
|
||||
|
@ -328,7 +312,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=-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>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
|
@ -352,28 +336,6 @@
|
|||
</SetRegEntry>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint/>
|
||||
<WatchWindow1>
|
||||
<Ww>
|
||||
<count>0</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>cnt,0x0A</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>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
|
@ -382,7 +344,7 @@
|
|||
<periodic>1</periodic>
|
||||
<aLwin>1</aLwin>
|
||||
<aCover>0</aCover>
|
||||
<aSer1>1</aSer1>
|
||||
<aSer1>0</aSer1>
|
||||
<aSer2>0</aSer2>
|
||||
<aPa>0</aPa>
|
||||
<viewmode>1</viewmode>
|
||||
|
@ -394,7 +356,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>
|
||||
|
@ -451,18 +413,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,85 +420,13 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>4</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\Drivers\Src\TIMER.c</PathWithFileName>
|
||||
<FilenameWithoutPath>TIMER.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>5</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</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>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>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>9</FileNumber>
|
||||
<FileNumber>3</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\Sources\CAP_voilier.c</PathWithFileName>
|
||||
<FilenameWithoutPath>CAP_voilier.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>10</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>
|
||||
<PathWithFileName>..\Drivers\Src\TIMER.c</PathWithFileName>
|
||||
<FilenameWithoutPath>TIMER.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</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,406 @@
|
|||
<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>
|
||||
</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>
|
||||
|
@ -840,55 +800,6 @@
|
|||
<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>
|
||||
<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 +815,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é"/>
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -1,23 +0,0 @@
|
|||
#ifndef ROULI_H
|
||||
#define ROULI_H
|
||||
|
||||
#include "stm32f10x.h"
|
||||
#include "GPIO.h"
|
||||
#include "TIMER.h"
|
||||
#include "MySPI.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float gX;
|
||||
float gY;
|
||||
float gZ;
|
||||
|
||||
}XYZ;
|
||||
|
||||
void rouli_InitAccel(void);
|
||||
|
||||
void rouli_GetAccel (XYZ * axe);
|
||||
|
||||
void rouli_IT_Bascule(void);
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load diff
|
@ -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
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,52 +0,0 @@
|
|||
#include "CAP_voilier.h"
|
||||
|
||||
MyTimer_Struct_TypeDef timer1;
|
||||
void Madirection_IT (void);
|
||||
signed char direction ;
|
||||
int duty_cap ;
|
||||
MyGPIO_Struct_TypeDef PA8;
|
||||
MyGPIO_Struct_TypeDef PB1;
|
||||
char valeur =0;
|
||||
extern char MyChar;
|
||||
|
||||
|
||||
void My_cap_init(void)
|
||||
{
|
||||
PA8.GPIO=GPIOA;
|
||||
PA8.GPIO_Conf=AltOut_Ppull;
|
||||
PA8.GPIO_Pin=8;
|
||||
MyGPIO_Init(&PA8);
|
||||
|
||||
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;
|
||||
MyTimer_Base_Init(&timer1);
|
||||
MyTimer_Base_Start(timer1.Timer);
|
||||
MyPWM_init(timer1.Timer,1);
|
||||
MyUART_init();
|
||||
|
||||
MyUART_ActiveIT(1,&Madirection_IT);
|
||||
|
||||
}
|
||||
|
||||
void Madirection_IT (void)
|
||||
{
|
||||
direction = UART_receive();
|
||||
if( direction <0 )
|
||||
{
|
||||
MyGPIO_Set(GPIOB,1);
|
||||
valeur =-direction;
|
||||
}
|
||||
else
|
||||
{
|
||||
MyGPIO_Reset(GPIOB,1);
|
||||
valeur = direction;
|
||||
}
|
||||
duty_cap=valeur;
|
||||
MyPWM_Duty(timer1.Timer,1, duty_cap );
|
||||
}
|
|
@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
#include "Rouli.h"
|
||||
|
||||
|
||||
|
||||
/* Dans cette partie nous allons traiter le roulis du voiluier */
|
||||
|
||||
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<61>tres */
|
||||
MySPI_Send(WRITE|BW_RATE); /* Ecriture dans le BW rate */
|
||||
MySPI_Send(0x0A); /* Envoi des param<61>tres */
|
||||
MySPI_Send(WRITE|POWER_CTL); /* Ecriture dans le POWER_CTL */
|
||||
MySPI_Send(0x08); /* Envoi des param<61>tre */
|
||||
MySPI_Set_NSS();
|
||||
}
|
||||
|
||||
|
||||
void rouli_GetAccel (XYZ * axe)
|
||||
{
|
||||
char X0,X1,Y0,Y1,Z0,Z1;
|
||||
|
||||
MySPI_Clear_NSS();
|
||||
|
||||
MySPI_Send(READ_MB|DATAX0);
|
||||
|
||||
X0 = MySPI_Read () ;
|
||||
X1 = MySPI_Read () ;
|
||||
Y0 = MySPI_Read () ;
|
||||
Y1 = MySPI_Read () ;
|
||||
Z0 = MySPI_Read () ;
|
||||
Z1 = MySPI_Read () ;
|
||||
MySPI_Set_NSS();
|
||||
|
||||
axe->gX = ((short int)((X1<<8)|X0))*0.004;
|
||||
axe->gY = ((short int)((Y1<<8)|Y0))*0.004;
|
||||
axe->gZ = ((short int)((Z1<<8)|Z0))*0.004;
|
||||
}
|
||||
|
||||
// axe y entre -0.7 et 0.7
|
||||
|
42
README.md
42
README.md
|
@ -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.
|
Loading…
Reference in a new issue