Issue with SAM E70 AFEC

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

HI all,

I thought all the ADC related issues were resolved until I tested my AFEC code in my second SAM E70 Xplained board.

Issue seems to be relatively simple, but its serious.

Say, when I am using board 1, with the AFEC channel grounded, output of the AFEC module will be '0'. On the other hand, the second board reads almost 40~50mV even when the pin is grounded. All this happens for the same program.

I have done the offset calibration & the issue persists.

Again, when I tried using the example AFEC code for reading the internal temperature sensor, first board read almost 20C where as second board read almost 45C. Actual temperature was around 20C.

IC's weren't heating up.

It seems like different boards has got different offset,frown

Silly beans are always silly
:)

Last Edited: Wed. Mar 1, 2017 - 10:07 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I'm using three AFEC channels for internal temperature, external temperature sensor and voltage supervision. In the E70 datasheet chapter 56.10 there is a significant offset which has to be eliminated (calibration), e.g. 

	/************************************************************************
	 * Set analog offset to be used for channel CSEL
	 *
	 * Because the internal ADC offset is 0x200, it should cancel it and shift
	 * down to 0.
	************************************************************************/

	afec_channel_set_analog_offset(AFEC0, CHAN_BRIDGE_VOLT, 0x1FE);
	afec_channel_set_analog_offset(AFEC0, CHAN_EXT_TEMP_SENSOR, 0x1FD);
	afec_channel_set_analog_offset(AFEC0, AFEC_TEMPERATURE_SENSOR, 0x200);

On my custom board for example if the MCU has 35°C on the chip surface the internal temperature is reported as 24°C using the 'default' 0x200 offset as shown in the code above and the external temperature sensor reports 20°C after 'calibration' using offset 0x1fd. At the moment I'm using the external sensor for temperature measurement in the chassis and the internal temperature is logged but frankly I don't know what this is information can be used for. Maybe I can use it to track the processor activity.

I have no chance to run my code on multiple boards because I have only one prototype board here. In production I assume that I have to do kind of calibration of the AFEC chans in order to get useful results e.g. take AFEC results of 2 known temperatures / voltages to calculate offset and gain parameters for software interpolation.

SAME newbie

Last Edited: Thu. Mar 2, 2017 - 07:19 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks regjoe once again, it seems like the temperature sensor isn't that accurate after all.

But I really didn't understand why two SAM E70 boards are reading different values for same voltage applied at their ADC pins?

crying

I would be happy if I doesn't come across this kind of issues in my prototype board.

smiley

Silly beans are always silly
:)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Has anybody got any idea why this AFEC in 2 different SAM E70 Xplained boards reads slightly different values for same voltage supplied?

Silly beans are always silly
:)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Check my comments in the below mentioned post.

https://community.atmel.com/foru...

Silly beans are always silly
:)