Tsev > Xov xwm > Ntsiab lus

Co-Processor Engine Commands

Apr 26, 2019

image

Lub tshuab pa roj carbon monoxide engine yog siv ntawm 4 Kbyte FIFO nyob rau hauv FT800 nco ntawm RAM_CMD. Lub

MCU sau cov commands rau lub FIFO, thiab cov tshuab pa roj carbon monoxide engine nyeem thiab executes

cov lus txib. MCU tshiab sau npe REG_CMD_WRITE qhia tias nws muaj

tshiab commands hauv lub FIFO, thiab cov pa roj carbon monoxide engine REG_CMD_READ tom qab

commands tau raug tua.

image

Yog li txheeb xyuas qhov chaw pub dawb hauv lub FIFO, MCU yuav suav tau:

fullness = (REG_CMD_WRITE -REG_CMD_READ) mod 4096

freespace = (4096-4) -nyob;

Qhov kev suav no tsis qhia txog 4096 bytes ntawm qhov chaw pub dawb, kom tsis txhob ua tiav

npuaj lub FIFO thiab ua rau nws pom khoob.

Yog qhov chaw txaus nyob rau hauv lub FIFO, MCU sau cov lus txib ntawm tus

tsim nyog qhov chaw nyob rau hauv lub FIFO RAM, tom qab ntawd tshiab REG_CMD_WRITE. Los ua kom yooj yim rau

MCU code, cov FT800 kho vajtse yuav muab cov ntaub ntawv txuas ntxiv ntawm (RAM_CMD

+ 4095) rov qab rau (RAM_CMD + 0).

FIFO nkag yog ib txwm 4 bytes dav - nws yog ib qho yuam kev rau REG_CMD_READ los yog

REG_CMD_WRITE kom muaj nqis uas tsis yog ntau tshaj 4 bytes. Txhua cov lus txib

muab rau cov tshuab ua haujlwm cav yuav siv 1 los yog ntau tshaj lus: qhov ntev nyob ntawm qhov

txib nws tus kheej, thiab cov ntaub ntawv muab appended. Qee cov lus txib ua raws li variablelength cov ntaub ntawv, vim li ntawd cov lus hais me me yuav tsis yog ntau yam ntawm 4 bytes. Hauv qhov no tus cav cov tshuab coprocessor ignore tus ntxiv 1, 2 lossis 3 bytes thiab tseem nyeem ntxiv

hais kom ua ntawm qhov 4 byte ciam nram qab no.