Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
|
7c6eb49e2c | ||
|
a8bbc5600c | ||
|
7487e08f58 |
3 changed files with 115 additions and 105 deletions
|
@ -7,6 +7,7 @@ int x = 0;
|
|||
void EXTI0_IRQHandler(void) {
|
||||
x++;
|
||||
//EXTI->PR &= ~(1<<0) ;
|
||||
TIM2 -> CNT = 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->CCMR1 |= 0x1 << 2;
|
||||
// 0 Reset
|
||||
// NVIC->ISER[0] |= 1 << 6;
|
||||
// NVIC->IP[6] = 1<<4;
|
||||
// MyGPIO_Init(&GPIOB0);
|
||||
// RCC->APB2ENR |= RCC_APB2ENR_AFIOEN ;
|
||||
// AFIO->EXTICR[0] |= 0x0001; // PB0 AFIO
|
||||
// EXTI->RTSR |= 1 <<0 ; // rising
|
||||
// EXTI->IMR |= 1<<0 ; //mask
|
||||
//
|
||||
NVIC->ISER[0] |= 1 << 6;
|
||||
NVIC->IP[6] = 1<<4;
|
||||
MyGPIO_Init(&GPIOB0);
|
||||
RCC->APB2ENR |= RCC_APB2ENR_AFIOEN ;
|
||||
AFIO->EXTICR[0] |= 0x0001; // PB0 AFIO
|
||||
EXTI->RTSR |= 1 <<0 ; // rising
|
||||
EXTI->IMR |= 1<<0 ; //mask
|
||||
|
||||
|
||||
MyGPIO_Init(&GPIOA0);
|
||||
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
Loading…
Reference in a new issue