Cov txheej txheem:
- Kauj Ruam 1: Qhov:
- Kauj ruam 2: Software Koj Yuav Tsum Tau:
- Kauj Ruam 3: STM32F103 Cov Qauv Txheej Txheem Txheej Txheem, Blue Pill
- Kauj Ruam 4: ST LINK V2 USB Adapter
- Kauj Ruam 5: Sijhawm Pib Ua Haujlwm tiag: Thauj khoom STM32Duino Boot Loader
- Kauj Ruam 6: Sijhawm Deal rau Arduino IDE
- Kauj Ruam 7: Sijhawm Deal rau Arduino IDE
- Kauj Ruam 8: Qhov "Gran Finale"
Video: STM32 "Blue Pill" Progmaming Via Arduino IDE & USB: 8 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Sib piv STM32F pawg thawj coj ua qauv qauv (piv txwv li Blue Pill) rau nws cov txee ntawm Arduino yog qhov yooj yim pom ntau npaum li cas cov peev txheej nws muaj, uas qhib ntau txoj hauv kev tshiab rau IOT cov phiaj xwm.
Qhov tsis zoo yog qhov tsis muaj kev txhawb nqa rau nws. Qhov tseeb tsis tshua muaj kev txhawb nqa, tab sis nws tau nthuav tawm ntau hauv ntau lub rooj sab laj, blog thiab pawg ntawm lwm nplooj ntawv. Ntau yam twb dhau los lawm.
Kuv yuav piav qhia kuv cov kev paub kom tau txais ib daim ntawv no tsis yog teeb tsa los ntawm Arduino IDE tab sis kuj dhau ntawm nws ua hauv USB txuas.
Kuv kuj yuav qhia yuav ua li cas upload Bootloader siv ST-Txuas V2.
Kauj Ruam 1: Qhov:
Koj yuav xav tau qee qhov:
- Thawj qhov koj yuav xav tau yog qhov tseeb, ST32F103 pawg thawj coj ua qauv. "Blue Pill" yog qhov nws paub nyob ib puag ncig, thiab koj tuaj yeem yuav nws rau tus nqi pheej yig hauv ntau lub khw eCommerce.
- ST-Txuas V2 Module
- Mov ci board thiab dhia cables
Kauj ruam 2: Software Koj Yuav Tsum Tau:
- Ua ntej tshaj plaws, Arduino IDE. Yog tias koj tseem tsis tau rub nws, qhov no yog qhov txuas: https://www.arduino.cc/en/Main/Software. Kuv sim cov lus qhia no nrog version 1.8.11, 1.8.12, thiab app version, uas ua haujlwm nkaus xwb rau Windows 8 thiab 10. Kuv yuav tsis npog qhov kev teeb tsa software no, thaum muaj ntau cov ntaub ntawv nyob ib puag ncig yuav ua li cas.
-
Los ntawm STM qhov chaw koj yuav xav tau cov software hauv qab no. Nws yog qhov tsim nyog los tsim tus as khauj:
- ST-Txuas V2 windows driver:
- STM32-Link Utility (https://my.st.com/content/my_st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link004.html).
- Tom qab ntawd nws yog lub sijhawm los rub tawm Boot loader. Nov yog qhov uas yuav tso Blue Pill txuas rau lub computer USB. Nov yog qhov txuas rau qhov no:
Daim ntawv ceeb toom koj tseem yuav xav tau ntxiv cov laug cam rau Arduino IDE. Kuv yuav piav qhia ntxaws yuav ua li cas.
Kauj Ruam 3: STM32F103 Cov Qauv Txheej Txheem Txheej Txheem, Blue Pill
Tam sim no piav qhia luv luv txog STM32F103 pawg thawj coj saib, paub los ntawm "Blue Pill".
Nov yog qhov khoom siv qhib, zoo ib yam li Arduino Nano (yuav luag zoo ib yam). Koj tuaj yeem pom ntau qhov kev tsim khoom sib txawv, tab sis lawv ua raws cov txheej txheem ze heev, txawm tias teeb meem.
Koj tuaj yeem nug: Yog nws zoo li Arduino Nano, vim li cas kuv thiaj yuav tsum txav mus rau lwm yam khoom kho vajtse?
Teb yog yooj yim. Zoo li kuv tau hais los lawm, yog tias koj txoj haujlwm xav tau Faster Micro maub los, nrog GPIO ntau dua (33 hauv tag nrho), ntau dua thiab/lossis meej ADC cov tswv yim (10 tawm tswv yim x 12 Cov teeb meem daws teeb meem), ntau qhov tso tawm analog (15), kev sib txuas lus ntau ntxiv, thiab lwm yam; qhov no yog lub micro tswj koj xav tau.
Saum toj no muaj tus pin tawm thiab daim duab qhia chaw.
Tam sim no, qee cov lus qhia:
- Nov yog 3V3 micro tswj. Txawm hais tias qee tus pin yog 5V tiv taus, Kuv hais kom khaws cov khoom siv qib siab hauv 3V3, lwm qhov ntse koj tuaj yeem kib koj Blue Pill.
- Pin's PA11 thiab PA12 tsis muaj, thaum lawv muaj lub luag haujlwm rau USB kev sib txuas lus.
- Tham txog USB, Koj yuav pom ntau qhov chaw thiab blog qhia rau Blue Pill muaj qhov tsis raug rub tawm tus nqi tiv thaiv hauv nws cov chaw nres nkoj. Raws li tom qab ntawd, lawv feem ntau 10KΩ hloov ntawm 4, 7KΩ qhov no yuav ua rau USB muaj teeb meem kev sib txuas. Ua siab ncaj, Kuv muaj 3 cov laug cam thiab kuv yeej tsis muaj teeb meem txuas mus rau ib qho ntawm lub laptop ntawd. Yog li, kuv yuav pom zoo tsuas yog ua haujlwm rau nws yog tias koj muaj teeb meem tiag tiag txuas USB rau koj lub khoos phis tawj. Lig Kuv pom qhov kos hauv Circuit Court yog tus tiv thaiv tus nqi no tseeb 10KΩ. Mus rau daim duab…. Solution yog solder 1.5KΩ lossis 1.8KΩ resistor ntawm tus pin PA12 thiab 5V vcc.
- Saib ze ntawm daim duab kuj tseem tuaj yeem pom tsis muaj kev tiv thaiv ntawm 5V cov kab hluav taws xob thiab USB 5V. BE CAREFUL OR JUST zam kev siv ntau lub zog siv. Koj tuaj yeem kib koj lub khoos phis tawj USB chaw nres nkoj, yog tias tej zaum koj siv lub zog 5V sab nraud txhais tau tias thaum lub rooj sib tham txuas rau USB.
Kauj Ruam 4: ST LINK V2 USB Adapter
ST LINK V2 yog USB rau SWD adapter, tsim los rau kev debug thiab kev ua haujlwm.
Yog tias koj npaj siab ua haujlwm nrog STM32 nti hauv qhov hnyav, koj yuav xav tau cov cuab yeej no. Nws tso cai rau koj sib txuas lus rau nti ncaj qha ntawm SWB lub taub hau txuas.
Muaj ntau qhov blog thiab qhov chaw nrog cov lus qhia yuav ua li cas thauj khoom siv USB rau TTL adapter, tab sis kuv tsis tuaj yeem pom ib qho siv cov cuab yeej no los thauj khoom boot loader.
Qhov no kuj tseem tso cai rau Blue Pill nrog thawj lub khau raj siv STM32Cube Programmer software (tej zaum kuv yuav tsim cov lus qhia rau yav tom ntej).
Txhawm rau nruab Windows tsav ua raws cov kauj ruam no:
- Unzip cov ntaub ntawv rub tawm
- Khiav "stlink_winusb_install.bat li Administrator
- Nias qhov tseem ceeb tom qab nws ua tiav.
- Txuas ST-Txuas V2 rau txhua lub khoos phis tawj USB.
Nco ntsoov: Qhov no yuav teeb tsa USB Device, TSIS yog chaw nres nkoj comm.
Kauj Ruam 5: Sijhawm Pib Ua Haujlwm tiag: Thauj khoom STM32Duino Boot Loader
Thawj yam ua ntej: txuas ST-Txuas rau Blue Pill. Qhov no yog qhov yooj yim heev, thaum ST tus pin tawm tau sau rau ntawm nws rooj plaub.
ST-Txuas Blue Pill SWD Connector
pin2- SWDIO pin2- SWIO (lossis IO hauv qee cov laug cam)
pin 3- GND pin 4- GND
pin 6- SWCLKpin3- SWCLK (lossis tsuas yog CLK)
pin 7- 3.3V pin 1- 3V3
ST-Txuas V2 tus pin tawm yog daim ntawv lo meej dua nws lub cev.
Khiav "STM32 ST-Link Utility" software (tej zaum koj twb tau teeb tsa hauv koj lub khoos phis tawj).
Sai li software rub tawm, nws yuav khaws txhua cov ntaub ntawv hauv Boot0 nco. Yog tias tsis yog, nyem rau hauv "Connec to Device", lub qhov hluav taws xob ntsaws nrog lub cim ntsia liaj qhov rooj. Nws tseem yuav khaws ntau cov ntaub ntawv STM32 nti.
thauj cov ntaub ntawv binary yog qhov yooj yim heev:
- Tsiv "Boot0" jumper mus rau "1" txoj haujlwm
- Nyem rau hauv "Binary"
- Xaiv Bootloader file (.bin)
- Hauv cov ntawv qhia zaub mov, nyem rau hauv "Hom Phiaj" thiab "Program".
Qhov no yuav tso cai thauj Boot0 nrog Bootloader tshiab.
- Rov qab "Boot0" jumper rau "0" txoj haujlwm
- Nias lub khawm pib dua
NCO TSEG: Koj yuav tsis tas yuav txav Boot0 jumper ntxiv mus rau "1" txoj haujlwm los thauj cov haujlwm tsim hauv Arduino IDE.
Kauj Ruam 6: Sijhawm Deal rau Arduino IDE
Tej zaum koj yuav pom tom qab thauj khoom "generic_boot20_pc13.bin" koj Blue Pill USB chaw nres nkoj yuav raug lees paub los ntawm lub khoos phis tawj Tus Thawj Saib Xyuas Haujlwm li "Maple Serial (COMx)".
Txhawm rau npaj koj Arduino IDE los daws rau STM32, ua raws cov theem hauv qab no:
Kauj Ruam 7: Sijhawm Deal rau Arduino IDE
Tam sim no koj yuav pom, txuas koj lub USB chaw nres nkoj rau koj lub khoos phis tawj, nws yuav raug lees paub tias "Maple Serial (COMx)".
Tam sim no, cia npaj Arduino IDE rau STM32 programing. Qhib Arduino IDE, yog tias tseem tsis tau qhib nws:
- Mus rau File menu thiab xaiv "Preferences". Qhov no yuav qhib qhov Preferences window.
- Nyem rau ntawm lub cim ob npaug ze rau "Tus Thawj Saib Xyuas Ntxiv Url" lub thawv ntawv.
- Hauv Cov Ntawv Text, luam thiab muab tso rau hauv qab kab ntawv txuas, ib kab: https://dan.drown.org/stm32duino/package_STM32duino_index.jsonhttps://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json Koj yuav xav tau ob lub rooj sib tham teeb tsa hauv cov ntawv txuas ntawd.
- Tam sim no mus rau "Cov cuab yeej" ntawv qhia zaub mov thiab xaiv "Tus Thawj Saib Xyuas Haujlwm". Qhov no yuav qhib "Board Manager" Window.
- Nco ntsoov "Txhua" raug xaiv hauv "Hom" thiab hauv kab ntawv hom "STM32F1"
- Nruab ob qho kev xaiv tshwm sim.
Kauj Ruam 8: Qhov "Gran Finale"
Tam sim no, koj tuaj yeem ntaus koj tus lej thiab sau nws.
Txuas koj "Blue Pill" thiab teeb tsa kev teeb tsa zoo li nws nyob hauv daim duab. Nco ntsoov xaiv qhov chaw nres nkoj raug.
Yog li, tam sim no nws tau npaj txhij xa cov cai rau "Blue Pill".
Kuv vam tias nws yuav pab koj!
Pom zoo:
Yog li, Koj Thauj STM32duino Bootloader hauv Koj "Blue Pill" Yog Li Cas Tam Sim No?: 7 Kauj Ruam
Yog li, Koj Thauj STM32duino Bootloader hauv Koj "Blue Pill" … Yog Li Cas Tam Sim No?: Yog tias koj twb nyeem kuv cov lus qhia piav qhia yuav ua li cas thauj STM32duino bootloader lossis lwm yam ntaub ntawv zoo sib xws, koj sim thauj cov piv txwv thiab …. tej zaum yuav tsis muaj dab tsi tshwm sim txhua qhov. Teeb meem yog, ntau, yog tias tsis yog txhua tus piv txwv rau " Generic " STM32 yog
Teeb Up Blue Pill Board hauv STM32CubeIDE: 8 Kauj Ruam
Teeb Up Blue Pill Board hauv STM32CubeIDE: Blue Pill yog qhov pheej yig heev pob txha liab qab ARM pawg thawj coj loj. Nws muaj STM32F103C8 raws li nws cov txheej txheem uas muaj 64 kbytes ntawm flash thiab 20 kbytes ntawm RAM nco. Nws khiav mus txog 72 MHz thiab yog txoj hauv kev pheej yig tshaj plaws kom nkag mus rau hauv ARM
STM32 Board nrog Arduino IDE STM32F103C8T6: 5 Cov Kauj Ruam
STM32 Pawg Nrog Arduino IDE STM32F103C8T6: Nyob Zoo Cov Menyuam txij li ntau tus neeg siv cov laug cam tab sis raws li peb paub lawv muaj qee qhov kev txwv yog li ob peb lwm lub laug cam tau los ua lub teeb pom kev zoo uas tuaj yeem ua tau zoo dua thiab muaj cov yam ntxwv zoo dua li Arduino thiab ib qho ntawm lawv yog STM3
Arduino Alternative - STM32 Blue Pill Programming Via USB: 5 Kauj Ruam
Arduino Alternative - STM32 Blue Pill Programming Via USB: Koj thiab kuv ob leeg hlub Arduino cov laug cam, los ntawm qhov me tshaj Attiny85, mus rau MEGA2560 loj tshaj. Txawm li cas los xij yog tias koj xav tau nrawm dua, ntau cov tswv yim analog, ntau qhov tseeb, tab sis tseem tsis xav hloov los ntawm Arduino cov phiaj xwm, muaj kev daws teeb meem zoo nkauj
HC - 06 (Slave Module) Hloov "Npe" Tsis Siv "Saib Serial Arduino" tias "Ua Haujlwm Yooj Yim": Txoj Kev Tsis Txaus!: 3 Cov Kauj Ruam
HC - 06 (Slave Module) Hloov "Npe" Tsis Siv "Saib Serial Arduino" … tias "Ua Haujlwm Yooj Yim": Txoj Kev Tsis Txaus!: Tom qab " Ntev Ntev " sim Hloov Lub Npe mus rau HC - 06 (qhev Module), siv " serial saib ntawm Arduino, tsis muaj " Ua tiav ", Kuv pom lwm txoj hauv kev yooj yim dua thiab koom nrog tam sim no! Muaj kev lom zem phooj ywg