Hello dumitru-daniel.popa
The Simulink blocks keeps a similar look-and-feel, but there might be different options due to IP differences.
the KV4x library also has a "FTM_Three_Phase Output" block.
So could you explain why I should use FTM_Three_Phase_Output or eFlexPWM_Three_Phase_Output ?
There is the FreeMASTER Config block, which I can't find in the KV4x library.The Freemaster block implemented in S32K is brand new and contains enhancements what are only available on S32K products (and for all future releases)
In the old versions we will not find all these option.
Nonetheless, you can modify the behavior by hand. If you go to ..\mctbx_Kinetis\mctbx_kv\src\FreeMaster_files you will find a file freemaster_cfg.h that is copied into the generated folder. You can change this file to configure the FreeMASTER to use RECORDER and INTERRUPTS.
So I have to use the „freemaster_data_recorder“ Block found in the kv4x Library instead of your S32K „freemaster_recorder_call“ in the "Fast Loop Control" Subsystem ?
What exactly I have to Change in the "freemaster_cfg.h" file ?
Also I have found this test Points in the fast Loop control:
Could you please explain the meaning of it ?
Is is explained here: https://community.nxp.com/thread/449904?commentID=977772#comment-977772
Thank you ! Great hint ! Now no additional Output blocks only for displaying the Signal are needed !
Hi Leon,
the KV4x library also has a "FTM_Three_Phase Output" block.
So could you explain why I should use FTM_Three_Phase_Output or eFlexPWM_Three_Phase_Output ?
Even if Kinetis and S32K microprocessors share the same ARM Core and similar peripherals - they belongs to tow different toolboxes that complicates the things. In this case there are 2 different SDKs with different drivers and initialization structures that are used to generate the code. If you check the TLC associated with each of the block you will see those differences:
Therefore, as general rule - use only the Simulink blocks that are exposed by each Toolbox Simulink Library: if you use a Kinetis microprocessor then use only the ones from Kinetis V Series Simulink Toolbox
So I have to use the „freemaster_data_recorder“ Block found in the kv4x Library instead of your S32K „freemaster_recorder_call“ in the "Fast Loop Control" Subsystem ?
Yes, you have to use the one from KV4x Library
What exactly I have to Change in the "freemaster_cfg.h" file ?
That is simple
Keep in mind that FreeMASTER can work on any kind of embedded applications not only the ones generated by Simulink. All we do in Simulink block is to change the defines in the freemaster_cfg.h file
For KV4 this is not done - is it just copied from default location into the generated file. For your reference, i've attached the file used in the M5 module. You can see compare it with your file and change the defines that you need.
#define FMSTR_SHORT_INTR 1 /* SCI FIFO-queuing done in interrupt */
#define FMSTR_USE_SCOPE 1 /* enable/disable scope support */
#define FMSTR_MAX_SCOPE_VARS 8 /* max. number of scope variables (2..8) */
define FMSTR_USE_RECORDER 1 /* enable/disable recorder support */
#define FMSTR_MAX_REC_VARS 8 /* max. number of recorder variables (2..8) */
#define FMSTR_REC_BUFF_SIZE xxxx/* built-in buffer size */
#define FMSTR_REC_TIMEBASE FMSTR_REC_BASE_MICROSEC(100) /* 0 = "unknown" */
Hope this helps!
Daniel
Thank you for your explanations!
In your original Module5 model you didn't have activated Freemaster in the s32k_config
So this is not necessary if I use the „freemaster_data_recorder“ from Kv4x library or should I activate Freemaster also in the MCD_MKV4x config block like below ?
What influences this Option has ?
Best regards
Hi Leon,
In your original Module5 model you didn't have activated Freemaster in the s32k_config
I'm using the S32K toolbox revision 3.0.0 which has a dedicated FreeMASTER configuration block.
if I use the „freemaster_data_recorder“ from Kv4x library or should I activate Freemaster also in the MCD_MKV4x config block like below ?
For KV4 you have to use the FreeMASTER configuration from the main configuration block as you have shown above.
Best regards,
Daniel