Hello,
We are using the S12ZVM128 chip to control BLDC motors.
We already have CSL setup for ADC for motor control requirements. This is working fine.
We have 2 ADC1 inputs that are required to be polled at low frequency and when the motor is not running.
We do NOT want to change the CSL/RVL address due to several reasons.
We do NOT want to add to the CSL because we do not want unnecessary conversions when motor is running.
We could add to CSL while keeping the previous entry set as CMD_SEL[1:0] as 1,1 but then we can't reach this new entry and also we can't set the index as ADCCIDX is RO.
Is there any way to achieve the above or just run an Adhoc ADC command without running through the CSL ? Already ADCFLWCTL is set for DUAL access on both ADC's
Manish
Hi Manish,
Unfortunately, the LBA ADC module was not directly designed for such application.
The only way how to start conversion is through ADC command somewhere in memory (Flash/RAM…) and ADC Trigger.
Few ideas:
AN5168 Using the ADC Module in S12ZVM
http://www.nxp.com/files/microcontrollers/doc/app_note/AN5168.pdf
http://www.nxp.com/files/microcontrollers/doc/app_note/AN5168SW.zip
I hope it helps you.
Have a great day,
Radek
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Radek,
Thank you very much for your reply. Unfortunately probably none of the solutions are a perfect fit for us.
I just wanted to check specifically about any possibility of setting the Index in code. OR some technique which uses a similar approach? In my original post I had the following text:
"We could add to CSL while keeping the previous entry set as CMD_SEL[1:0] as 1,1 but then we can't reach this new
entry and also we can't set the index as ADCCIDX is RO."
I am looking for a conceptually similar approach if possible, directly or indirectly overriding the ADCCIDX or so.
Thanks
Mohammed
Hi Manish,
Unfortunately, I am not aware about that option, the ADC runs on its own state machine and indexes are provided only for read.
The indexes are cleared by Restart Event. The second option is ADC soft reset (the procedure for Soft reset is part of errata for ADC module and stop mode).
I am sorry.
I hope it helps you.
Have a great day,
Radek
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------