CTU ISR problems based on MPC5744P(MBD)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CTU ISR problems based on MPC5744P(MBD)

Jump to solution
838 Views
haoxue1027
Contributor IV

Hello,community

The CTU is configured to trigger the ADC conversions when the flexPWM reloads。

pastedImage_1.pngpastedImage_2.png

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.

pastedImage_3.png

pastedImage_4.png

 best regards

hao

1 Solution
773 Views
mariuslucianand
NXP Employee
NXP Employee

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.

pastedImage_1.png

Hope this helps,

Marius

View solution in original post

3 Replies
773 Views
haoxue1027
Contributor IV

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

0 Kudos
774 Views
mariuslucianand
NXP Employee
NXP Employee

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.

pastedImage_1.png

Hope this helps,

Marius

773 Views
haoxue1027
Contributor IV

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

0 Kudos