Cov txheej txheem:

Pib Nrog STM32f767zi Lub Vev Xaib IDE thiab Tshaj Tawm Koj Cov Duab Sketch: 3 Kauj Ruam
Pib Nrog STM32f767zi Lub Vev Xaib IDE thiab Tshaj Tawm Koj Cov Duab Sketch: 3 Kauj Ruam

Video: Pib Nrog STM32f767zi Lub Vev Xaib IDE thiab Tshaj Tawm Koj Cov Duab Sketch: 3 Kauj Ruam

Video: Pib Nrog STM32f767zi Lub Vev Xaib IDE thiab Tshaj Tawm Koj Cov Duab Sketch: 3 Kauj Ruam
Video: Mathematics with Python! Sequences 2024, Hlis ntuj nqeg
Anonim
Pib Nrog STM32f767zi Cube IDE thiab Upload You Custom Sketch
Pib Nrog STM32f767zi Cube IDE thiab Upload You Custom Sketch

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.

  1. Nruab STM32 lub voos xwmfab IDE
  2. program qhov yooj yim coj teeb duab ntsais muag
  3. 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

STM32CUBE IDE SOFTWARE INSTALLATION txheej txheem
STM32CUBE IDE SOFTWARE INSTALLATION txheej txheem
STM32CUBE IDE SOFTWARE INSTALLATION txheej txheem
STM32CUBE IDE SOFTWARE INSTALLATION txheej txheem
STM32CUBE IDE SOFTWARE INSTALLATION txheej txheem
STM32CUBE IDE SOFTWARE INSTALLATION txheej txheem

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

STM32CUBE IDE PROGRAMMING txheej txheem
STM32CUBE IDE PROGRAMMING txheej txheem
STM32CUBE IDE PROGRAMMING txheej txheem
STM32CUBE IDE PROGRAMMING txheej txheem
STM32CUBE IDE PROGRAMMING txheej txheem
STM32CUBE IDE PROGRAMMING txheej txheem
STM32CUBE IDE PROGRAMMING txheej txheem
STM32CUBE IDE PROGRAMMING txheej txheem
  • 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

LED ntsais
LED ntsais
LED ntsais
LED ntsais
LED ntsais
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: