S32K144 Board Functional Questions

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

S32K144 Board Functional Questions

Jump to solution
860 Views
fernando_barrio
Contributor III

Hi, 

I have a couple of questions regarding the board. 

1) I have noticed recently that while using FreeMaster I will occasionally get some fields with really large values, when I am expecting a small number such as a control state, has anyone seen this before? Could it be because I have too many memory blocks and there is overflow?

2) Every time that I receive a new CAN message it looks like an ISR runs, does this mean that my control loop will be interrupted due to this?

Thank you in advance, any insight would be greatly appreciated.

0 Kudos
1 Solution
733 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi Fernando, 

Could it be because I have too many memory blocks and there is overflow?

That should not happen. Have you tried to use the RECORDER to capture the data and check if the issue is still present? It might be something in your program - an overflow ??? 

Are you using the same data type in the FreeMASTER as the variable type in Simulink ?

2) Every time that I receive a new CAN message it looks like an ISR runs, does this mean that my control loop will be interrupted due to this?

Depends on the relative priorities you have set in Simulink blocks. If you want to be absolutely sure that your control loop is not interrupted, then you could add a custom code block to disable all the interrupts while your control loop executes and re-enable those at the end of control loop processing. You can have a look at the SDK functions and disable the interrupts you might be interested to avoid. 

Hope this helps!

Daniel

View solution in original post

2 Replies
734 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi Fernando, 

Could it be because I have too many memory blocks and there is overflow?

That should not happen. Have you tried to use the RECORDER to capture the data and check if the issue is still present? It might be something in your program - an overflow ??? 

Are you using the same data type in the FreeMASTER as the variable type in Simulink ?

2) Every time that I receive a new CAN message it looks like an ISR runs, does this mean that my control loop will be interrupted due to this?

Depends on the relative priorities you have set in Simulink blocks. If you want to be absolutely sure that your control loop is not interrupted, then you could add a custom code block to disable all the interrupts while your control loop executes and re-enable those at the end of control loop processing. You can have a look at the SDK functions and disable the interrupts you might be interested to avoid. 

Hope this helps!

Daniel

733 Views
fernando_barrio
Contributor III

Hi Daniel,

You were right it was a data type problem, it was just not being represented correctly in FreeMaster. I will also try your suggestion for the CAN ISR.

Thank you for your help,

Fernando

0 Kudos