how to add custom high voltage motor power stage with frdm-kv31f

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

how to add custom high voltage motor power stage with frdm-kv31f

Jump to solution
1,171 Views
shamsiqbal
Contributor I

hi 
we have build our custom high voltage motor control hardware for pmsm identical to hvp-mc3ph (where we used same components used in hvp-mc3ph without pfc stage) so when we tried to use frdm-kv31f to load high voltage option in kinetis motor suite this massage appears in second attach picture so we want to know that how to use this hardware with frdm-kv31f 
in our final application we are willing to use MKV31F256VLH12P or MKV31F128VLH10P so we are also interested to know that can we use these parts directly in kinetis motor suite for motor tuning where these parts also have kinetis motor library flashed in them we need proper guide for our final application to use these procured mcu parts where our end application is pmsm motor position control for industrial motion control systems

Labels (1)
0 Kudos
1 Solution
907 Views
philip_drake
NXP Employee
NXP Employee

Hello,

Please refer to the Application note AN5254 for how to Adapt KMS for Custom Hardware. Most of this work I describe is general knowledge that a embedded designer should know. If you don't have this expertise then I suggest you refer to the training videos for the software developement tools available. 

All of the supported evaluation hardware from NXP have several items in common. The three evaluation hardware options are FRDM-MC-LVPMSM, TWR-LV3PH, or HVP-MC3PH. Each of these motor driver platforms can accept an MCU evaluation board from the KV11, KV31 and in the future the KV4.

Each of the MCU evaluation boards has built into it an OPENSDA debug interface that has a Virtual Mass storage device flash programming, a USB-to-serial interface and a SWD debug interface. 

There are two intefaces in use by the KMS GUI. 1) communications interface and 2) Debug /Flash programming interface.

The communications interface is a UART port on the MCU that communicates with the GUI over a USB-to-serial inteface. The dialog box you show uses the Virtual MSD flash programming feature of the OPENSDA debug interface. 

To use the KMS GUI with your custom hardware you will need to establish a communication link between the computer's serial port and the hardware. 

In order to program the MCU flash with the reference project you can substitute a debug interface, like a JLINK or Multilink. You would use an IDE (KDS 3.2 or IAR) to program the reference project in the MCU flash.

If you copied the HVP-MC3PH hardware I would suggest you

1) use the HVP-KV31F120 reference project as a starting point. 

2) Open the KMS reference project you create in the first steps of the KMS GUI with the IDE. If you are using KDS 3.2 please make sure the IDE has all of the latest updates, and eclipse plugins installed so you don't mass erase the MCUs flash, making the MCU not usable with KMS.

3) Set up the JLINK or MULTILINK debug interface in the IDE.

4) Compile the reference project, should have no errors.

5) download and debug the project with the IDE, flashing the MCU with the KMS reference project.

6) When the debug interface you can direct the MCU to resume or Go.

7) Go to the KMS GUI and establish communications with the running project using the serial port you set up on your custom hardware.

If you want to port the project to a KV31 derivative with a smaller memory footprint that is allowed.  The steps that you must take to do this are outlined in the application note I referenced above.

Within the next quarter we will be announcing support for KMS with MCUXpresso IDE. Be looking out for that announcement.

I hope this helps you with your project.  If more assistance is needed please feel free to post back to the community.

View solution in original post

6 Replies
908 Views
philip_drake
NXP Employee
NXP Employee

Hello,

Please refer to the Application note AN5254 for how to Adapt KMS for Custom Hardware. Most of this work I describe is general knowledge that a embedded designer should know. If you don't have this expertise then I suggest you refer to the training videos for the software developement tools available. 

All of the supported evaluation hardware from NXP have several items in common. The three evaluation hardware options are FRDM-MC-LVPMSM, TWR-LV3PH, or HVP-MC3PH. Each of these motor driver platforms can accept an MCU evaluation board from the KV11, KV31 and in the future the KV4.

Each of the MCU evaluation boards has built into it an OPENSDA debug interface that has a Virtual Mass storage device flash programming, a USB-to-serial interface and a SWD debug interface. 

There are two intefaces in use by the KMS GUI. 1) communications interface and 2) Debug /Flash programming interface.

The communications interface is a UART port on the MCU that communicates with the GUI over a USB-to-serial inteface. The dialog box you show uses the Virtual MSD flash programming feature of the OPENSDA debug interface. 

To use the KMS GUI with your custom hardware you will need to establish a communication link between the computer's serial port and the hardware. 

In order to program the MCU flash with the reference project you can substitute a debug interface, like a JLINK or Multilink. You would use an IDE (KDS 3.2 or IAR) to program the reference project in the MCU flash.

