S32K144 Board Functional Questions

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K144 Board Functional Questions

跳至解决方案
1,707 次查看
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 项奖励
回复
1 解答
1,580 次查看
Daniel_Popa
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

在原帖中查看解决方案

2 回复数
1,581 次查看
Daniel_Popa
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

1,580 次查看
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 项奖励
回复