最近一直用446驱动一个2.2寸液晶屏程序,今天实现了温湿度采集并显示在液晶屏上;期间遇到很多问题:
1.首先发现一个问题
引脚中没有PB11,由于我的液晶驱动程序中用到了PB11,所以刚开始一直驱动不了,浪费了很多时间;
2.446的时钟配置,以前用过F411有时钟配置工具,而446还没有时钟配置工具,所以只能用库中的配置
Supported STM32F446xx devices
*-----------------------------------------------------------------------------
* System Clock source | PLL (HSE)
*-----------------------------------------------------------------------------
* SYSCLK(Hz) | 180000000
*-----------------------------------------------------------------------------
* HCLK(Hz) | 180000000
*-----------------------------------------------------------------------------
* AHB Prescaler | 1
*-----------------------------------------------------------------------------
* APB1 Prescaler | 4
*-----------------------------------------------------------------------------
* APB2 Prescaler | 2
*-----------------------------------------------------------------------------
* HSE Frequency(Hz) | 8000000
*-----------------------------------------------------------------------------
* PLL_M | 8
*-----------------------------------------------------------------------------
* PLL_N | 360
*-----------------------------------------------------------------------------
* PLL_P | 2
*-----------------------------------------------------------------------------
* PLL_Q | 7
*-----------------------------------------------------------------------------
* PLL_R | NA
*-----------------------------------------------------------------------------
* PLLI2S_M | NA
*-----------------------------------------------------------------------------
* PLLI2S_N | NA
*-----------------------------------------------------------------------------
* PLLI2S_P | NA
*-----------------------------------------------------------------------------
* PLLI2S_Q | NA
*-----------------------------------------------------------------------------
* PLLI2S_R | NA
*-----------------------------------------------------------------------------
* I2S input clock | NA
*-----------------------------------------------------------------------------
* VDD(V) | 3.3
*-----------------------------------------------------------------------------
* Main regulator output voltage | Scale1 mode
*-----------------------------------------------------------------------------
* Flash Latency(WS) | 5
*-----------------------------------------------------------------------------
* Prefetch Buffer | ON
*-----------------------------------------------------------------------------
* Instruction cache | ON
*-----------------------------------------------------------------------------
* Data cache | ON
*-----------------------------------------------------------------------------
* Require 48MHz for USB OTG FS, | Disabled
* SDIO and RNG clock |
因为温湿度传感器的时序很重要,如果时序有一点差别就读不到数据,所以刚开始也出现了问题;
不过最后终于还是弄出来了;
以后在这个基础上添加功能,初步想法是显示可以显示时钟,外接蓝牙可以手机控制一些家中的开关。。。。其他在想到哪儿在加上。
|