stm32中断优先级配置问题 ,明明配置好了优先级,但TIM6中断无法插入到EXTI中断里
#include "stm32f10x.h"
#include "include.h"
#define mem *(unsigned int *)
#define MOV(a,b) a=b
#define AND(a,b) a&=b
#define ADD(a,b) a+=b
#define OR(a,b) a|=b
unsigned int ax=0;
void TIM6_IRQHandler() {
ax++;
AND(mem 0x40001010,0x0);
if(ax<=1000){
MOV(mem 0x40010C0C,0xFFFF);
}
if(ax>1000){
MOV(mem 0x40010C0C,0xFFFD); //light up
if(ax==2000){
ax=0;
}
}
}
void EXTI9_5_IRQHandler(){
if((mem 0x40010414&1<<9)!=0){
mem 0x40010414|=1<<9;
ax=0;
while(1);
}
}
void Init(){
OR(mem 0x40021018 ,1<<3); //CRM_APB2EN GPIOB clock enable
OR(mem 0x40021018 ,1<<0); //CRM_APB2EN IOMUX clock enable
MOV(mem 0xE000ED0C,(0x5FA)<<16);
MOV(mem 0xE000ED0C ,0x600);//AIRCR PRIGROUP x.yyy
MOV(mem 0xE000E454 ,0x0000); //NVIC_IPR set int 54 PRI
MOV(mem 0xE000E423 ,0xFFFF); //NVIC_IPR set int 23 PRI
mem 0x40010010|=(1<<5); //EXINT9 PC9
mem 0x40010400|=(1<<9); //EXINT_INTEN EXINT9
mem 0x4001040C|=(1<<9); //EXINT_POLCFG1 EXINT9 Falling
OR(mem 0x4002101C ,1<<4); //CRM_APB1EN TMR6 clock enable
OR(mem 0xE000E104 ,1<<22); //NVIC_ISER1 int 54 enable
OR(mem 0xE000E100 ,1<<23); //NVIC_ISER1 int 23 enable
OR(mem 0x40001000 ,0x1); //GPIOx_CFGLR [0,3] output
MOV(mem 0x40001028 ,0xF); //TMR6_DIV 15
MOV(mem 0x4000102C ,0x3E7); //TMR6_PR 999
MOV(mem 0x4001100C ,0xFFF0); //GPIOC_ODT
MOV(mem 0X40010C0C ,0xFFFF); //GPIOB_ODT
MOV(mem 0x40011004 ,0x11111144); //GPIOC_CFGHR
MOV(mem 0X40010C00 ,0x11111111); //GPIOC_CFGLR
OR(mem 0x4000100C,0x1); //TMR6_IDEN (overflow interrupt enable
}
int main(){
Init();
return 0;
}
按下PC9后小灯就不闪了