Kinetis V - How To

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

Kinetis V - How To

4,190 Views
mariuslucianand
NXP Employee
NXP Employee

This page summarizes all Model-Based Design Toolbox topics related to Kinetis V Product Family

 

Model-Based Design Toolbox for KVx Series of MCUs - Release Notes:

0 Kudos
10 Replies

2,339 Views
CauTran
Contributor I

Dear @mariuslucianand , @nxa11767 ,

Is there any KV MBDT version for Ubuntu operation?

0 Kudos

2,328 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @CauTran,

Unfortunately, we do not have a KV toolbox version to work under Linux. The NXP's MBDT for Kinetis V is designed to work in Windows only.

Regards,

Marius

0 Kudos

3,476 Views
CauTran
Contributor I

Hi @mariuslucianand @nxa11767 ,

I changed to use the mbdt for my project. But, I have a question, How to build a new mbdt file? Because, I don't see any linker between Maltab and MCUexpresso. 

 

I am try to use custom code for my project. But when I open MCUexpresso IDE, I have to add custom code file by my hand into project. How to config to add custom code automatic into to imported project.?

 

Thank you

0 Kudos

3,465 Views
nxa11767
NXP Employee
NXP Employee

Hi @CauTran ,

 

You can find here  an article on how to create a new Simulink model using the i.MXRT toolbox - exactly the same steps applies for KVx toolbox. Just create a blank model, save it and go to Model Parameters and select the NXP KV5x Hardware Board (in Hardware Implementation) - at this step the <model_name>Config folder is being created (the link to the MCUXpresso and NXP SDK) and also a <model_name>Config.mex file is created next to the Simulink model - the .mex file will have default initialization for the peripherals supported by the toolbox, settings that the user can change from MCUXConfiguration Tool - follow the article for more details.

As for importing the <model_name>Config folder of a model with custom code sources, you'll need to place the sources for your custom code either insider the <model_name>Config project - I recommend in sources subfolder before exporting from Simulink and importing in MCU IDE. For the next update of the toolbox will think of a better approach to this use case.

I hope this answers your questions,

Best regards,

Alexandra

 

 

0 Kudos

3,908 Views
CauTran
Contributor I

@mariuslucianand Thank you so much, 

As you mentioned, I can use the custom block to send and receive can signal. Do you have any example to guide me using this method? 

 

0 Kudos

3,893 Views
nxa11767
NXP Employee
NXP Employee

Hi @CauTran ,

 

Here is an example of how to insert custom code in your simulink model: https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-... 

In particular for CAN peripheral, you'll be able to do the configuration of the CAN instance from MCUX Configuration Tool, including pin settings.

nxa11767_0-1629830065757.png

 

In your simulink model, the custom code will need to call the SDK API functions responsible for send and receive data. The SDK files that you need to check and include are fsl_flexcan.c and fsl_flexcan.h, and can be found in the toolbox also in <toolbox_instalation_path>KVx_Platform_SDK\SDK_2.8.0_MKV58F1M0xxx24\devices\MKV58F24\drivers.

Hope this helps!

Alexandra

0 Kudos

3,837 Views
CauTran
Contributor I

@nxa11767 @mariuslucianand ,

THank you for your help. 

Currently, I am using MC33937 in my application. I saw mbdt of mcp57xx supporting MC33937, but in KVx series I don't see anything related with mc33937. 

I would like to have a question: 

Is there any support for MC33937 in KVx series mbdt?

How to modify MC33937 in MCP57xx to use KVx series?

0 Kudos

3,803 Views
nxa11767
NXP Employee
NXP Employee

Hello @CauTran ,

Unfortunately the kinetis toolbox does not have the blocks to support the integration with MC33937.

You can use custom code blocks  -  If you get the software drivers from the NXP site. You can find there examples for KV3x MCU, with the configuration and initialization part done (the projects can be imported in MCUXpresso IDE), and you can start from there. 

nxa11767_0-1630934107409.png

You can try to migrate first the KV31F TPPConfiguration to run on KV5 (pin settings in board/pin_mux.c)

I hope this helps,

Alexandra

0 Kudos

3,932 Views
CauTran
Contributor I

Hi Nxp, 

Currently, I am using KV5x to build a motor control. But I don't see pwm module for three phase, and Can module for communication among system modules. 

However, I saw a previous version,  its name is  Motor Control Development Toolbox. My thought is better for current tool. 

Can you tell me, what different between two that version? 

For current version, can you give me the example for motor control? 

For previous version, How can I get a license for using that one? 

 

0 Kudos

3,921 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @CauTran ,

Let's try to answer each question:

 But I don't see pwm module for three phase, and Can module for communication among system modules. 

The PWM is generated using the FTM peripheral so you have to open the configuration tool (Open the block, press Configure button and the MCUXpresso will be open) and to enable 6 channels for the FTM instance you have connected to the 3 Phases. 

mariuslucianand_0-1629716130241.png

For CAN we do not provide blocks but you can use the MCU Xpresso to configure the peripheral and send data using custom block.

Can you tell me, what different between two that version? 

The current release comes with the support for the MCUXpresso and code generated on top of the ksdk2_0. Using the external Configuration Tool, you can now access each setting of the MCU, of course, supported by the KSDK. You can now change the clocks settings for all the peripherals to match your application and route the pins as your application requires using a graphical tool. 

For the current version, can you give me the example for motor control? 

We already deliver a PMSM application for the KV3. Of course in the External Configuration Tool the MCU has to be changed and also the pins have to be matched for your MCU part.

mariuslucianand_1-1629716732399.png

For previous version, How can I get a license for using that one? 

If you want to use the previous release, you have to go to our download page, select the Preivious Tab, and find the Motor Control Toolbox for MATLAB/Simulink MBD for Kinetis V series. But keep in mind that we will only provide support for our current release!

mariuslucianand_2-1629717029836.png

mariuslucianand_3-1629717076936.png

Hope this helps,

Marius

 

0 Kudos