If you copied the HVP-MC3PH hardware I would suggest you

1) use the HVP-KV31F120 reference project as a starting point. 

2) Open the KMS reference project you create in the first steps of the KMS GUI with the IDE. If you are using KDS 3.2 please make sure the IDE has all of the latest updates, and eclipse plugins installed so you don't mass erase the MCUs flash, making the MCU not usable with KMS.

3) Set up the JLINK or MULTILINK debug interface in the IDE.

4) Compile the reference project, should have no errors.

5) download and debug the project with the IDE, flashing the MCU with the KMS reference project.

6) When the debug interface you can direct the MCU to resume or Go.

7) Go to the KMS GUI and establish communications with the running project using the serial port you set up on your custom hardware.

If you want to port the project to a KV31 derivative with a smaller memory footprint that is allowed.  The steps that you must take to do this are outlined in the application note I referenced above.

Within the next quarter we will be announcing support for KMS with MCUXpresso IDE. Be looking out for that announcement.

I hope this helps you with your project.  If more assistance is needed please feel free to post back to the community.

907 Views
shamsiqbal
Contributor I

Hi

   thank you for brief description . i have found what i was looking for in AN5254 for how to Adapt KMS for Custom Hardware your answer is very helpful at the moment in the past we had worked on other motor control platform but after looking on kinetis motor suite it looks liked very easy and quick development platform for motor control so we bought over 200 mcu and three frdm-kv31f for prototyping purpose before asking question on community i have connected frdm-kv31f development board and tried to flash it with frdm-kv31f option and selecting kds for development platform which got uploaded without any problem 

        confusing part was when i chose hvp on kinetes motor suite then i got this error while using frdm-kv31f kit

here i have one question which thing identifies that it is frdm-kv31f board or HVP-KV31F120  where i believed  that all these three platform used same OPENSDA debug interface same mcu mkv31f512vllh12 if possible then plz provide me info about this 

      any how i got the idea from you reply that before using high voltage motor hardware with frdm-kv31f we have to compile the reference project and manually download in ide under debug tab than we can established communication with kinetis motor suite with frdm-kv31f board for custom/replicated high voltage hardware  

will be back after checking the procedure defined in AN5254 if we need any further help 

0 Kudos
907 Views
philip_drake
NXP Employee
NXP Employee

Each of the hardware platforms share an OPENSDA platform but the MSD flashing used by KMS relies on the expected name of the project board to direct the flashing. Normally, when you create a FRDM project the FRDM board is paired with a FRDM-MC-LVPMSM. KMS will look for the FRDM-KV31F MSD that is enumerated by your computer when you plug the Debug USB cablefrom your computer to the FRDM board.

Same with the HVP board if you select the HVP as the development platform then KMS will look for the MSD device named HVP-KV31F120 enumerated with your computer. The FRDM project will not work on a HVP platform based hardware. It is designed to work with the LVPMSM board.  Base on what you said you will need to create a HVP based project.

If you are using the FRDM-KV31F as the MCU board plugged into you hardware you have two opetions to program the MCU outside of the KMS GUI. 

1) You can use the drag and drop programming manually. Go the folder where the SREC or Bin file is stored for your project copy it and paste it into the MSD FRDM-KV31F drive. This will program the MCU with your code. 

2)  Open the HVP project with the KDS IDE and use KDS to download the project to the MCU through the debug port.

Bottom line is that KMS is not expected to know that you have HVP type hardware being driven from a HVP hardware platform. 

I hope this clarifies the expectations and gives you options.

Philip

0 Kudos
907 Views
shamsiqbal
Contributor I

hi

i have one more question looking at HVP-MC3PH diagram it looks like that phase a,b,c current amplifier are inverting difference amplifier can you plz confirm this plz see the attached pic of diagrams power module.png

above is power stage 

current amp.png

current amplifier 

so plz let me know which configuration we use for high voltage hardware inverting amplifier on non inverting current amplifier 

regards

0 Kudos
907 Views
pavelsustek
NXP Employee
NXP Employee

Hi, current amplifier provides following output I

_sense_A = R93 / (R109+R110) * (Ui_sense_a2 - Ui_sense_a1).

Ui_sense_A -> +-1.65V

So for this schematic we consider positive direction of phase current flowing from GND to bottom transistor.

Regards,

Pavel

0 Kudos
907 Views
shamsiqbal
Contributor I

hi 

i have looked all three hardware's available for pmsm from nxp and they all have same configuration for current amplifier i was little confused because reading document i have read non-inverting amplifier but in actual these are inverting amplifiers where input is out of phase 180 degrees to output

     where other platform for motor control hardware from other vendors used non-inverting so that was causing the confusion 

0 Kudos