Cov txheej txheem:
- Kauj Ruam 1: STM32CUBE IDE SOFTWARE INSTALLATION PROCEDURE
- Kauj Ruam 2: STM32CUBE IDE PROGRAMMING PROCEDURE
- Kauj ruam 3: LED ntsais
Video: Pib Nrog STM32f767zi Lub Vev Xaib IDE thiab Tshaj Tawm Koj Cov Duab Sketch: 3 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
MUAJ (nyem qhov kev sim los yuav/mus saib nplooj ntawv web)
STM32F767ZI
Txhawb nqa SOFTWARE
· STM32CUBE IDE
· KEIL MDK ARM µVISION
· EWARM IAR EMBEDDED WORKBENCH
· ARDUINO IDE
Muaj ntau yam software muaj uas tuaj yeem siv rau program STM microcontrollers.
Tab sis qee qhov muaj qhov txwv. STM32 Cube IDE yog qhov zoo thaum piv rau lwm tus yog li niaj hnub no hauv qhov kev qhia no kuv siv Cube IDE los teeb tsa stm32microcontroller.
Txhua pawg tswj hwm kev txhim kho STM32 tau ntim ua ntej nrog daim duab ua qauv qhia kom paub tseeb tias koj ua qauv kos duab ua haujlwm kom raug thiab tom qab ntawv txuas nrog peb cov lus qhia.
- Nruab STM32 lub voos xwmfab IDE
- program qhov yooj yim coj teeb duab ntsais muag
- program program ua qauv qhia ua piv txwv. (saib kuv li YouTube video)
Khoom siv:
STM32F767ZI * 1
cov ntaub ntawv
Kauj Ruam 1: STM32CUBE IDE SOFTWARE INSTALLATION PROCEDURE
1. Tua tawm qhov khoom
installer (STM32CUBEIDE. EXE).
2. Thaum lub sijhawm txheej txheem teeb tsa, cov txheej txheem ua haujlwm yuav tso tawm cov lus sib tham hais tias: "Koj puas xav tso cai rau lub app no hloov pauv koj lub cuab yeej?" nrog cov ntaub ntawv "Tus pov thawj tshaj tawm: STMicroelectronics Software AB". Txais ([YES]) kom tus installer txuas ntxiv mus.
3. Tos rau lub installer Txais tos cov lus sib tham kom pom thiab nyem [Tom ntej>].
4. Nyeem daim ntawv tso cai pom zoo. Nyem [Kuv Pom Zoo] kom lees txais cov nqe lus ntawm kev pom zoo, lossis [Ncua tseg] kom rho tawm kev teeb tsa. Yog tias qhov kev pom zoo raug lees txais, tus tsim kev teeb tsa txuas ntxiv mus.
5. Hauv qhov kev sib tham no, tus neeg siv xaiv qhov chaw rau kev teeb tsa. Nws raug pom zoo kom xaiv txoj hauv kev luv kom tsis txhob ntsib Windows® cov kev txwv nrog txoj hauv kev ntev dhau rau kev ua haujlwm thiab nyem [tom ntej].
6. Tos rau qhov Xaiv Cheebtsam sib tham kom pom. Xaiv GDB Server cov khoom siv los teeb tsa ua ke nrog STM32CubeIDE. Ib tus neeg rau zaub mov xav tau rau txhua hom JTAG sojntsuam siv rau kev debugging nrog STM32CubeIDE.
7. Nyem [Nruab] kom pib teeb tsa. Cov tsav tsheb uas raug xaiv tau teeb tsa ua ke nrog kev teeb tsa ntawm STM32CubeIDE los ntawm no.
8. Nyem [Next] txuas ntxiv mus rau theem kawg ntawm txheej txheem teeb tsa. Ntawd yog Kev Pom Zoo sib tham qhia rau tus neeg siv tias kev teeb tsa tiav lawm. Thaum tus neeg siv nyem [Finish], txheej txheem teeb tsa tiav.
Kauj Ruam 2: STM32CUBE IDE PROGRAMMING PROCEDURE
- Kev xav tau software: - lub voos xwmfab IDE & ST cov khoom siv txuas (qhov hloov tshiab kawg).
- Qhib lub voos xwmfab ide software thiab xaiv cov npe uas koj xav tau; Kuv xaiv qhov chaw nyob tsis raug (1) thiab nyem pib (2).
- Nyem cov ntaub ntawv (3)-> tshiab (4)-> STM32 txoj haujlwm (5).
- STM32 qhov rai qhov rai tshwm nyob rau hauv qhov nyem pawg xaiv (6) thiab tshawb xyuas lub rooj tsavxwm (7) koj xav tau. Hauv qhov xwm txheej no xaiv hom ntawv no NUCLEO-F767ZI (8) thiab nyem tom ntej (9).
- Ntaus lub npe project (10) thiab xaiv cov lus hom phiaj ua C ++ (11).
- Nyem tag (12).
- Pawg phiaj xwm phiaj xwm qhov rai popup, nyem yog (13) thiab xav tau kev sib txuas hauv Is Taws Nem txhawm rau rub tawm firmware thawj zaug thiab yog tias firmware twb tau rub tawm lwm lub qhov rai popup (qhib kev cuam tshuam nrog kev pom), nyem yog.
- Hauv qhov haujlwm ua haujlwm, nyem Pinout thiab teeb tsa thiab xaiv cov pins uas xav tau, rau qhov ua piv txwv no kuv tsim ADC program yog li nyem analog (14) -> ADC1 (15) -> IN1 ib leeg tas (16) -> koj tuaj yeem pom tias PA0 analog pin qhib tau (17)
- nyem lub cuab yeej teeb tsa lub cuab yeej tsim lub cim cim cim (18) los tsim cov ntaub ntawv main.c.
- Qhib koom nrog windows popups nyem yog (19).
- main.c cov ntaub ntawv tsim tawm thiab txhawm rau nrhiav qhov chaw tseem ceeb.c cov ntaub ntawv los ntawm txhaj lub npe project (20)-> core (21)-> src (22)-> main.c (23). Kho cov ntaub ntawv main.c li yuav tsum tau
- nyem tsim lub cim (24) txhawm rau tshuaj xyuas qhov haujlwm kom raug thiab nyem lub cim debug (25) txhawm rau rub qhov program rau STM32F767ZI board.
- Hauv kev qhia nyob ntxiv ntxiv qhov sib txawv uas koj xav pom, ntawm no adcval qhia qhov adc tso zis (26).
Kauj ruam 3: LED ntsais
Ua raws cov txheej txheem saum toj no thiab pib ua haujlwm tshiab
saib cov duab thiab ntxiv cov lej hauv qab no hauv lub luag haujlwm tseem ceeb
HAL_GPIO_TogglePin (GPIOB, GPIO_PIN_0);
HAL_Delay (1000);
ntawm no HAL_GPIO_Togglepin (GPIOx, GPIO_PIN);
qhov twg
GPIOx - x txiav txim qhov chaw nres nkoj yog tias koj xav xaiv chaw nres nkoj A nws yuav yog GPIOA
GPIO_PIN - txiav txim siab tus lej tus lej tshwj xeeb ntawm qhov chaw nres nkoj ntawd
int lub ntsiab (tsis muaj dab tsi) { / * USER CODE BEGIN 1 * /
/ * USER CODE END 1 */
/* MCU Kev teeb tsa ---------------------------------------------- --------------*/
/* Rov pib dua ntawm txhua qhov khoom siv, Pib ua Flash interface thiab Systick. */
HAL_Init ();
/ * USER CODE BEGIN Init */
/ * USER CODE END Init */
/ * Kho lub moos system */
SystemClock_Config ();
/ * USER CODE BEGIN SysInit */
/ * USER CODE END SysInit */
/ * Pib ua txhua yam teeb tsa cov khoom siv txuas ntxiv */
MX_GPIO_Init (); MX_ETH_Init (); MX_USART3_UART_Init (); MX_USB_OTG_FS_PCD_Init (); / * USER CODE BEGIN 2 */
/ * USER CODE KAWG 2 */
/ * Infinite loop * / * USER CODE BEGIN WHILE * /
uint32_t tos = 0;
thaum (1) {
/ * USER CODE END WHILE */ HAL_GPIO_TogglePin (GPIOB, GPIO_PIN_0);
HAL_Delay (1000);
/ * USER CODE BEGIN 3 */}/ * USER CODE END 3 */}
koj tus lej kawg yuav tsum tshwm qee yam zoo li no.
yog tias koj tsis tau txais cov txiaj ntsig koj tuaj yeem tawm tswv yim qee qhov tsis xav ua haujlwm zoo li
MX_ETH_Init ();
Pom zoo:
$ 10 Lub Vev Xaib Lub Vev Xaib Kho: 5 Kauj Ruam (nrog Duab)
$ 10 Lub Vev Xaib Lub Vev Xaib Tsis Zoo: Zoo, kuv tau ua nws dua. Kuv tau tawg kuv qhov screen. Rau cov ntawm koj uas yuav nco tau, kuv tau ua qhov no tsuas yog ib xyoos dhau los thiab xav tau kev txhim kho ib ntus kom coj kuv mus txog thaum kuv tuaj yeem hloov pauv cov muab kev pabcuam thiab tau txais xov tooj tshiab. Nws tau ua haujlwm zoo, nws tau kav rau
Kho Ob Chav Tawm Tawm Tawm Tawm Tawm Cov Khoom Siv Hluav Taws Xob: 10 Cov Kauj Ruam (nrog Duab)
Kho Ob Chav Tawm Tawm Tawm Tawm Tawm Tawm Cov Khoom Siv Hluav Taws Xob: Nta: AC-DC Hloov pauv ob npaug tso tawm qhov hluav taws xob (Zoo-Hauv av-Tsis Zoo) Kho txoj kab zoo thiab tsis zoo Tsuas yog Ib Leeg Ib Leeg AC hloov pauv cov suab nrov (20MHz-BWL, tsis muaj thauj khoom): Ib puag ncig 1.12mVpp Tsawg suab nrov thiab cov txiaj ntsig ruaj khov (zoo tagnrho
Beacon/eddystone thiab Adafruit NRF52, Tshaj Tawm Koj Lub Vev Xaib/cov khoom yooj yim: 4 kauj ruam
Beacon/eddystone thiab Adafruit NRF52, Tshaj Tawm Koj Lub Vev Xaib/cov khoom yooj yim: Nyob zoo txhua tus, hnub no kuv xav qhia rau koj ib qhov haujlwm kuv tau ua tsis ntev los no, Kuv tau saib rau lub cuab yeej txuas nws sab hauv/sab nraum zoov thiab cia cov neeg txuas nrog nws lawv lub xov tooj smartphone, thiab muab lub peev xwm rau lawv mus ntsib lub vev xaib tshwj xeeb lossis tshaj tawm
Lub Vev Xaib Tswj Lub Vev Xaib Box: 4 Kauj Ruam
Lub Vev Xaib Tswj Lub Vev Xaib Box: Qhov no yog lub thawv xauv uas tuaj yeem qhib tau los ntawm kev qhia sai ntawm lub vev xaib. Qhov no txhais tau tias, koj tuaj yeem kaw cov khoom tam sim ntawd hauv lub thawv thiab tsuas yog nkag mus rau lawv thaum ib tus neeg nkag mus rau kab lus muab nkag rau ntawm lub vev xaib pej xeem. Vim li cas ib tus xav tau qhov no? Nov yog ib qho ex
Lub hauv paus tseem ceeb ntawm Lub Vev Xaib-raws li Lub Vev Xaib: 7 Kauj Ruam
Cov Hauv Paus Ntawm Lub Vev Xaib-raws li Lub Vev Xaib: Cov lus qhia no yuav qhia koj cov hauv paus ntawm kev tsim lub vev xaib nrog divs li cas. Vim tias cov ntxhuav siv rau kev teeb tsa yog qhov phem!: PTo kom nkag siab cov lus qhia no, koj yuav tsum paub qhov yooj yim html thiab css. Yog tias koj tsis nkag siab qee yam, xav tias dawb rau