Overwrite Enable/Disable in ADC of MPC5643L

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

Overwrite Enable/Disable in ADC of MPC5643L

649 Views
arthivenkatasub
Contributor III

Hi Everyone,

I just tried a simple ADC conversion using MPC5643L controller with overwrite enabled and overwrite disabled.In both cases, I am able to view the changes in the converted data of the analog channels (CDRn) registers.As I vary the input voltage, the corresponding data is monitored in both cases. 

I just want to know the difference between ADC measurement with overwrite enabled and overwrite disabled?

As far as I know, Overwrite enable will helps to overwrite the old conversion results with the new one.But in my case,

for both overwrite enabled and disabled, New results are getting updated.Whether I understood correctly?

Can anyone explain with an example?

what is the impact of having overwrite in ADC?

Kindly answer my question. I know its a simple one. But I want to know the use case of overwrite.

Regards,

Arthi Venkatasubramanian

Tags (2)
0 Kudos
4 Replies

519 Views
arthivenkatasub
Contributor III

Hi,

With Overwrite Disable, I am just initiating the ADC conversion by setting NSTART = 1 for the Analog channel 0. I am not reading the channel data registers. So, the unread data should not be overwritten as the overwrite is disabled. But , the unread data is overwritten by the new conversion data.

Why it is being overwritten?

 

Kindly answer this question.

0 Kudos

519 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

I have tested it a bit.

These values are overwritten just because they were read before (and so invalidated) by debugger. Actually any read of result register will cause that data can be subsequently overwritten.

This functionality works fine but I am not completely sure how to prove it.

0 Kudos

519 Views
arthivenkatasub
Contributor III

Now what shall be done to prevent the overwriting of previous results(Data)?

0 Kudos

519 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, I think it is just application dependent what is "more dangerous" from safety perspective in case heavy load, whether to lose some samples having always current value or not to loose any value.

You should examine VALID bit.

0 Kudos