2021-09-11 16:55:18 索煒達(dá)電子 681
項(xiàng)目編號:E1067
文件大?。?M
源碼說明:帶中文注釋
開發(fā)環(huán)境:C編譯器
簡要概述:
借著這個(gè)機(jī)會粗略分享一下學(xué)習(xí)心得
嵌入式編程首先就得了解硬件,只是單純的使工作起來一開始其實(shí)不用特別深入,只要
1. 確保自己對引腳的認(rèn)識正確
2. 確保各種配置正確
3. 確保軟件邏輯無誤
很多錯(cuò)誤都產(chǎn)生于移植例程時(shí)僅僅簡單改動一些表面的變量,很多需要一起更改的地方全然不知
所以在使用一個(gè)功能之前確保自己已經(jīng)配合著文檔認(rèn)真的了解過例程,這樣在做修改時(shí)就心中有數(shù)
即使遇到錯(cuò)誤,首先也應(yīng)該根據(jù)已知信息冷靜的做出判斷,通過邏輯分析和各種輔助工具尋找問題所在
如果最終確實(shí)是自己無法解決的問題的話,再及時(shí)向他人請教
權(quán)當(dāng)做個(gè)小筆記,諸位共勉
目錄│文件列表:
└ USART2-RS485ForTest
│ README.txt
├ Config
│ │ stm32f10x_flash.icf
│ │ stm32f10x_flash_extsram.icf
│ │ stm32f10x_nor.icf
│ └ stm32f10x_ram.icf
├ Libraries
│ ├ CMSIS
│ │ ├ startup
│ │ │ │ startup_stm32f10x_cl.s
│ │ │ │ startup_stm32f10x_hd.s
│ │ │ │ startup_stm32f10x_hd_vl.s
│ │ │ │ startup_stm32f10x_ld.s
│ │ │ │ startup_stm32f10x_ld_vl.s
│ │ │ │ startup_stm32f10x_md.s
│ │ │ │ startup_stm32f10x_md_vl.s
│ │ │ └ startup_stm32f10x_xl.s
│ │ └ system
│ │ │ core_cm3.c
│ │ │ core_cm3.h.old
│ │ │ stm32f10x.h
│ │ │ system_stm32f10x.c
│ │ └ system_stm32f10x.h
│ └ FWLIB
│ ├ inc
│ │ │ misc.h
│ │ │ stm32f10x_adc.h
│ │ │ stm32f10x_bkp.h
│ │ │ stm32f10x_can.h
│ │ │ stm32f10x_cec.h
│ │ │ stm32f10x_crc.h
│ │ │ stm32f10x_dac.h
│ │ │ stm32f10x_dbgmcu.h
│ │ │ stm32f10x_dma.h
│ │ │ stm32f10x_exti.h
│ │ │ stm32f10x_flash.h
│ │ │ stm32f10x_fsmc.h
│ │ │ stm32f10x_gpio.h
│ │ │ stm32f10x_i2c.h
│ │ │ stm32f10x_iwdg.h
│ │ │ stm32f10x_pwr.h
│ │ │ stm32f10x_rcc.h
│ │ │ stm32f10x_rtc.h
│ │ │ stm32f10x_sdio.h
│ │ │ stm32f10x_spi.h
│ │ │ stm32f10x_tim.h
│ │ │ stm32f10x_usart.h
│ │ └ stm32f10x_wwdg.h
│ └ src
│ │ misc.c
│ │ stm32f10x_adc.c
│ │ stm32f10x_bkp.c
│ │ stm32f10x_can.c
│ │ stm32f10x_cec.c
│ │ stm32f10x_crc.c
│ │ stm32f10x_dac.c
│ │ stm32f10x_dbgmcu.c
│ │ stm32f10x_dma.c
│ │ stm32f10x_exti.c
│ │ stm32f10x_flash.c
│ │ stm32f10x_fsmc.c
│ │ stm32f10x_gpio.c
│ │ stm32f10x_i2c.c
│ │ stm32f10x_iwdg.c
│ │ stm32f10x_pwr.c
│ │ stm32f10x_rcc.c
│ │ stm32f10x_rtc.c
│ │ stm32f10x_sdio.c
│ │ stm32f10x_spi.c
│ │ stm32f10x_tim.c
│ │ stm32f10x_usart.c
│ └ stm32f10x_wwdg.c
├ Project
│ │ USART2-RS485.dep
│ │ USART2-RS485.ewd
│ │ USART2-RS485.ewp
│ │ USART2-RS485.ewt
│ │ USART2-RS485.eww
│ ├ Debug
│ │ ├ Exe
│ │ │ │ USART1-RS485.sim
│ │ │ │ USART2-RS485.out
│ │ │ └ USART2-RS485.sim
│ │ └ Obj
│ │ │ crc.o
│ │ │ crc.pbi.cout
│ │ │ crc16.o
│ │ │ crc16.pbi
│ │ │ crc16.pbi.cout
│ │ │ crc8.o
│ │ │ crc8.pbi
│ │ │ crc8.pbi.cout
│ │ │ delay.o
│ │ │ delay.pbi
│ │ │ delay.pbi.cout
│ │ │ led.o
│ │ │ led.pbi.cout
│ │ │ main.o
│ │ │ main.pbi
│ │ │ main.pbi.cout
│ │ │ misc.o
│ │ │ misc.pbi
│ │ │ misc.pbi.cout
│ │ │ mled.o
│ │ │ mled.pbi
│ │ │ mled.pbi.cout
│ │ │ sled.o
│ │ │ sled.pbi
│ │ │ sled.pbi.cout
│ │ │ startup_stm32f10x_hd.o
│ │ │ stm32f10x_adc.o
│ │ │ stm32f10x_adc.pbi
│ │ │ stm32f10x_adc.pbi.cout
│ │ │ stm32f10x_bkp.o
│ │ │ stm32f10x_bkp.pbi
│ │ │ stm32f10x_bkp.pbi.cout
│ │ │ stm32f10x_can.o
│ │ │ stm32f10x_can.pbi
│ │ │ stm32f10x_can.pbi.cout
│ │ │ stm32f10x_cec.o
│ │ │ stm32f10x_cec.pbi
│ │ │ stm32f10x_cec.pbi.cout
│ │ │ stm32f10x_crc.o
│ │ │ stm32f10x_crc.pbi
│ │ │ stm32f10x_crc.pbi.cout
│ │ │ stm32f10x_dac.o
│ │ │ stm32f10x_dac.pbi
│ │ │ stm32f10x_dac.pbi.cout
│ │ │ stm32f10x_dbgmcu.o
│ │ │ stm32f10x_dbgmcu.pbi
│ │ │ stm32f10x_dbgmcu.pbi.cout
│ │ │ stm32f10x_dma.o
│ │ │ stm32f10x_dma.pbi
│ │ │ stm32f10x_dma.pbi.cout
│ │ │ stm32f10x_exti.o
│ │ │ stm32f10x_exti.pbi
│ │ │ stm32f10x_exti.pbi.cout
│ │ │ stm32f10x_flash.o
│ │ │ stm32f10x_flash.pbi
│ │ │ stm32f10x_flash.pbi.cout
│ │ │ stm32f10x_fsmc.o
│ │ │ stm32f10x_fsmc.pbi
│ │ │ stm32f10x_fsmc.pbi.cout
│ │ │ stm32f10x_gpio.o
│ │ │ stm32f10x_gpio.pbi
│ │ │ stm32f10x_gpio.pbi.cout
│ │ │ stm32f10x_i2c.o
│ │ │ stm32f10x_i2c.pbi
│ │ │ stm32f10x_i2c.pbi.cout
│ │ │ stm32f10x_it.o
│ │ │ stm32f10x_it.pbi
│ │ │ stm32f10x_it.pbi.cout
│ │ │ stm32f10x_iwdg.o
│ │ │ stm32f10x_iwdg.pbi
│ │ │ stm32f10x_iwdg.pbi.cout
│ │ │ stm32f10x_pwr.o
│ │ │ stm32f10x_pwr.pbi
│ │ │ stm32f10x_pwr.pbi.cout
│ │ │ stm32f10x_rcc.o
│ │ │ stm32f10x_rcc.pbi
│ │ │ stm32f10x_rcc.pbi.cout
│ │ │ stm32f10x_rtc.o
│ │ │ stm32f10x_rtc.pbi
│ │ │ stm32f10x_rtc.pbi.cout
│ │ │ stm32f10x_sdio.o
│ │ │ stm32f10x_sdio.pbi
│ │ │ stm32f10x_sdio.pbi.cout
│ │ │ stm32f10x_spi.o
│ │ │ stm32f10x_spi.pbi
│ │ │ stm32f10x_spi.pbi.cout
│ │ │ stm32f10x_tim.o
│ │ │ stm32f10x_tim.pbi
│ │ │ stm32f10x_tim.pbi.cout
│ │ │ stm32f10x_usart.o
│ │ │ stm32f10x_usart.pbi
│ │ │ stm32f10x_usart.pbi.cout
│ │ │ stm32f10x_wwdg.o
│ │ │ stm32f10x_wwdg.pbi
│ │ │ stm32f10x_wwdg.pbi.cout
│ │ │ system_stm32f10x.o
│ │ │ system_stm32f10x.pbi
│ │ │ system_stm32f10x.pbi.cout
│ │ │ timer.o
│ │ │ timer.pbi
│ │ │ timer.pbi.cout
│ │ │ usart.o
│ │ │ usart.pbi
│ │ │ usart.pbi.cout
│ │ │ USART1-RS485.pbd
│ │ │ USART1-RS485.pbd.browse
│ │ │ USART2-RS485.pbd
│ │ └ USART2-RS485.pbd.browse
│ └ settings
│ │ USART1-RS485.crun
│ │ USART1-RS485.dbgdt
│ │ USART1-RS485.Debug.cspy.bat
│ │ USART1-RS485.Debug.driver.xcl
│ │ USART1-RS485.Debug.general.xcl
│ │ USART1-RS485.dni
│ │ USART1-RS485.wsdt
│ │ USART1-RS485.wspos
│ │ USART1-RS485_Debug.jlink
│ │ USART2-RS485.crun
│ │ USART2-RS485.dbgdt
│ │ USART2-RS485.Debug.cspy.bat
│ │ USART2-RS485.Debug.driver.xcl
│ │ USART2-RS485.Debug.general.xcl
│ │ USART2-RS485.dni
│ │ USART2-RS485.wsdt
│ │ USART2-RS485.wspos
│ └ USART2-RS485_Debug.jlink
└ User
│ main.c
│ stm32f10x_conf.h
│ stm32f10x_it.c
│ stm32f10x_it.h
├ CRC
│ │ crc16.c
│ │ crc16.h
│ │ crc8.c
│ └ crc8.h
└ Hardware
├ LED
│ │ mled.c
│ │ mled.h
│ │ sled.c
│ └ sled.h
├ SYSTICK_DELAY
│ │ delay.c
│ └ delay.h
├ TIMER
│ │ timer.c
│ └ timer.h
└ USART
│ usart.c
└ usart.h