MATLAB: Is the Capture (CAP) block not available for the C280x family in Embedded Target for TI C2000 DSP 2.1 (R2006b)

Target Support Package TC2

I am using the Embedded Target for TI C2000 and I am using a C2808 board. The blocks provided for the C280x family are not as many as those provided for the C281x family in the product. I have the following question.
In C281x library there is a Capture block that can be used to capture time for pulse widths. However, again this block is not present in the C280x library. How do I implement a Capture routine for the C2808?

Best Answer

An example model has been attached to this solution demonstrating how the Capture block can be implemented from existing blocks for Embedded Target for TI C2000 DSP 2.1 (R2006b).
Two models have been attached to this solution that demonstrate how to use the Capture module on c280x in R2006b. One is running on the target and sending data to the second running on the host via RTDX. The target model is using CAP1 module mapped to GPIO24 pin.
The user has to provide an external signal (square wave) in order to trigger the capture. The value of the counter is going to be passed to the host via RTDX and the scope on the host model will calculate and display the frequency of the signal based on the value of the captures.
The user needs to manually set the current working directory inside the configuration parameters for the host side RTDX to be able to interact with the target model.