Oversampling for C2000 (F28379D)

7 views (last 30 days)
Mike Buba
Mike Buba on 5 May 2022
Answered: Samar on 24 Apr 2025
Hi, is it possible to oversample signals send to and from F28379D ControCARD in MATLAB Simulink?
I am interested in oversampling Rx and Tx signals for SCI communication.
Is there anything in SCI_x settings or somewhere else?
Thank you

Answers (1)

Samar
Samar on 24 Apr 2025
Yes, you can definitely implement oversampling for SCI communication on the F28379D ControlCARD using MATLAB Simulink—it just takes a bit of setup since the SCI hardware itself doesn’t directly support oversampling. But you can work around that using software techniques in your Simulink model.
To implement oversampling, adjust the sampling times of the SCI blocks in the Simulink model. Here's how you can do it:
  1. Configure SCI Blocks: In your Simulink model, use the SCI Transmit and SCI Receive blocks from the C2000 Support Package.​
  2. Set Sample Time: Double-click on each SCI block and set the 'Sample time' parameter to a value smaller than the default. For example, if your base sample time is 1e-3 (1 ms), you can set the SCI blocks to 1e-4 (100 µs) to achieve a 10x oversampling rate.​
  3. Adjust Baud Rate: Make sure the baud rate (bits per second) for both sending and receiving is set correctly. It needs to align with your oversampling rate to avoid garbled data.
  4. Handle Data Processing: With a higher sampling rate, you may receive multiple samples for each actual data point. Implement logic in your model to process these samples appropriately, such as averaging or selecting specific samples.​
Few things which should be considered while increasing sampling rate:
  • CPU Load: Increasing the sampling rate will increase the CPU load. Monitor the CPU utilization to ensure that the processor can handle the increased data rate.​
  • Buffer Sizes: If you’re moving a lot more data around, you might need to increase your buffer sizes to keep things running smoothly.
  • Synchronization: Ensure that the transmitter and receiver are synchronized in terms of sampling rates and baud rates to prevent data loss or corruption.
Refer to these links for more information about SCI Receive and SCI Transmit blocks:
To know information on how to setup serial communication using SCI blocks, refer the following link:
I hope this helps!

Categories

Find more on Simulink in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!