Compare commits

...

3 commits

Author SHA1 Message Date
alejeune
7c6eb49e2c update config file 2022-11-25 16:51:50 +01:00
rlacroix
a8bbc5600c Merge remote-tracking branch 'origin/Heure'
# Conflicts:
#	Listings/Projet1_Simulation.map
#	Objects/Projet1_Réel.dep
#	Objects/Projet1_Simulation.axf
#	Objects/Projet1_Simulation.build_log.htm
#	Objects/Projet1_Simulation.htm
#	Objects/batterie.o
#	Objects/driver_gpio.o
#	Objects/main.crf
#	Objects/main.o
#	Objects/myadc.o
#	Objects/mygirouette.crf
#	Objects/mygirouette.o
#	Objects/mytimer.o
#	Objects/myvoile.o
#	Objects/plateau.o
#	Objects/system_stm32f10x.o
#	Objects/telecommande.o
2022-11-25 16:47:48 +01:00
joelimgu
7487e08f58 interrupt girouette 2022-11-25 16:11:27 +01:00
3 changed files with 115 additions and 105 deletions

View file

@ -7,6 +7,7 @@ int x = 0;
void EXTI0_IRQHandler(void) { void EXTI0_IRQHandler(void) {
x++; x++;
//EXTI->PR &= ~(1<<0) ; //EXTI->PR &= ~(1<<0) ;
TIM2 -> CNT = 0 ;
EXTI->PR |= (1<<0) ; EXTI->PR |= (1<<0) ;
} }
@ -43,14 +44,14 @@ void Init_Girouette(void){
TIM2->SMCR |= 0x1 << 0; // Capture Mode : 1 => seulement les fronts montants 2 => seulement les fronts descendants 3 => les 2 TIM2->SMCR |= 0x1 << 0; // Capture Mode : 1 => seulement les fronts montants 2 => seulement les fronts descendants 3 => les 2
TIM2->CCMR1 |= 0x1 << 2; TIM2->CCMR1 |= 0x1 << 2;
// 0 Reset // 0 Reset
// NVIC->ISER[0] |= 1 << 6; NVIC->ISER[0] |= 1 << 6;
// NVIC->IP[6] = 1<<4; NVIC->IP[6] = 1<<4;
// MyGPIO_Init(&GPIOB0); MyGPIO_Init(&GPIOB0);
// RCC->APB2ENR |= RCC_APB2ENR_AFIOEN ; RCC->APB2ENR |= RCC_APB2ENR_AFIOEN ;
// AFIO->EXTICR[0] |= 0x0001; // PB0 AFIO AFIO->EXTICR[0] |= 0x0001; // PB0 AFIO
// EXTI->RTSR |= 1 <<0 ; // rising EXTI->RTSR |= 1 <<0 ; // rising
// EXTI->IMR |= 1<<0 ; //mask EXTI->IMR |= 1<<0 ; //mask
//
MyGPIO_Init(&GPIOA0); MyGPIO_Init(&GPIOA0);
MyGPIO_Init(&GPIOA1); MyGPIO_Init(&GPIOA1);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long