Author Topic: atmel  (Read 8257 times)

0 Members and 2 Guests are viewing this topic.

Offline hyreTopic starter

  • Contributor
  • Posts: 16
  • Country: cl
Re: atmel
« Reply #25 on: August 11, 2016, 04:47:06 pm »
I think it would be simpler to include <asf.h> at the top of the code right?
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11355
  • Country: us
    • Personal site
Re: atmel
« Reply #26 on: August 11, 2016, 04:49:25 pm »
I don't have ASF, I have simple bare-metal projects (https://github.com/ataradov/mcu-starter-projects/tree/master/samd10). And ASF is not really freely searchable, so I can't use it unless I create a project in AS, which I don't have either.
Alex
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11355
  • Country: us
    • Personal site
Re: atmel
« Reply #27 on: August 11, 2016, 05:01:57 pm »
Now I'm missing NVMCTRL_TEMP_LOG.

BTW, what file did this come from? I may need to update my header files.
« Last Edit: August 11, 2016, 05:04:17 pm by ataradov »
Alex
 

Offline hyreTopic starter

  • Contributor
  • Posts: 16
  • Country: cl
Re: atmel
« Reply #28 on: August 11, 2016, 05:06:26 pm »
This Software Temperature Log row can be read at address 0x00806030.
it comes from nvmctrl.h file
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11355
  • Country: us
    • Personal site
Re: atmel
« Reply #29 on: August 11, 2016, 05:22:58 pm »
Ok, I have those definitions for all devices, but D10. And when I define them, manually, I get clearly invalid (all 0xff) calibration data on my device. So it is possible that this is device revision dependent.

Let me figure out what is going on here.
Alex
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11355
  • Country: us
    • Personal site
Re: atmel
« Reply #30 on: August 11, 2016, 05:49:47 pm »
My header files were way old. After updating, I have all those defines.

It also looks like my device does not have any calibration data. I assume you use SAM D10 Xplained Pro? Can you try attached project and see what it prints on the COM port?

In my case I get:
Code: [Select]
Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
4053  2147483647
4056  2147483647
4055  2147483647
4056  2147483647
4057  2147483647
4057  2147483647
4058  2147483647
Alex
 

Offline hyreTopic starter

  • Contributor
  • Posts: 16
  • Country: cl
Re: atmel
« Reply #31 on: August 11, 2016, 06:23:05 pm »

which update did you do and what is the manipulation you have achieved?
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11355
  • Country: us
    • Personal site
Re: atmel
« Reply #32 on: August 11, 2016, 06:25:27 pm »
Update of header files in my project to the most recent ones from AS.  This does not affect you, since you created your project recently. I had my projects created when this device first came out.

What do you mean by "manipulation"?
Alex
 

Offline hyreTopic starter

  • Contributor
  • Posts: 16
  • Country: cl
Re: atmel
« Reply #33 on: August 11, 2016, 06:36:43 pm »
At the terminal I have not the "hello world" only appears I only 3 digits
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11355
  • Country: us
    • Personal site
Re: atmel
« Reply #34 on: August 11, 2016, 06:39:06 pm »
Please be more specific. I'm not going to pull information from you, it is a waste of my time.

Can you copy exactly what you see?

Keep terminal program open and restart the project.
Alex
 

Offline hyreTopic starter

  • Contributor
  • Posts: 16
  • Country: cl
Re: atmel
« Reply #35 on: August 11, 2016, 06:43:50 pm »
I changed of terminal
Quote

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
223  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
224  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
223  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
225  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
223  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
223  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
222  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
225  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
225  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
223  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
224  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
226  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
224  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
224  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
223  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
223  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
225  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
222  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
223  2147483647

Hello, world!
0xffffffff 0xffffffff 255 15 255 15 -1 -1
223  2147483647

 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11355
  • Country: us
    • Personal site
Re: atmel
« Reply #36 on: August 11, 2016, 06:46:30 pm »
Ok, so your board also returns 0xffffffff. Can you check what those values are on your project? It is possible that they are not accessible until something is enabled.

Also, values 223-225 are way too low for some reason, but it is not important right now.
Alex
 

Offline hyreTopic starter

  • Contributor
  • Posts: 16
  • Country: cl
Re: atmel
« Reply #37 on: August 11, 2016, 06:53:20 pm »
This address 0x00806030 contains no calibration data so this is a big problem
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11355
  • Country: us
    • Personal site
Re: atmel
« Reply #38 on: August 11, 2016, 06:55:16 pm »
So you have confirmed that even your demo application does not contain anything there? Don't trust my program, it is possible that you have to enable some clock that is not enabled, although I don't see anything obvious.
Alex
 

Offline hyreTopic starter

  • Contributor
  • Posts: 16
  • Country: cl
Re: atmel
« Reply #39 on: August 11, 2016, 06:58:14 pm »
the memory is :
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11355
  • Country: us
    • Personal site
Re: atmel
« Reply #40 on: August 11, 2016, 07:57:19 pm »
Yeah, looks like there is no calibration data in those devices. They may be engineering samples or something.

For the actual temperature reading, you will get better results if you use lookup table anyway. Just collect what ADC readings correspond to what temperatures and use that table to lookup the temperature based on the ADC reading. This table will be non-linear, so you will get better results than any linear approximation.

There may be some variability between the devices, so you will need to check that as well.
Alex
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf