What is the best way to control multiple stepper motors with the K60?

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

What is the best way to control multiple stepper motors with the K60?

796 Views
broccolee
Contributor III

Hi,

I am using TWR-K60N512, with PK60DN512Z VMD10 chip. My goal is to control six stepper motors and they are operating simultaneously. There are only three FTM modules on my K60, which I have been using to create three different PWM signals with varying frequencies or pulse periods.

Is there a way to create six different PWM signals with different pulse periods by using all three FTM modules? If not, what other methods can I use to create the remaining three signals?

Thanks.

0 Kudos
5 Replies

505 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Lim,

This is my suggestion, as you know that each FTM has only ONE counter, so all the PWM signals from one FTM module have the same frequency, 3 FTM modules can generate at most 3 different frequency PWM signals. If you want to control 6 stepper motors, you can use GPIO pins to control the other 3 stepper motor, with PIT involved, you can control the GPIO pusle width.

If you do want to use PWM signal to control 6 stepper motors, I suggest you use Kinetis KV58, it has eFlexPWM module, each eFlexPWM module can generate 8 PWM signals with different frequency.

hope it can help you.

This is KV58 website:

Kinetis KV5x Real-time Control|Cortex-M7|32-bit MCU|NXP

BR

XiangJun Rong

505 Views
broccolee
Contributor III

Thanks Rong! I'll look into both the suggested method and the product( 8 independent PWM outputs, now that's plenty!).

0 Kudos

505 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Lim

The KV58 has two eFlexPWM module, four FTM modules. The two eFlexPWM modules can generate 8 independent PWM signals with different frequency(each eFlexPWM can generate 4 independent PWM signals with different frequency), i think it is okay to use KV58 to control 6 stepper motors.

BR

Xiangjun Rong

0 Kudos

505 Views
broccolee
Contributor III

Sounds good, we're very interested in this product now, probably will get the tower system module.

Anyway, I was able to create the remaining independent PWM signals with PIT!

Quick question: what's the difference in using DMA with other modules instead of just using the modules themselves because I've seen a few application notes that demonstrate that approach, such as PIT with DMA, SPI with DMA, and so on. Is the TWR-MEM module required to use DMA?

One final question, is there a wireless or bluetooth module for the K60 or the KV58? Something you can add on to the tower?

Thanks!

0 Kudos

505 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Yan Lim,

As you know that DMA is acronym of Direct Memory Access, the DMA module can save core load. For you case, the PIT generates interrupt, the core has to serve the interrupt and execute ISR, in the ISR, you can clear/set the GPIO, so the loading of core is heavy. For th GPIO plus DMA solution, the GPIO can clear/set with PIT triggering while DMA writes the GPIO data register instead of Core writting the GPIO data register without core involved. For implementation, the GPIO  can be set up to trigger DMA, after PIT signal arrives, the DMA will  read memory and write GPIO data register.

In conclusion, using GPIO plus DMA can save core load.

Hope it can help you.

BR

Xiangjun Rong

0 Kudos