C21N support in ASF3

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

I'm using Atmel Studio 7, but I don't use wizard to create new projects. I usually copy a small part of ASF3 libraries (that can be downloaded as stand-alone zip) in my project folder. Mainly I'm interested in include files (definitions of registers, fields of registers and so on). I don't really use high-level drivers of ASF3.

 

For a new project I will use SAMC21N part, but I found it isn't supported in the last version of ASF3 (that is asf-standalone-archive-3.48.0.98.exe). Is it really so? Doesn't Microchip update ASF3 with new parts?

 

In the past Atmel moved from ASF3 to ASF4, but I didn't follow this migration. Recently Atmel was purchased by Microchip so now MPLABX ID supports Atmel parts. What do I do? Should I switch from ASF3/AS7/gcc to MPLABX/Harmony/XC? As you can understand it will not be trivial and I'm not sure it's worth it.

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

pozzugno wrote:
Recently Atmel was purchased by Microchip

it's 4 years ago now!

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The register and field headers are not part of asf... Sounds like you just want a barebone project ..?

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

The register and field headers are not part of asf

Are you sure?

 

https://github.com/avrxml/asf/tr...

 

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

it's 4 years ago now!

Yes, you're right. However I worked hard in the past to create a template project for some SAMC21/SAMD20 devices. In my opinion ASF3 code is very bad, so I'm using only some include files.

 

Now should I switch to ASF4/Atmel Start? Should I switch to Microchip ecosystem? It will be another hard work.

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

http://packs.download.atmel.com/

 

Download the pack for the device you want, unzip, and you'll find the headers in the \include folder

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

How do you start your projects? I make my projects the same as you, Bare metal programming with the minimum ASF library files for a specific project, included in the build by moving the files from the ASF library. 

 

I start my projects by selecting new, then "GCC C executable project", then selecting the CPU.  This gives me a minimal main.c file with no ASF, and the linker files I need to compile the project.  I tried this with the latest Atmel Studio, and had no problem selecting the SAMC21N part.

John Malaugh

Last Edited: Tue. Nov 10, 2020 - 10:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

malaugh wrote:

How do you start your projects? I make my projects the same as you, Bare metal programming with the minimum ASF library files for a specific project, included in the build by moving the files from the ASF library. 

 

I start my projects by selecting new, then "GCC C executable project", then selecting the CPU.  This gives me a minimal main.c file with no ASF, and the linker files I need to compile the project.  I tried this with the latest Atmel Studio, and had no problem selecting the SAMC21N part.

 

Thank you for your suggestion. Indeed it works.

 

My first project was started with ASF3. After understanding ASF3 sucks, I removed many things (drivers, modules, and so on), leaving only clock initialization, linker scripts, startup code and device-dependent headers. All my projects were born from a clone of the first project, so I'm stuck with a project layout derived from a cleaned version of ASF3.

 

Thanks again.