I use the S12ZVMC128 chip, and i want to PTU to trigger ADC , then get DC current.
But when i set ADC CommandList as shown below , (0xD0 is the channel of DC current) , the results in ADCResultList are different.(DC current is constant.)
what's more, if i don't use the module as shown below ,the results of DC current I get are zero.
The code file is in the attachment.
could you help me and check the code file,find the bug .
by the way ,could you tell me how can i use PTU to trigger ADC , which registers should i pay more attention?
I haven’t found any bug in the code. Do you use the software for development kit or you modify own project? Could you attach the project? How significant is the change in results and how did you get stable current?
If the change is significant, there might be a problem with memory allocation. Are the lists properly aligned? Have you tried putting it directly at aligned address?
thanks for your answer !
1, I modified my own project ,according to the software of development kit.
2, I configure the register as follow to get the stable current.(single bridge PWM)
PMFOUTB = 0x2A;
3, memory allocation is configured in the mc9s12zvmc128.prm file.