单步调试可正常运行,下载到芯片里不能正常运行
我用的是STM32F429IIT与原子哥是一个系列的,采用的是HAL版本功能,下面是我的程序,非常简单,请教大神有没有遇到过类似的问题
int main(void)
{
u16 i;
HAL_Init(); //3õê¼»ˉHAL¿a
Stm32_Clock_Init(360,25,2,8); //éèÖÃê±Öó,180Mhz
delay_init(180); //3õê¼»ˉÑóê±oˉêy
LED_Init(); //3õê¼»ˉLED
while(1);
while(1)
{
HAL_GPIO_WritePin(GPIOD,GPIO_PIN_13,GPIO_PIN_SET); //LED0¶Ôó|òy½Å

B1à-μí£¬áᣬμèí¬óúLED0(0)
delay_ms(500);
HAL_GPIO_WritePin(GPIOD,GPIO_PIN_13,GPIO_PIN_RESET); //LED0¶Ôó|òy½Å

B1à-¸ß£¬Ãe£¬μèí¬óúLED0(1)
delay_ms(500); //Ñóê±500ms
}
}
一周热门 更多>