Creating a Custom Board in Atmel Studio

Sdílet
Vložit
  • čas přidán 16. 07. 2024
  • This video explains how to create a program for a custom board, as opposed to using a development board. Specifically, I made my own application using a SAM4S8B ARM microcontroller. Table of contents below:
    00:00 - Introduction
    00:45 - Creating a new project
    01:43 - Exploring the initial project
    03:11 - ASF
    05:58 - Clock configuration
    07:39 - Main function structure
    09:26 - Using example projects
    20:48 - Adding .c and .h files
    28:53 - Building the solution
    29:18 - Conclusion

Komentáře • 26

  • @ralvholmsen1254
    @ralvholmsen1254 Před 5 lety +2

    Excellent pace and thoroughness! Well done!

  • @taragholami4978
    @taragholami4978 Před 7 lety +1

    Thanks. This was very helpful!

  • @jarza66
    @jarza66 Před 7 lety +2

    Great, keep going

  • @toonjacobs6334
    @toonjacobs6334 Před 3 lety +1

    Very helpfull tutorial, thank you
    i

  • @x6land
    @x6land Před 6 lety

    Great tutorial, very well explained. I think this is a lot more difficult compared with other microcontrollers because things are in so many different layers.
    I am programming a SAM4E and I am struggling a lot.
    But do you know why the SAM4E does not have a ADC module and also not a ADC example project? Eventhough is has ADC pins.

    • @IlyaMikhelson
      @IlyaMikhelson  Před 6 lety

      I'm glad to help! And yes, programming on this level is way harder than something like an Arduino. As for the SAM4E, that is quite strange. However, this wouldn't be the first time I have looked for a sample project on a specific topic from Atmel only to come up empty-handed. I hope you figure it out!

  • @Veso266
    @Veso266 Před 3 lety

    What do you do if your board is not listed?
    I have a AT91SAM9260 chip made into a custom development board
    is it possible to add it somehow, (probably I would only need to tell Atmel Studio on how to upload its program to the board and how to debug over USB)
    I also have GCC toolchain for this board, so I would probably need to tell Atmel Studio where to find it when compiling c/c++ code
    Thanks for Anwsering and Best Regards

  • @prasadvaidya9563
    @prasadvaidya9563 Před 3 lety +1

    The program files for me is different from what is shown in this video. Is anything they changed in 2021? My device is SAMd21j18A
    -- main.c ( system.init() function call insted of board.init())
    -- conf_clocks.h (got the complete list of DPLL , All GCLK generators,system clock parameters)

    • @IlyaMikhelson
      @IlyaMikhelson  Před 3 lety

      I would guess that some boards are different than others. I have only tried the SAM4S family. I recommend looking at the sample projects for your family of boards, and seeing how they use those functions.

  • @yuganshbansal6824
    @yuganshbansal6824 Před 7 lety +1

    Hello Ilya, I am working on ATSAMB11 BLE chip. In my ASF wizard, i can not find "delay routines" and "system clock" services.
    Does different device chips have diifferent modules in the ASF wizard ? I am using Atmel Studio 7

    • @IlyaMikhelson
      @IlyaMikhelson  Před 7 lety +2

      That is correct. Different chips will have different services available. I would still recommend to look at various example projects to get a sense of how to get going. For example, I just looked at the "Quick Start for the SAM SPI Driver for SAMB11 (Master Callback)" sample project, and they start by configuring the clock with a different function call than what I use. The more of these you look at, the better idea you'll get of how to use the ASF for the particular chip. Good luck!

    • @yuganshbansal6824
      @yuganshbansal6824 Před 7 lety

      Could you possibly provide any link where i can view such example projects ? I am starting from scratch for my project and using ATMEL ICE to flash my source code onto this ATSAMB11 BLE chip. I need to create LED blinking code, Also, MPU-9250 gyroscope code to link up with this chip. Do we have to write a code to active bluetooth in this chip ? In case you have experience with this, can you provide some help, i'llreally appreciate it. Thanks a lot !!

    • @IlyaMikhelson
      @IlyaMikhelson  Před 7 lety

      Please take a look at 9:26 in this video, where I talk about how to access and use example projects. I have not used this particular chip before, but you should be able to find a good starting point in the example projects.

    • @yuganshbansal6824
      @yuganshbansal6824 Před 7 lety +1

      Your recommendations in this video are really appreciable. Thank you. Apparently, every SAM device chip has its own programming styles and have different functions however, it gets easier to look at the example projects. Also, "goto implementation" idea is awesome to understand the source code.

    • @yuganshbansal6824
      @yuganshbansal6824 Před 7 lety +1

      Although, i have one question. In your video you've shown two different sets of codes. One for LED blinking and another for UART transmission. Is that UART code for establishing a wifi connection or just sending messages on the display? I am very new to this, hence the confusion. I am also, trying to establish or activate a bluetooth connection onto my chip. Will that be the same type of UART source code that you used in your video ?

  • @redsddd9876
    @redsddd9876 Před 7 lety

    awesome copy paste is great...... Maybe open datasheet hmmm...?l and understand howbto programing??

    • @IlyaMikhelson
      @IlyaMikhelson  Před 7 lety

      For an experienced embedded designer, yes, reading the datasheet is a good idea. However, for most people, opening a 1300 page datasheet is quite daunting. The approach presented here can start you off. But when you reach the point of making fine customizations, of course the datasheet is your best friend.

  • @fijabo
    @fijabo Před 6 lety

    Ilya,
    I found your video very REFRESHING even though it has a very lousy quality. I cannot read most of the texts and letters shown in this video. Anyway, I really wanted to thank you. I wonder if you would answer to a question. For example, I am trying to follow you using the Atmel Studio application and I cannot pass your directions after 1:31 minutes into the video. After selecting the microcontroller (ATxmega164AU) a pop-up window tells me to select a user board. After selecting the "User Board template - XMEGA AU", another window shows up but this time is the following error message:
    "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
    Any help or recommendation is greatly appreciated. Keep up the good work!

    • @IlyaMikhelson
      @IlyaMikhelson  Před 6 lety

      I'm glad I could help in any way! By the way, if you watch the video in HD, all the text should be clear. I know this may not be possible depending on your internet service, but that's really the only way to view all of the text clearly. As for your error, that is quite strange. I have just tried to replicate it, but I was able to successfully load a project with the board you specified. When you installed Atmel Studio, did you make sure to select the packages for XMEGA? You may be best off performing a fresh install of the newest version of Atmel Studio, and selecting to install all of the possible options.

    • @fijabo
      @fijabo Před 6 lety +1

      Thank you very much for your advice. I tried it and installed the online version but got the same error. However, I installed the web version on my other laptop with the Win7 OS and it did work.
      It seems that the problem is happening when using the Atmel application on the laptop with the Win10 OS. There is one more thing. When I was doing the installation on the Win10 system, a warning showed up telling me that the video driver was outdated and may cause some problems. Do you think an outdated video driver could be the reason for the error related to the board? I am not an expert but I did not think so.
      I tried but have not been able to update the video driver for the HP Pavilion dv7-6b55dx laptop. I will keep looking for the video driver update and after the update, I will try the Atmel application again to see if the error goes away. I will keep you posted.
      Ilya,
      I really appreciate your help, you are a lifesaver! I built a prototype for an LED lighting fixture based on a concept described in my patent for LED fixtures. I wired the prototype for the I/O pins of the ATxmega16A4U-AU. After performing a research and evaluation on the type of controller to be used, I chose this chip because it has two Analog Compartors (AC) that can be used to monitor the low and high limits of the current flowing through the LED array. No need to use ADC and programming code, the control will be performed by hardware initiated interrupts. I completed the construction of the hardware about two months ago but the software part is really delaying my project. I have programmed other Atmel AVR chips and I never thought it would be that difficult with the XMEGA.
      Lastly, I really love your video. I think you do a better job at teaching this subject than Atmel/Microchip. Videos like this one can help on launching the XMEGA platform. Atmel should hire you!!!

    • @IlyaMikhelson
      @IlyaMikhelson  Před 6 lety

      Thank you for your kind words! I do not expect the video driver to be the culprit, but if that is the only fundamental difference, then perhaps it may be. Please do keep me posted.
      Your project sounds very interesting! I actually briefly tried the XMEGA, but quickly transitioned to ARM chips. I do remember struggling with it, but (luckily for me) I quickly realized that I needed more functionality for my application, so I made the switch. I hope you figure it out!

  • @deltekkie7646
    @deltekkie7646 Před 5 měsíci

    Buddon?????