Need help selecting the right Kinetis V micro

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help selecting the right Kinetis V micro

474 Views
jimmorash
Contributor I

I'm interested in developing a new custom board for position control of a brushless direct drive servo motor. It looks like the easiest path forward is using the Kinetis V microcontroller series and the KMS firmware library, but I am looking for a bit of advice before diving in.

Our existing system largely consists of a CAN network of Kinetis K10 microcontrollers, with dual bank Flash swap support to facilitate over-the-wire firmware updates. At the moment we are controlling a couple of brushless actuators with third party off-the-shelf motor drive modules. Each third party module is "hosted" by a custom board with a K10 running our firmware, which handles communication to/from the vehicle CAN bus.

I would like to redesign this board to eliminate the third party module and use a Kinetis V for motion control - it must therefore have support for CAN bus and flash swap. Looks like I can get CAN in the V1x or V4x parts, but what about flash swap? Unclear from the reference manuals. Otherwise, all we need this board to do is position control of a single axis of motion, so the M0+ product line is probably fine in terms of processor speed...?

Which of the numerous FRDM boards is the right one to purchase these days for getting started with motor control firmware? It seems like some of them are obsolete and there are several different software library options and varying IDE requirements... All our other work is in KDS, no experience with IAR at the moment.

Labels (1)
Tags (1)
0 Kudos
4 Replies

163 Views
philip_drake
NXP Employee
NXP Employee

Hello James,

I would recommend you go with the FRDM-KV11 and the FRDM-MC-LVPMSM board. This MCU has CAN and only 128K of flash.  If you wanted to create a flash update ability over CAN this is possible.  We do this with our bootloader/flashloader code now.

The position control with KMS requires a PMSM or BLDC motor with an encoder output.  The KMS firmware walks you through an automatic motor parameter identification operation and you are able to tune the position controller with the GUI. 

I created a getting started video that walks you through the setup. HERE, Go to the Position Control Tab and follow along but substitute KV11 FRDM instead of KV31.

You will need KMS 1.1.0 or later which is supported with IAR IDE or Kinetis Design Studia 3.2 (Free IDE) and Kinetis SDK 1.3 mainline.

The other FOC projects available from NXP do not have position control support, only speed control type of projects.  Therefore please focus on the KMS solution.

The KV4 MCU will be supported in the near future. It is a MCU with M4 and high end motor control peripherals.  All of the future support for KMS going forward after this next release will be with MCUXpresso and the SDK 2.2.  Look for this later this year.

Enjoy the simplicity of KMS.  I highly recommend that once you have it installed, use the video and lab guide to help you learn how to work with the tool. 

Let us know if you have any other questions.

Philip Drake

Systems Application Engineer, NXP

0 Kudos

163 Views
jimmorash
Contributor I

Thanks Philip, a few clarification questions:

 

(1) Is MCUExpresso replacing Kinetis Design Studio? You mention both but then say that KMS will be supported only by the former in the future.

 

(2) We already have a working implementation of firmware update over CAN for our existing hardware. The point is that we are relying on dual bank Flash as a fail-safe. This allows the CAN devices to revert to the previously working firmware image if the firmware update fails for some reason. Having this capability is a hard requirement for our vehicle system to allow safe over-the-air updates. Hence I am asking whether an equivalent capability exists in the Kinetis V product line. If it does not, we cannot use them.

(3) I found this set of real time control math libraries:

Real Time Control Embedded Software Motor Control and Power Conversion Libraries|NXP 

It is unclear whether the Kinetis K Cortex-M4 products are compatible with these libraries, or only the Kinetis V. It also appears that there are two versions of the libraries for Cortex-M4 and Cortex-M4F cores, is that correct?

0 Kudos

163 Views
philip_drake
NXP Employee
NXP Employee

1) MCUXpresso with the free IDE of choice in the our KMS release later this year. KDS 3.2 is now supported.

2) If you rely solely on dual bank for protection, then the KV series of MCUs do not support the feature of flash swap. This swap feature is only available on a handful of Kinetis MCUs.  The KV31F512 has two flash blocks but no swap flash feature. Neither does the KV11 or KV4. So if that is a hard requirement then you cannot use the KV series MCUs.

However as you know there are other ways to support erase and re-programming with sector or region erase to keep a portion of the flash while erasing and reprogramming the other part of the flash. You would have to maintain the vectors and flash config space in sector 0 and build in a way to update the vectors as needed. With the KMS motor control library there is one more consideration. The top 8K of flash is reserved for the KMS library and is protected, marked as execute-only. If erase there is no way to re-program the library. The KMS project can fit well within half of the KV11s 128K flash so that you can leave an instance of the code.

3) I am not the authority on these libraries. I know the libraries are compatible with any of the Kinetis MCUs not just the V series.  So the M7, M4 and M0+. Some of the Cortex M4 MCUs do not come with the FPU but are supported as you note with the non 'F' (no FPU) versions. The libraries are avaiable in some of the middleware components of the SDK.  For instance in the KV31 SDK 2.2 extract and go to C:\NXP\SDK_2.2_MKV31F128xxx10\middleware\rtcesl_4.3\CM4F_RTCESL_4.3_doc for specifics on the PMSM motor control support implemented for the KV parts.  By default these libraries are not supplied with other similar microcontrollers, like the K10 or K22 but they can support these MCUs.  I ask RenatoKiss‌ or pavelsustek to add in more help you might need here.

Regards,

Philip 

0 Kudos

163 Views
jimmorash
Contributor I

If I understand correctly, there are also some software libraries already out there for FOC on a "plain vanilla" M4 device, so presumably we could select another part in the Kinetis K family and use "MCAT" and the related libraries? Is that correct?

0 Kudos