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.
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.
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.