问答

汇集网友智慧,解决技术难题

骑行青年

TA的家园币:63  

  • FreeRTOS能否在AT32F415RCT7上运行?

    AT32F415RCT7不能运行FreeRTOS吗?官方的库里面只有413以上的版本才有Freertos的例程,415在KEIL配置里也没有地方打开浮点单元。下载视频

    2021-06-13 0
  • AT32F421C8T7外部中断问题

    程序将PB2引脚作为外部中断引脚,程序配置之后,引脚上电平变化时程序不能进入中断处理函数。以下为代码,请各位帮忙看看是否有配置不对的地方。voidcheck_gpio_init(void){GPIO_InitTypeGPIO_InitStructure;EXTI_InitTypeEXTI_InitStructure;NVIC_InitTypeNVIC_InitStructure;RCC_AHBPeriphClockCmd(RCC_AHBPERIPH_GPIOB,ENABLE);GPIO_InitStructure.GPIO_Mode=GPIO_Mode_IN;GPIO_InitStructure.GPIO_Pull=GPIO_Pull_NOPULL;GPIO_InitStructure.GPIO_MaxSpeed=GPIO_MaxSpeed_50MHz;GPIO_InitStructure.GPIO_OutType=GPIO_OutType_PP;GPIO_InitStructure.GPIO_Pins=GPIO_Pins_2;GPIO_Init(GPIOB,&GPIO_InitStructure);SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOB,EXTI_PinSource2);EXTI_InitStructure.EXTI_Line=EXTI_Line2;EXTI_InitStructure.EXTI_Mode=EXTI_Mode_Interrupt;EXTI_InitStructure.EXTI_Trigger=EXTI_Trigger_Falling;EXTI_InitStructure.EXTI_LineEnable=ENABLE;EXTI_Init(&EXTI_InitStructure);NVIC_InitStructure.NVIC_IRQChannel=EXTI3_2_IRQn;NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority=0;NVIC_InitStructure.NVIC_IRQChannelSubPriority=1;NVIC_InitStructure.NVIC_IRQChannelCmd=ENABLE;NVIC_Init(&NVIC_InitStructure);}voidEXTI3_2_IRQHandler(void){if(EXTI_GetIntStatus(EXTI_Line2)!=RESET){if(check_pin_read()==RESET){irq_count++;if(irq_count>=20){fault_status=0;irq_count=0;//device_check_en(DISABLE);}}EXTI_ClearIntPendingBit(EXTI_Line2);}}下载视频

    外部中断 pi ni IO TI

    2021-01-21 1