DMA for S12ZVMC256

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

DMA for S12ZVMC256

1,553 Views
Georgio_69
Contributor II
Hello, We planned to implement Field oriented control on S12ZVMC256 CPU. On order to reduce CPU load, we would like to use DMA for current measurements and PWM duties transfer. Do you know how many DMA channels are available on S12ZVMC256 CPU? (several channels are needed to do that) Do you a user manual which describes how to use DMA? Thanks a lot in advance for your reply Best regards,
0 Kudos
5 Replies

1,549 Views
StanoA
NXP TechSupport
NXP TechSupport

Hello Georgio,

The S12ZVMC MCU don’t comprise standalone DMA module as in other types of MCUs. It contains the special ADC_LBA module – command list based ADC. The command list can comprise up to 64 commands and can be loaded from NVM or RAM for higher speed. The measured results are automatically stored in RAM too. This structure is optimized for high performance when used in motor control applications with high demands for current measurements.

The detail description is in RM Section 9 and the LBA_ADC can be used together with Programmable Trigger Unit (PTU) – Section 14 also.

I wish you many success in your project.

Best Regards,

Stano.

1,544 Views
Georgio_69
Contributor II
Hello, Thanks for the reply. I understood that measured current results can be automatically stored in RAM but what about PWM duties? is it also possible to store these values automatically from NVM to registers? Thanks Best regards
0 Kudos

1,536 Views
StanoA
NXP TechSupport
NXP TechSupport

Hello Georgio,

The PWM duty cycle values depends on your application. In case you want control the speed of motor with variable load, the duty cycles values are very variable. In case you want generate such constant periodical signal (e.g. sine shape) you can build the look-up table, store it to RAM and use a timer to define the load time and period of the generated signal. For high frequency generation the DMA usage is an advantage, for lower frequency e.g. up to kHz it is possible build the SW code also without DMA usage. All depends on your application.

If you need more kelp you are welcome.

Best Regards,

Stano.

1,533 Views
Georgio_69
Contributor II
Hello, Thanks for your feed-back. For our application, we want to control the speed of motor with variable load and as you said the duty cycles values will be very variable. We will have also high frequency generation so we think DMA should be a key advantage. I come back to my previous question: is it possible to use DMA for transfer of PMW duties from RAM to registers on S12ZVMC256 CPU? and how to do it? Thanks in advance for your help, Best Regards,
0 Kudos

1,528 Views
StanoA
NXP TechSupport
NXP TechSupport

Hello Georgio,

It is not possible to use DMA transfer for PWM values because the MCU not comprises the special DMA module.

For motor control application the PWM frequency is about 20kHz – it is still low frequency. The most important for proper running control loop is to build SW code in asm with lowest possible steps. The PWM duty cycle result musts be immediately written into PWM module and LDOK signal defined by PWM frequency moves the new value into PWM channel counter. So the DMA transfer is not usable for this application.

The DMA is needed for high speed transfer values from the look-up table (constants) loaded in RAM for the periodic signal generation.

Best Regards,

Stano.