Hello,community
The CTU is configured to trigger the ADC conversions when the flexPWM reloads。
At the same time,I set the adc command interrupt to toggle the led.
but it is failure due to an error. matlab ver:2019b,MBD ver:3.20;
Can you help me to solve it?
In addition , the ADC conversions frequency is the same as to flexpwm.
How do I set up the CTU module If I want to convert some ADC signal at a low sampling frequency?
Any suggestions will be appreciated.
best regards
hao
Solved! Go to Solution.
Hello haoxue1027@qq.com,
This looks like a compile error. The variable test1_extcal_IN_A1 has not been found in the CTU interrupt file. One of the way in which this can be solved is to right click of the s-function called by the CTU interrupt block, go to Block Parameters: Subsystem and select reusable function in the Code Generation tab.
Hope this helps,
Marius
Hello,community,mariuslucianandrei
Can you help me with this problem? I've been beating my brains out with it, but I just can't solve it.
Thank you very much.
best regards
hao
Hello haoxue1027@qq.com,
This looks like a compile error. The variable test1_extcal_IN_A1 has not been found in the CTU interrupt file. One of the way in which this can be solved is to right click of the s-function called by the CTU interrupt block, go to Block Parameters: Subsystem and select reusable function in the Code Generation tab.
Hope this helps,
Marius
Hello,Marius
I have set it as you commanded , and it worked. No errors happened.
Thank you so much for your assistance.
It helps a lot.
By the way, the ADC conversions frequency is the same as to flexpwm above.
How do I set up the CTU module If I want to convert some ADC signal at a low sampling frequency?
By the PIT or Etimer module or other methods?
best regards
hao