stm32f407的串口调试助手乱码

1.主程序如下:

int main(void)
{
    
    
	u32 t=0;
	uart_init(115200);
	delay_init(84);
	
  while(1)
	{
    
    
    	printf("t:%d\r\n",t);
		delay_ms(2000);
		t++;
		//if(t==40)
			//break;
	}
}

2.本来是乱码的

因为默认的波特率为9600

改成115200就行了
正常显示

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_47289438/article/details/110383366