Basic JTAG working
This commit is contained in:
parent
37338e2ad8
commit
3beecbc4fa
9 changed files with 147 additions and 65 deletions
|
|
@ -64,26 +64,10 @@ void adc_init() {
|
|||
TIM1->CCR1 = 1;
|
||||
TIM1->BDTR = TIM_BDTR_MOE;
|
||||
|
||||
/* DEBUG */
|
||||
TIM1->DIER = TIM_DIER_CC1IE;
|
||||
NVIC_EnableIRQ(TIM1_CC_IRQn);
|
||||
NVIC_SetPriority(TIM1_CC_IRQn, 130);
|
||||
/* END DEBUG */
|
||||
|
||||
TIM1->CR1 = TIM_CR1_CEN;
|
||||
TIM1->EGR = TIM_EGR_UG;
|
||||
}
|
||||
|
||||
void TIM1_CC_IRQHandler(void) {
|
||||
TIM1->SR &= ~TIM_SR_CC1IF;
|
||||
static int foo=0;
|
||||
foo++;
|
||||
if (foo == 500) {
|
||||
foo = 0;
|
||||
GPIOA->ODR ^= 1<<6;
|
||||
}
|
||||
}
|
||||
|
||||
void DMA2_Stream0_IRQHandler(void) {
|
||||
uint8_t isr = (DMA2->LISR >> DMA_LISR_FEIF0_Pos) & 0x3f;
|
||||
GPIOA->BSRR = 1<<11;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue