完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
主函数代码如下
int main(void) { /*!< At this stage the microcontroller clock setting is already configured, this is done through SystemInit() function which is called from startup file (startup_STM32f10x_xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f10x.c file */ u16 i, len, c2len; u16 x; u16 y; u8 c[] = "www.armjishu.com"; u8 c2[] = "TFT LCD 320X240"; u8 *str; u16 charColor; u16 bkColor; len = sizeof(c)-1; c2len = sizeof(c2)-1; /* USARTx configured as follow: - BaudRate = 115200 baud - Word Length = 8 Bits - One Stop Bit - No parity - Hardware flow control disabled (RTS and CTS signals) - Receive and transmit enabled */ USART_InitStructure.USART_BaudRate = 115200; USART_InitStructure.USART_WordLength = USART_WordLength_8b; USART_InitStructure.USART_StopBits = USART_StopBits_1; USART_InitStructure.USART_Parity = USART_Parity_No; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; STM_EVAL_COMInit(COM1, &USART_InitStructure); /* Output a message on Hyperterminal using printf function */ printf("nrUSART Printf Example: retarget the C library printf function to the USARTnr"); printf("rnnn WWW.ARMJISHU.COM %s configured....", EVAL_COM1_STR); printf("nr ############ WWW.ARMJISHU.COM! ############ ("__DATE__ " - " __TIME__ ")"); printf("rn"); printf(" _____ _______ __ __ ____ ___ ______ __ ___rn"); printf(" / ____|__ __| \/ |___ \__ \| ____/_ |/ _ \rn"); printf("| (___ | | | \ / | __) | ) | |__ | | | | |_ __rn"); printf(" \___ \ | | | |\/| ||__ < / /| __| | | | | \ \/ /rn"); printf(" ____) | | | | | | |___) / /_| | | | |_| |> |
|
相关推荐
6个回答
|
|
没人么??
|
|
|
|
慢慢 缩小包围圈,看问题出在哪?
|
|
|
|
回复第 3 楼 于2013-03-12 22:25:14发表:
慢慢 缩小包围圈,看问题出在哪? 就是那个printf函数那块,原来做串口的时候它工作就不正常。我做个彩屏,要USART串口功能干嘛,我把它注释掉,彩屏就不好使,不知道什么原因呢 |
|
|
|
要找原因,可以慢慢地注释掉不需要的,步子不要太大;(要不,留着串口输出也没什么大碍,需要的时候还可以用用 )
|
|
|
|
回复第 5 楼 于2013-03-13 08:57:41发表:
要找原因,可以慢慢地注释掉不需要的,步子不要太大;(要不,留着串口输出也没什么大碍,需要的时候还可以用用 )好吧 |
|
|
|
ili9320_Initializtion();函数中用了串口发送
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
2234 浏览 1 评论
AD7686芯片不传输数据给STM32,但是手按住就会有数据。
2053 浏览 3 评论
4664 浏览 0 评论
如何解决MPU-9250与STM32通讯时,出现HAL_ERROR = 0x01U
2197 浏览 1 评论
hal库中i2c卡死在HAL_I2C_Master_Transmit
2734 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-26 16:10 , Processed in 0.915441 second(s), Total 84, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号