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:
- Configure SCI Blocks: In your Simulink model, use the SCI Transmit and SCI Receive blocks from the C2000 Support Package.
- 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.
- 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.
- 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!