I'm using CC2530.
Now, it has been achieved using the DMA the UART transmit.
At that time, the UART transmission completion, we have a basic question for or again the current of our program was to be determined by what the register.
DMA Transmit and complete, or the same timings of the UART transmission completion,
Were completed DMA transmission, only DMA transfer is complete, UART signal still seemingly being output,
I would like to know the register of the role of the subtle difference in timing.
At the above point of view, it will be the following questions.
★ CC2530 User's Guide in (swru191f.pdf),
1)UART double buffer
The double buffer with according to 17.1.1 UART Transmit of P156.
Does it means "there is a transmission buffer of 2 bytes" or "2 bytes in accordance with the transmission and reception"?
2) The UART transmission completion judgment
In the description of the same pageas 1), if the UART transmission completion, UxCSR.TX_BYTE 1
I understand that you become, when set to 1, it will be possible to write the new data to the UART transmit buffer.
Or, when IRCON2.UTX0IF of UART which indicates transmit completes becomes 1, it will be possible to write the new data to the UART transmit buffer.
Which is right?
(Legends, UxCSR.TX_BYTE becomes 1 when transmission completion, when transmitting a new data is written with the wait for interrupt completion, also, UxCSR.ACTIVE has become representative of the transmission state, the three the difference of the role of the register is you do not know)
3) UART after the DMA transmission is completed, I want to know a good timing to the DMA transmission of the new UART data.
if (DMAIF == 1 &&
HAL_DMA_CHECK_IRQ (HAL_DMA_CH_TX) &&
(UxCSR & (CSR_TX_BYTE | CSR_ACTIVE)) == CSR_TX_BYTE)
Currently, it is subject to the UART transmission completion as described above.
This is the DMA transmission completion, DMA channels are consistent,
UART buffer in the transmission completion, further UART has on the condition IDLE state.
However, when put on the condition UxCSR.ACTIVE, because becomes a UART reception But Busy not only UART transmission, it will be affected by the reception. (See P160).
If we want to see only the transmission completion, this one would be best to to determine what sentence will become a leisurely confirmation method.
Could you let me know the better code to recognize only the completion of the transmission?
Best Regards,
Satoshi Shinohara