This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I have to transmit a CAN message at , say, every 50ms. The message is an rpm signal decoded through the eCAP module.
How do I make sure that the decoded rpm is transmitted only at the rate of every 50ms. One possible way when coding manually is to use an ePWM block's timer to generate interrupt at every 50ms. And then transmit.
How do I resolve this problem when using Simulink Embedded Coder for C2000 toolbox support?
Prashaant,
I think your idea is one of the more straightforward(and with minimum CPU loading) methods. There are also 3 CPU Timers, that should have ISRs as well and might be somewhat simpler to implement. Perhaps one advantage of using the PWM is that you could synchronize the transfer to be during the "off" time to reduce noise effects, etc.
Best,
Matthew
Prashaant,
I think this post from MW has some relevant links, even though it is for the F28335 I expect the procedure to be the same for your device(both C2000).
Best,
Matthew
Thank you Matthew. That was helpful. But I guess we are digressing.
I want to know how to control the periodicity based of the CAN message using the Simulink blocks. With probably very minimal coding( using custom code block) unless really necessary.
Thank you Matthew. That was helpful. But I guess we are digressing.
I want to know how to control the periodicity based of the CAN message using the Simulink blocks. With probably very minimal coding( using custom code block) unless really necessary.
Thank you Matthew. That was helpful. But I guess we are digressing.
I want to know how to control the periodicity based of the CAN message using the Simulink blocks. With probably very minimal coding( using custom code block) unless really necessary.
Prashaant,
For questions related to Simulink, please post on the Mathworks forum https://www.mathworks.com/support.html. I will alert my contact at Mathworks in the interim.
Thanks. Someone from Mathworks will respond on that thread. I will close this post.