STM32底層常見問題三-串口_第1頁
STM32底層常見問題三-串口_第2頁
STM32底層常見問題三-串口_第3頁
STM32底層常見問題三-串口_第4頁
全文預覽已結(jié)束

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、STM32底層常見問題匯總(三)串口使用常見問題MEI14 All right reserved1.1編譯報錯1)printf引用報錯xnr nret 0;va_115T: args?ehar data|S3) jcharIf (plog - NULL) return nrenj)込擷鴻議mx, plod) i nr st - vsprintf (ciataplaafp = data;while (*p)Ifn_u5axtSena tuom *p+J;)_込菽2=呻;return nret;解決方法包含頭文件如下z_nclL;deg.h1.2串口不輸出解決方法:1檢查GPIO功能,保證GPIO

2、初始化成功2)測量TX電平,保證串口初始化成功3)檢查晶振,保證時鐘(晶振、分頻系數(shù))與硬件相同。截圖以外部晶振25M為例打 fundtion.c IO fundioni.h90919293呂電959697sa99 1001D1102 -103 /IXIDS10 |-107 Qtif !defined (HSE_STARTUF_TIMEOUT)A * brief In the following line adj us 匸 rhe value d u-sd in your applic-atiQHxternal High Speed osglob al. h勺 syste m_strri32f

3、f4Bt.sbn32f4xx.lie of theqscfdlldwxng line adjujst Ehe External High Speed oscxllaCcrTip: To avoid modifying his file each Eine you can define the H5E val口e in your taolchain1 + Sbrlef In theTuneour; valueVALUE)(tuinx32 t)250d0000) /*! Vneed to use differen匸 H compiler prepr口匸是3日口工1 El#lf def in2432

4、442452呂2 4724S2492 502512 522532542 552562572552592 60(STM32F427_437xx:r| | defined (STM32DATA_IN_Ext5DRAM */STM32F427 437x I I STM32F429 439xx */*! Unccmrjent the following line if you need t Internal SRAM. */* #define VECT_TAB_5RAM */ #define VECT_TAB_OFFSET 0x30 /* f Vtczax Table LThis value m$*“

5、* m*PLL Par ait 已 t&rs * * * * */* PLL VCO =HSI_VALUE / PLL M) *#defame 血匚-甲廠25、/* 口 58 OTG Fsl SDIO andClock#define PLL#if defined (STM32F40_41xxx)#defirte FLL_N33C/* SYSCLK -_PLL VCO / PLL P */PEL VCO /4)如需使用printf需要勾選微庫Q Optirget F407Devic Target 丄切ulSTM32F4DACo nfigrati on如圖,不推薦 修改)* *Ccinfiguration| 謝 |Eii-tor | Colors 慕 Fnts | User Efrynords j Sh&rtcul| 7exl Compltts on | OlheT |General:Edto* SettingsFundi ton DsplayEncodngEncode b ANSI二|麗 Display Modufea麗 Scan funetion names in pn&jed fifes 麗 Sen (unciiort narro in curwt edMorHesAirtd indefll:Smart.BWew White Space 廠End

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論