Good ATD value only in debug mode

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

Good ATD value only in debug mode

1,191 Views
hdan
Contributor III
Hello,

I work with a DG256.

I use ATD with interrupt.
in debug mode with a inDart card, the value reading is good, but not in normal running mode( without the inDart card).

I try to use a sample time of 16, i check clock prescaler
I use wait loops in different point of my program. nothing solve the problem.

What can i do ?

regards,
Labels (1)
0 Kudos
2 Replies

307 Views
Alban
Senior Contributor II
Hello,

If you have an incorrect value in the ADC, it is likely to be:
- problem with input load,
- wrong clock of ADC.

If you have same thing on the ADC input in both boards, it can eliminate n°1.
For n°2, I would suggest you are checking that the bus speed is really what you expect by enabling ECLK/PTE4. This will output the bus clock on PTE4 and you can make sure you run from the speed you think you are.

These two are the usual mistakes.
Alban.

0 Kudos

307 Views
hdan
Contributor III
Hello, Thanks to your response Alban. I finally found my mistakes, it was another component of my card who wasn't correctly initialised at power on. ( DG256 and ADC do correctly there jobs ) regards.
0 Kudos