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.
Solved! Go to Solution.
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
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
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