Cov txheej txheem:

CSR1011 - Ua rau muaj kev xa xov rov qab: 5 Kauj Ruam
CSR1011 - Ua rau muaj kev xa xov rov qab: 5 Kauj Ruam

Video: CSR1011 - Ua rau muaj kev xa xov rov qab: 5 Kauj Ruam

Video: CSR1011 - Ua rau muaj kev xa xov rov qab: 5 Kauj Ruam
Video: ICU Vol.5 - 09 Tig tsis tau rov los 2024, Hlis ntuj nqeg
Anonim
CSR1011 - Ua rau muaj kev cuam tshuam
CSR1011 - Ua rau muaj kev cuam tshuam

CSR1011 yog ib hom nkaus xwb Bluetooth Ntse nti thiab cov lus qhia no qhia yuav ua li cas nkag mus rau nws GPIOs thiab ua kom muaj Kev Tshaj Tawm.

Kauj ruam 1: Grove Relay

Grove Relay
Grove Relay

Cov khoom siv hauv qhov kev qhia no yog Grove-Relay. Qhov qauv no yog digital ib txwm qhib qhib. Los ntawm nws, koj tuaj yeem tswj kev sib tw ntawm qhov hluav taws xob siab nrog qhov hluav taws xob qis, hais 5V ntawm tus tswj. Muaj qhov taw qhia LED ntawm lub rooj tsavxwm, uas yuav ci thaum lub chaw tswj tau kaw.

Kauj Ruam 2: Txheej Txheem Kho Vajtse

Khoos phis tawj Scheme
Khoos phis tawj Scheme

Txhawm rau txuas tus qauv xa tawm hauv CSR1011 tau tsim kho vajtse kom txhawb lub zog xa tawm, vim tias CSR1011 tau siv nrog 3v3 thiab cov khoom siv xav tau 5v los ua haujlwm. Ntawm CSR tus pin 4 (GPIO 10) tau siv los txuas txuas.

Kauj Ruam 3: Txhim Kho CSR UEnergy SDK

Txhawm rau lis daim ntawv thov ntawm CSR1011 tau siv Kev Txhim Kho Ib Leeg Ib puag ncig (xIDE) muab nrog μEnergy Software Development Kit (SDKs). Lub software tau muab rau ntawm CD-ROM tab sis tseem tuaj yeem rub tawm los ntawm no.

Kauj ruam 4: Software Architecture

Software Architecture
Software Architecture

Ntawm CSR1011 daim ntawv thov sib txuas lus nrog lub khoos phis tawj siv API hu uas tau siv los siv firmware rov qab rau ntau yam xwm txheej hauv daim ntawv thov lub neej. Thaum ib qhov haujlwm tau tsim qee qhov kev ua haujlwm twb tau ua tiav lawm, cov haujlwm no tau siv hauv lub neej voj voog ntawm daim ntawv thov:

  • AppPowerOnReset (): Daim ntawv thov ua haujlwm hu ua tom qab lub zog rov pib dua;
  • AppInit (): Txoj haujlwm no hu ua txhua lub khau raj thiab yuav tsum muaj daim ntawv thov pib ua ntej;
  • AppProcessSystemEvent (): Lub luag haujlwm hu los ntawm firmware los ua cov txheej txheem txheej txheem txheej txheem, zoo li roj teeb qis thiab hloov PIO qib;
  • AppProcessLmEvent (): Muaj nuj nqi siv los tswj kev sib txuas lus cuam tshuam txog cov xwm txheej los ntawm firmware;
  • Timers: Khiav saum lub sijhawm kho vajtse nrog microsecond qhov tseeb.

Kauj Ruam 5: Tus Qauv Piv Txwv Los Saib Xyuas GPIOs Kev Nkag Mus

Cov cai muaj qhia qhia yuav ua li cas teeb tsa thiab teeb tsa lub xeev ntawm GPIO kom ua rau muaj kev sib txuas txuas rau hauv GPIO10 ntawm CSR1011. Txhawm rau tswj kev nkag mus ntawm GPIO tau siv cov haujlwm muaj txiaj ntsig ntawm pio.h tsev qiv ntawv ntawm pab pawg _PIO_B.html ntawm uEnergy SDK.

Pom zoo: