source: arduino-1-6-7/trunk/fuentes/arduino-ide-amd64/hardware/arduino/avr/firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/UTILS/conf_isp.h @ 46

Last change on this file since 46 was 46, checked in by jrpelegrina, 4 years ago

First release to Xenial

File size: 5.2 KB
Line 
1/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
2
3/*This file is prepared for Doxygen automatic documentation generation.*/
4/*! \file ******************************************************************
5 *
6 * \brief ISP configuration file.
7 *
8 * This file contains the possible external configuration of the ISP.
9 *
10 * - Compiler:           IAR EWAVR32 and GNU GCC for AVR32
11 * - Supported devices:  All AVR32 devices with a USB module can be used.
12 * - AppNote:
13 *
14 * \author               Atmel Corporation: http://www.atmel.com \n
15 *                       Support and FAQ: http://support.atmel.no/
16 *
17 ***************************************************************************/
18
19/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions are met:
23 *
24 * 1. Redistributions of source code must retain the above copyright notice, this
25 * list of conditions and the following disclaimer.
26 *
27 * 2. Redistributions in binary form must reproduce the above copyright notice,
28 * this list of conditions and the following disclaimer in the documentation
29 * and/or other materials provided with the distribution.
30 *
31 * 3. The name of Atmel may not be used to endorse or promote products derived
32 * from this software without specific prior written permission.
33 *
34 * 4. This software may only be redistributed and used in connection with an Atmel
35 * AVR product.
36 *
37 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
38 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
39 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
40 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
41 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
42 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
45 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
46 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
47 *
48 */
49
50#ifndef _CONF_ISP_H_
51#define _CONF_ISP_H_
52
53#include <avr32/io.h>
54#include "compiler.h"
55
56
57//_____ D E F I N I T I O N S ______________________________________________
58
59#define PRODUCT_MANUFACTURER_ID       0x58
60#define PRODUCT_FAMILY_ID             0x20
61
62#define ISP_VERSION                   0x10
63#define ISP_ID0                       0x00
64#define ISP_ID1                       0x00
65
66#define ISP_CFG1                      (*(volatile U32 *)ISP_CFG1_ADDRESS)
67#define ISP_CFG1_ADDRESS              (AVR32_FLASHC_USER_PAGE_ADDRESS + ISP_CFG1_OFFSET)
68#define ISP_CFG1_OFFSET               0x000001FC
69#define ISP_CFG1_SIZE                 4
70
71#define ISP_CFG1_BOOT_KEY1            16
72#define ISP_CFG1_BOOT_KEY1_MASK       0xFFFF0000
73#define ISP_CFG1_BOOT_KEY1_OFFSET     16
74#define ISP_CFG1_BOOT_KEY1_SIZE       16
75#define ISP_CFG1_BOOT_KEY1_VALUE      0xE11E
76
77#define ISP_CFG1_FORCE                9
78#define ISP_CFG1_FORCE_MASK           0x00000200
79#define ISP_CFG1_FORCE_OFFSET         9
80#define ISP_CFG1_FORCE_SIZE           1
81
82#define ISP_CFG1_IO_COND_EN           8
83#define ISP_CFG1_IO_COND_EN_MASK      0x00000100
84#define ISP_CFG1_IO_COND_EN_OFFSET    8
85#define ISP_CFG1_IO_COND_EN_SIZE      1
86
87#define ISP_CFG1_CRC8                 0
88#define ISP_CFG1_CRC8_MASK            0x000000FF
89#define ISP_CFG1_CRC8_OFFSET          0
90#define ISP_CFG1_CRC8_SIZE            8
91#define ISP_CFG1_CRC8_POLYNOMIAL      0x107
92
93#define ISP_CFG2                      (*(volatile U32 *)ISP_CFG2_ADDRESS)
94#define ISP_CFG2_ADDRESS              (AVR32_FLASHC_USER_PAGE_ADDRESS + ISP_CFG2_OFFSET)
95#define ISP_CFG2_OFFSET               0x000001F8
96#define ISP_CFG2_SIZE                 4
97
98#define ISP_CFG2_BOOT_KEY             17
99#define ISP_CFG2_BOOT_KEY_MASK        0xFFFE0000
100#define ISP_CFG2_BOOT_KEY_OFFSET      17
101#define ISP_CFG2_BOOT_KEY_SIZE        15
102#define ISP_CFG2_BOOT_KEY_VALUE       0x494F
103
104#define ISP_CFG2_IO_COND_LEVEL        16
105#define ISP_CFG2_IO_COND_LEVEL_MASK   0x00010000
106#define ISP_CFG2_IO_COND_LEVEL_OFFSET 16
107#define ISP_CFG2_IO_COND_LEVEL_SIZE   1
108
109#define ISP_CFG2_IO_COND_PIN          8
110#define ISP_CFG2_IO_COND_PIN_MASK     0x0000FF00
111#define ISP_CFG2_IO_COND_PIN_OFFSET   8
112#define ISP_CFG2_IO_COND_PIN_SIZE     8
113
114#define ISP_CFG2_CRC8                 0
115#define ISP_CFG2_CRC8_MASK            0x000000FF
116#define ISP_CFG2_CRC8_OFFSET          0
117#define ISP_CFG2_CRC8_SIZE            8
118#define ISP_CFG2_CRC8_POLYNOMIAL      0x107
119
120#define ISP_KEY                       (*(volatile U32 *)ISP_KEY_ADDRESS)
121#define ISP_KEY_ADDRESS               (AVR32_SRAM_ADDRESS + ISP_KEY_OFFSET)
122#define ISP_KEY_OFFSET                0x00000000
123#define ISP_KEY_SIZE                  4
124#define ISP_KEY_VALUE                 ('I' << 24 | 'S' << 16 | 'P' << 8 | 'K')
125
126#ifndef ISP_OSC
127  #define ISP_OSC                     0
128#endif
129
130#define DFU_FRAME_LENGTH              2048
131
132#define PROGRAM_START_ADDRESS         (AVR32_FLASH_ADDRESS + PROGRAM_START_OFFSET)
133#define PROGRAM_START_OFFSET          0x00002000
134
135
136#endif  // _CONF_ISP_H_
Note: See TracBrowser for help on using the repository browser.