Question
The SR->TXTF flag automatically sets to "1" before all data specified in CR2->TSIZE has been transmitted.
- 4 replies
- 19 views
- After a few bytes have been transmitted, the TXTF flag becomes '1', even though CTSIZE has not yet returned to 0.
- For now, I’ve implemented a temporary fix by setting the TXPIE flag to '1' each time TXTF becomes '1'.
- It is worth noting that the first transmission of 70,000 bytes runs normally, but from the second transmission onwards, this error occurs.
- I am following the instructions in sections 50.4.9, 50.4.10, 50.4.11, and 50.4.12.
- I am using an STM32H743IIT6 chip.
Document page 2227 of STM32H742, STM32H743/753 and STM32H750 Value line advanced Arm®-based 32-bit MCUs - Reference manual
TXTF: transmission transfer filled 0: upload of TxFIFO is on-going or not started 1: TxFIFO upload is finished TXTF is set by hardware as soon as all of the data packets in a transfer have been submitted for transmission by application software or DMA, that is when TSIZE number of data have been pushed into the TxFIFO. This bit is cleared by software write 1 to TXTFC bit at SPI_IFCR TXTF flag triggers an interrupt if TXTFIE bit is set. TXTF setting clears the TXIE and DXPIE masks so to off-load application software from calculating when to disable TXP and DXP interrupts.
