Other Parts Discussed in Thread: TMS320F28379D, TMS320F28069M, TMS320F28388D
Hi guys,
I'm new to TI microcontrollers, I found the microcontroller very advanced in feature as ADC and ePWM peripherals, but in SCI communication, I have some questions, since I still didn't find a way to optimize the communication (SCI) in order to unload the CPU.
Actually, on a different microcontroller, the communication is implemented in the following way:
- the reception of the RX bytes is managed entirely by the DMA which transfer the byte from the peripheral register to the memory as soon as a byte is receive, keeping the CPU unloaded.
- Once the UART peripheral detect an IDLE line detection (for example after 1.5 char of idle state on the RX line), an interrupt is generated from the UART peripheral.
Inside this interrupt, the buffer received is processed.
Using this configuration, the CPU is fully unloaded from the communication until the UART interrupt fire (at the same time, the IDLE line detection, and thus the detection of the end of the packet, is executed from the peripheral without software checks).
I would like to replicate this behaviour also on the TI microcontroller.
On the TI C2000 series (for example in TMS320F28069M and TMS320F28379D), from the BUS diagram, it seems the DMA is not connected to the SCI peripheral.
At the moment, the way I'm adopting for the reception is to fire an interrupt for each byte received (without exploiting the FIFO) and save the byte received in the memory.
In this way, exploiting also a cputimer (which its counter is reinitialized for each byte received) configured to fire an interrupt after a defined time (for example after 3.5 char of UART), I can also keep track of the time elapsed from the last byte received and detect an idle line for the end of the packet.
Obviously, this method is not very efficient, since all the work is done in software, interrupting continuously the CPU for each byte received (especially at higher baudrate and with big packet) from other works and at the same time, it is not exploiting the SCI RX FIFO to reduce the number of interrupt (otherwise with the FIFO enabled, I cannot keep track of the time elapsed from the last byte received).
I was wondering how to manage this communication in a more efficient way (obiously if it is possible), maybe exploiting the FIFO in a better way and at the same time, find a way to keep track of the time elapsed from the last byte received.
I also noticed that there is also an evolution of the microcontroller (TMS320F28388D) which embeds an ARM Cortex M4 which is entirely employed for communication purpose and its DMA can transfer the data form the peripherals (SCI included) in a shared memory with the two main CPUs.
The purpose of this new microcontroller (TMS320F28388D) maybe is to delegate the communication task to a different microcontroller to unload the two main CPUs?
Thanks
Andrea