Forum: Mikrocontroller und Digitale Elektronik errorcode = HAL_BUSY


von Miller (Gast)


Lesenswert?

Ich generiere Code mit der CubeMX-Software für den STM32f030/STM32f103 
um einen WIFI-Chip(nRF24L01+) via SPI anzusprechen.

Dummerweise erhalte ich permanent den

 errorcode = HAL_BUSY;

beim Versuch das SPI zum Senden zu "überreden".

HAL_SPI_TransmitReceive_DMA(&hspi1,TxPointer,DummyDataPointer,1))

Wofür steht denn jetzt eigentlich dieses HAL_BUSY  und warum tritt es 
genau auf?

von Miller (Gast)


Lesenswert?

Vermutlich:

Busy flag (BSY)
The BSY flag is set and cleared by hardware (writing to
 this flag has no effect).When BSY is set, it indicates th
at a data transfer is in progress on the SPI (the SPI bus is
busy).The BSY flag can be used in certain modes to detect the end of a 
transfer so that the
software can disable the SPI or its peripheral
clock before entering a low-power mode which
does not provide a clock for the peripheral.
This avoids corrupting the last transfer.
The BSY flag is also useful for preventing
write collisions in a multimaster system. The BSY flag is cleared
 under any one of the following conditions:

-When the SPI is correctly disabled

-When a fault is detected in Master -mode (MODF bit set to 1)

-In Master mode, when it finishes a data transmission and no new data is 
ready to be sent

-In Slave mode, when the BSY flag is set to
 '0' for at least one SPI clock cycle between
  each data transfer.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.