Giter Site home page Giter Site logo

avrxml / asf Goto Github PK

View Code? Open in Web Editor NEW
149.0 19.0 107.0 308.06 MB

merry christmas, have some asf without registration

C 81.43% C++ 2.51% Objective-C 0.39% JavaScript 0.22% Shell 0.02% Perl 0.01% CSS 0.01% Assembly 0.05% Scilab 0.03% MATLAB 0.01% Python 0.02% Makefile 15.16% HTML 0.04% Batchfile 0.03% Logos 0.05% GDB 0.02%

asf's Introduction

1 - Introduction
----------------

The Atmel® Software Framework (ASF) is a collection of embedded software for Atmel flash MCU (www.atmel.com/asf).
» It simplifies the usage of microcontrollers, providing an abstraction to the hardware and high-value middlewares
» ASF is designed to be used for evaluation, prototyping, design and production phases
» ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as standalone for GCC, IAR compilers
» ASF can be downloaded for free

ASF online documentation can be found here: http://asf.atmel.com

Supported devices:
» AVR UC3(Trade Mark) (http://www.atmel.com/products/microcontrollers/avr/32-bitavruc3.aspx)
» AVR XMEGA(Trade Mark) (http://www.atmel.com/products/microcontrollers/avr/avr_xmega.aspx) 
» megaAVR(Trade Mark) (http://www.atmel.com/products/microcontrollers/avr/megaavr.aspx) 
» SAM (http://www.atmel.com/products/microcontrollers/arm/default.aspx)

Each software module is provided with full source code, example of usage and
ready-to-use projects for the IAR EW and GNU GCC compilers.

This package is dedicated for IAR and GCC makefile users. AVR Studio 5 or Atmel Studio 6 users do not
need this package as the ASF is integrated in Atmel Studio.

The top folder organization is as follow:
- the avr32/ folder contains software modules(source code and projects) dedicated to AVR UC3 devices,
- the mega/ folder contains software modules(source code and projects) dedicated to megaAVR devices,
- the xmega/ folder contains software modules(source code and projects) dedicated to AVR XMEGA devices,
- the sam/ folder contains software modules(source code and projects) dedicated to SAM devices,
- the common/ folder contains software modules(source code and projects) shared by all AVR and SAM devices,
- the thirdparty/ folder contains software modules(source code and projects) from thirdparty providers for all Atmel devices.

The thirdparty/ folder is organized by thirdparty software module (i.e. one folder per thirdparty software module).

The avr32/, xmega/, mega/, sam/ and common/ folders are organized as follow:
- the drivers/ folder contains low-level software drivers for MCU on-chip resources (eg cpu, usart, adc drivers).
- the boards/ folder contains board-specific source code files.
- the utils/ folder contains files that are used by all other modules: it holds
several linker script files, IAR & GCC pre-compiled libraries of some ASF modules,
and C/C++ utility files with general usage defines, macros and functions.
- the services/ folder contains application-oriented pieces of software that are
not specific to boards nor chips (eg. FAT, TCP/IP stack, os, JPEG decoder).
For the common/ top folder, the services/ folder also contains chip-specific code.
- the components/ folder offers, for each supported hardware component, a software
interface to interact with the component (eg memories like SDRAM, SD card, or display)
- the applications/ contains hefty examples of applications using services and drivers.


2 - Documentation
--------------------------

ASF release notes, reference manual and getting started documents can be found on http://www.atmel.com/asf.

The ASF documentation can be found online on http://asf.atmel.com.


3 - Toolchain Header Files Update
---------------------------------

For AVR UC3 users using IAR, it is recommended to update the IAR header files.
To do that, unzip the avr32-headers.zip file (located under
the avr32/utils/header_files) to the IAR EWAVR32 installation folder
under "IAR installation folder"/Embedded Workbench x.y/avr32/inc/.


4 - IAR EW Users
----------------

Using an example of usage of the AVR UC3 GPIO driver module as an example, the
IAR projects are located under:
- avr32/drivers/gpio/peripheral_bus_example/at32uc3a0512_evk1000/iar/ for an EVK1100 board,
- avr32/drivers/gpio/peripheral_bus_example/at32uc3a0512_evk1105/iar/ for an EVK1105 board,
- avr32/drivers/gpio/peripheral_bus_example/at32uc3b0256_evk1101/iar/ for an EVK1101 board,
- avr32/drivers/gpio/peripheral_bus_example/at32uc3a3256_evk1104/iar/ for an EVK1104 board,
- avr32/drivers/gpio/peripheral_bus_example/at32uc3l064_stk600-rcuc3l0/iar/ for an STK600-RCUC3L0 setup,
- avr32/drivers/gpio/peripheral_bus_example/at32uc3c0512c_uc3c_ek/iar/ for an AT32UC3C-EK board,
- avr32/drivers/gpio/peripheral_bus_example/at32uc3l064_uc3l_ek/iar/ for an AT32UC3L-EK board.

Each iar folder contains a full IAR project with:
- an IAR EWAVR32 workspace file(avr32_drivers_gpio_peripheral_bus_example_uc3l_ek.eww: double-click on this file to open the whole project),
- an IAR EWAVR32 project file(avr32_drivers_gpio_peripheral_bus_example_uc3l_ek.ewp),
- an IAR EWAVR32 debug configuration file(avr32_drivers_gpio_peripheral_bus_example_uc3l_ek.ewd).


5 - AVR32 Studio Users
----------------------

It is possible to work with an unzipped ASF package from within AVR32 Studio: this
is described in the application note "AVR32769: How to Compile the standalone AVR
UC3 Software Framework in AVR32 Studio V2": http://www.atmel.com/dyn/resources/prod_documents/doc32115.pdf


6 - Offline documentation - Generating The HTML Documentation
-------------------------------------

All modules are fully documented using doxygen tags. Each project within the ASF
contains a doxyfile.doxygen (used to configure doxygen for a proper documentation
generation): to generate the html documentation, doxygen must be installed (see
http://www.doxygen.org/download.html) and the doxyfile.doxygen must be used as
the input configuration file for doxygen.

Using an example of usage of the AVR UC3 GPIO driver module as an example, for
an AT32UC3C-EK board, the associated doxyfile.doxygen file is under the
avr32/drivers/gpio/peripheral_bus_example/at32uc3c0512c_uc3c_ek/doxygen/ folder.
Run doxygen and use this doxyfile.doxygen as configuration file for doxygen.
Using the command line, this is done with the following command: doxygen doxyfile.doxygen


7 - Contact Information
-----------------------

For more info about Atmel MCU visit http://www.atmel.com/products/microcontrollers/default.aspx or contact support through the http://support.atmel.no/ site.
The support site also have a Frequently Asked Questions page with the most common questions.

ASF bugs or enhancement requests can be reported in the ASF Bug Tracker (http://asf.atmel.com/bugzilla/).


8 - Community Information
-------------------------

Users can find an ASF forum (http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewforum&f=21) on AVRfreaks for AVR users or on http://www.at91.com/ for SAM users.
This forum can be used to have an open discussion about usage, development, bugs, fixes, improvements, etc.

asf's People

Contributors

itdaniher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asf's Issues

TCC_ASYNC

where is TCC_ASYNC is defined? I can't compile because it doesn't recognize this definition. but it's already being used in other drivers!

usart_serial_example_pdc.c

I tried this example with Arduino Due, Atmel Studio 7 and Terminal program CoolTermWin. Transmissions from terminal to controller are working, but there is no echo from controller back to terminal. Is this a bug or do I miss something here.

Sys_TimerTaskHandler()

I am running the lwmesh demo code. I found the program run into the while loop in the sys_TimerTaskHandler() in sysTimer.c

Did I mess up somewhere, or this is possible a bug?

buffer overflow in handle_received_frame_irq

Description

In handle_received_frame_irq, it reads mpdu content from MMIO

trx_frame_read(frame_ptr, LENGTH_FIELD_LEN + phy_frame_len +
			LQI_LEN);
receive_frame->mpdu = frame_ptr;
/* Add ED value at the end of the frame buffer. */
receive_frame->mpdu[phy_frame_len + LQI_LEN + ED_VAL_LEN] = ed_value;

The mpdu content is later parsed here, the first 32 bits is considered as length of the frame without any restriction. This makes frame_ptr accessing oob memory, causing data corruption, DoS and potientially RCE.

frame_len = last_frame_length = receive_frame->mpdu[0];
...
frame_ptr = &(receive_frame->mpdu[frame_len + LQI_LEN]);
lqi = *frame_ptr++;   <-- oob write
ed_level = *frame_ptr;

Fix

As all (or almost every) versions in thirdparty/wireless/avr2025_mac/source/tal/ can have the same issue, the best way to fix this might be adding length check in right before actually using the length at here.

This is discoverd by XinDistince and xdchase.

During the transfer by bulk, embedded soft crashes

I try to use your USB library for my ATSAM3U4E in my embedded system. I find that when I have save around 300Mbytes or more, my embedded system crash so I need to restart 2 or 3 times to finally achieve the full download. I can't figurate out why my embedded system crashes. I send you a quick view of my functions.

I create an app with Qt to download the data from the memory in my embedded system:

bool Device::usbWriteRead(t_usb_packet request, t_usb_packet response, int timeout) {
mutex.lock();
/
Send request /
if (usb_bulk_write(dev_handle, udi_vendor_ep_bulk_out, (char
)request, sizeof(t_usb_packet), 10) < 0) {
mutex.unlock();
return false;
}
/
Retrieve response /
if (usb_bulk_read(dev_handle, udi_vendor_ep_bulk_in, (char
)response, sizeof(t_usb_packet), timeout) < 0) {
mutex.unlock();
return false;
}
mutex.unlock();
return true;
}

My embedded system threat the bulk communication as follow:
static void usb_bulk_in_received(udd_ep_status_t status, iram_size_t nb_transfered, udd_ep_id_t ep) {
if (UDD_EP_TRANSFER_OK != status) return;
udi_vendor_bulk_out_run((uint8_t*)&usb_packet, sizeof(usb_packet), usb_bulk_out_received);
}

static void usb_bulk_out_received(udd_ep_status_t status, iram_size_t nb_transfered, udd_ep_id_t ep) {
if (UDD_EP_TRANSFER_OK != status) return;
switch (usb_packet.type) {
case USB_PACKET_TYPE_GET_DATA:
/* Return data from flash /
nand_flash_ecc_read_page(&nf_ecc, usb_packet.content.data.block, usb_packet.content.data.page, nf_data_buffer, NULL);
memcpy(&usb_packet.content.data.buffer, &nf_data_buffer[usb_packet.content.data.subpage * 512], 512);
break;
default:
break;
}
udi_vendor_bulk_in_run((uint8_t
)&usb_packet, sizeof(usb_packet), usb_bulk_in_received);
}

I appreciate all the help you can give me. Thank you very much.

Jorge.

Not working on SAM3x8E (Arduino Due) -- changes to get it working

ILI9225.c

I tried to get my (china) ILI9225 working with ASF and this lib on "Arduino Due" with it's SAM3x8E controller and it's hardware SPI0.
After days of research I found, why it does not work:

  1. SPI_MODE_3 instead of 1 has to be chosen (CLK-Signal idle high; capture on rising CLK)
  2. 8 bits per Transfer has to be selected (do not switch it back to "default 16Bit" as noted in ili9225_write_cmd-function!!)
  3. write_ram and write_ram_buffer functions have to call "spi_write" twice, one time for High-Byte, one time for Low-Byte of the uint16_t-Data:
    spi_write(BOARD_ILI9225_SPI, us_data>>8, BOARD_ILI9225_SPI_NPCS, 0); //High-Byte
    spi_write(BOARD_ILI9225_SPI, us_data&0x00FF, BOARD_ILI9225_SPI_NPCS, 0); //Low-Byte

Issue in read file from SD with this example

Hi,
I am using same program, but getting following error:
-- SD/MMC/SDIO Card Example --

-- Compiled: Dec 13 2017 18:16:47 --

Please plug an SD, MMC or SDIO card in slot 1.

Card information:

SDHC

15193 MB

Card R/W test:

Read...  22260 KBps [OK]

Write pattern...  20078 KBps [OK]

Read and check pattern... Check [FAIL]

Test finished, please unplugged the card.
Please see ....Read and check pattern... Check [FAIL] test come fail.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.