Request for Code Review and Support for DTC and UART Transmission Issue on R5F10BGD

Hi Team,

I am sharing with you the DTC and UART individual code for the R5F10BGD microcontroller. I am trying to transmit 17 bytes of data on UART through DTC.

In this code, I am using UART1 for reception and transmission and DTC1 in repeated mode for copying the RAM data (local data variable which needs to be transmitted) to the UART transmit SFR register (SDR10L).

I observed that I get the expected data on the first try after resetting the microcontroller, but I do not get it on the second try.

I kindly request you to review the code and provide the required support. If any more input is required, kindly let me know.

Thanks,

Ashutosh SinghUART_DTC_RXTX_Ready2Work.zip

Parents Reply
  • After all observations and execution on UART with DTC implementation, we have come to the following conclusion:
    1. DTC on UART Transmission can work but to trigger at least one interrupt hit is required to start DTC. So manually one byte needs to Transmit through UART.
    2. After starting DTC, DTC copies the data on the UART Transmit Register one by one, and each byte interrupt will again hit and trigger the same DTC, and it goes like ISR recursion. So, the system will take the same time as normal UART.
         3. The system will not perform any other execution while copying the data using DTC.
    So, we can conclude that with DTC and without DTC, UART transmission will perform the same type of execution in both cases, and this will not affect software quality and performance.
    Kindly confirm that our understanding is correct.
Children