| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229 |
- --
- -- Copyright (C) 2001-2010 by egnite Software GmbH
- --
- -- All rights reserved.
- --
- -- Redistribution and use in source and binary forms, with or without
- -- modification, are permitted provided that the following conditions
- -- are met:
- --
- -- 1. Redistributions of source code must retain the above copyright
- -- notice, this list of conditions and the following disclaimer.
- -- 2. Redistributions in binary form must reproduce the above copyright
- -- notice, this list of conditions and the following disclaimer in the
- -- documentation and/or other materials provided with the distribution.
- -- 3. Neither the name of the copyright holders nor the names of
- -- contributors may be used to endorse or promote products derived
- -- from this software without specific prior written permission.
- --
- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- -- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- -- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- -- AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- -- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- -- THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- -- SUCH DAMAGE.
- --
- -- For additional information see http://www.ethernut.de/
- --
- -- AVR32 Architecture
- --
- -- $Log: avr32.nut,v $
- nutarch_avr32 =
- {
- --
- -- Runtime Initialization
- --
- {
- name = "nutarch_avr32_cstartup",
- brief = "AVR32-GCC Startup",
- sources = { "avr32/init/crtavr32.S" },
- targets = { "avr32/init/crtavr32.o" },
- requires = { "TOOL_CC_AVR32", "TOOL_GCC" },
- },
- --
- -- Power Manager
- --
- {
- name = "nutarch_avr32_pm",
- brief = "Power Manager",
- requires = { "HW_MCU_AVR32" },
- sources = { "avr32/dev/pm.c" },
- options =
- {
- {
- macro = "OSC0_VAL",
- brief = "Osc0 Frequency",
- description = "The value of the Oscilator 0 (crystal) in Hz connected to the CPU.\n\n"..
- "Default values are:\n"..
- "EVK1100: 12000000\n"..
- "EVK1101: 12000000\n"..
- "EVK1104: 12000000\n"..
- "EVK1105: 12000000\n",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "PLL_MUL_VAL",
- brief = "PLL Multiply Factor",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "These bitfields determine the ratio of the PLL output frequency "..
- "(voltage controlled oscillator frequency fVCO) to the source "..
- "oscillator frequency:\n\n"..
- "fVCO = (PLLMUL+1)/(PLLDIV) x fOSC if PLLDIV > 0.\n"..
- "fVCO = 2*(PLLMUL+1) x fOSC if PLLDIV = 0\n"..
- "Note that the MUL field cannot be equal to 0 or 1, or the behavior of the PLL will be undefined.\n"..
- "Possible values of PLLMUL are 2...15\n",
- requires = { "HW_PLL_AVR32" },
- default = "9",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "PLL_DIV_VAL",
- brief = "PLL Division Factor",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "These bitfields determine the ratio of the PLL output frequency "..
- "(voltage controlled oscillator frequency fVCO) to the source "..
- "oscillator frequency:\n\n"..
- "fVCO = (PLLMUL+1)/(PLLDIV) x fOSC if PLLDIV > 0.\n"..
- "fVCO = 2*(PLLMUL+1) x fOSC if PLLDIV = 0\n"..
- "Note that the MUL field cannot be equal to 0 or 1, or the behavior of the PLL will be undefined.\n"..
- "Possible values of PLLDIV are 0...15\n",
- requires = { "HW_PLL_AVR32" },
- default = "1",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "PLL_FREQ_VAL",
- brief = "Select the VCO frequency range",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "Select the VCO frequency range:\n\n"..
- "0: 160MHz < fvco < 240MHz\n"..
- "1: 80MHz < fvco < 180MHz",
- requires = { "HW_PLL_AVR32" },
- default = "1",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "PLL_DIV2_VAL",
- brief = "Enable the extra output divider",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "Enable the extra output divider:\n\n"..
- "0: fPLL = fvco\n"..
- "1: fPLL = fvco / 2",
- requires = { "HW_PLL_AVR32" },
- default = "1",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "PLL_WBWD_VAL",
- brief = "Disable the Wide-Bandwidth mode",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "Disable the Wide-Bandwidth mode (Wide-Bandwidth mode allows a faster startup time and out-of-lock time):\n\n"..
- "0: Wide Bandwidth Mode enabled\n"..
- "1: Wide Bandwidth Mode disabled",
- requires = { "HW_PLL_AVR32" },
- default = "0",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "PLL_PBADIV_VAL",
- brief = "PBA Division and Clock Select",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "PBA Division and Clock Select:\n\n"..
- "PBADIV = 0: PBA clock equals main clock\n"..
- "PBADIV = 1: PBA clock equals main clock divided by 2^(PBASEL+1)",
- requires = { "HW_PLL_AVR32" },
- default = "0",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "PLL_PBASEL_VAL",
- brief = "PBA Division and Clock Select",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "PBA Division and Clock Select:\n\n"..
- "PBADIV = 0: PBA clock equals main clock\n"..
- "PBADIV = 1: PBA clock equals main clock divided by 2^(PBASEL+1)",
- requires = { "HW_PLL_AVR32" },
- default = "0",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "PLL_PBBDIV_VAL",
- brief = "PBB Division and Clock Select",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "PBB Division and Clock Select:\n\n"..
- "PBBDIV = 0: PBB clock equals main clock\n"..
- "PBBDIV = 1: PBB clock equals main clock divided by 2^(PBBSEL+1)",
- requires = { "HW_PLL_AVR32" },
- default = "0",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "PLL_PBBSEL_VAL",
- brief = "PBB Division and Clock Select",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "PBB Division and Clock Select:\n\n"..
- "PBBDIV = 0: PBB clock equals main clock\n"..
- "PBBDIV = 1: PBB clock equals main clock divided by 2^(PBBSEL+1)",
- requires = { "HW_PLL_AVR32" },
- default = "0",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "PLL_HSBDIV_VAL",
- brief = "HSB Division and Clock Select",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "For the AT32UC3B, HSBDIV always equals CPUDIV, and HSBSEL always "..
- "equals CPUSEL, as the HSB clock is always equal to the CPU clock.\n\n"..
- "HSB Division and Clock Select:\n\n"..
- "HSBDIV = 0: CPU clock equals main clock\n"..
- "HSBDIV = 1: CPU clock equals main clock divided by 2^(HSBSEL+1)",
- requires = { "HW_PLL_AVR32" },
- default = "0",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "PLL_HSBSEL_VAL",
- brief = "HSB Division and Clock Select",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "For the AT32UC3B, HSBDIV always equals CPUDIV, and HSBSEL always "..
- "equals CPUSEL, as the HSB clock is always equal to the CPU clock.\n\n"..
- "HSB Division and Clock Select:\n\n"..
- "HSBDIV = 0: CPU clock equals main clock\n"..
- "HSBDIV = 1: CPU clock equals main clock divided by 2^(HSBSEL+1)",
- requires = { "HW_PLL_AVR32" },
- default = "0",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "DFLL_CPU_FREQ",
- brief = "DFLL CPU Frequency",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "For the AT32UC3L, the DFLL is set based on a target frequency value ",
- requires = { "HW_DFLL_AVR32" },
- default = "12000000",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "DFLL_CPU_IMUL",
- brief = "DFLL CPU Integer multiplier",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "For the AT32UC3L, the DFLL is set based on a target frequency value ",
- requires = { "HW_DFLL_AVR32" },
- default = "0",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- {
- macro = "DFLL_CPU_FMUL",
- brief = "DFLL CPU Fraction multiplier",
- description = "Make sure to read the datasheet before modifying this value.\n\n"..
- "For the AT32UC3L, the DFLL is set based on a target frequency value ",
- requires = { "HW_DFLL_AVR32" },
- default = "0",
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- },
- },
- --
- -- SDRAM Controler
- --
- {
- name = "nutarch_avr32_sdramc",
- brief = "SDRAM Controler",
- requires = { "HW_MCU_AVR32", "HW_SDRAMC" },
- options =
- {
- {
- macro = "NUTMEM_SDRAM_BASE",
- brief = "SDRAM Base Address",
- description = "Base SDRAM Address where SDRAM memory starts."..
- "Disable this if your board doesn't provide external SDRAM",
- requires = { "HW_SDRAMC" },
- provides = { "HW_SDRAM" },
- default = "0xD0000000",
- flavor = "booldata",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_COLBITS",
- brief = "SDRAM Column Address Bits",
- requires = { "HW_SDRAM" },
- default = "9",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_ROWBITS",
- brief = "SDRAM Row Address Bits",
- requires = { "HW_SDRAM" },
- default = "13",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_BANKS",
- brief = "SDRAM Banks",
- requires = { "HW_SDRAM" },
- default = "2",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_CASLAT",
- brief = "SDRAM CAS Latency",
- requires = { "HW_SDRAM" },
- default = "2",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_DBW",
- brief = "SDRAM Data Bus Width",
- description = "EBI Data bus width connected to SDRAM."..
- "This is either 16 or 32",
- requires = { "HW_SDRAM" },
- default = "16",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_TWR",
- brief = "SDRAM Write Recovery Cycles",
- requires = { "HW_SDRAM" },
- default = "14",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_TRC",
- brief = "SDRAM Row Cycle Delay",
- requires = { "HW_SDRAM" },
- default = "60",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_TRP",
- brief = "SDRAM Row Precharge Delay",
- requires = { "HW_SDRAM" },
- default = "15",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_TRCD",
- brief = "SDRAM Row to Column Delay",
- requires = { "HW_SDRAM" },
- default = "15",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_TRAS",
- brief = "SDRAM Active to Precharge Delay",
- requires = { "HW_SDRAM" },
- default = "37",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_TXSR",
- brief = "SDRAM Self Refresh to Active Delay",
- requires = { "HW_SDRAM" },
- default = "67",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_TR",
- brief = "SDRAM Max Refresh Delay",
- description = "Maximum amount of time in which the SDRAMC must issue a refresh command",
- requires = { "HW_SDRAM" },
- default = "7812",
- file = "include/cfg/memory.h"
- },
- {
- macro = "NUTMEM_SDRAM_TMRD",
- brief = "SDRAM Mode Register to Active or Refresh Delay",
- requires = { "HW_SDRAM" },
- default = "2",
- file = "include/cfg/memory.h"
- },
- },
- },
- --
- -- Board Initialization
- --
- {
- name = "nutarch_avr32_bs",
- brief = "Board Support",
- sources =
- function()
- return { "avr32/board/"..string.lower(c_macro_edit("PLATFORM"))..".c" };
- end,
- requires = { "HW_BOARD_SUPPORT" },
- },
- --
- -- Context Switching
- --
- {
- name = "nutarch_avr32_context",
- brief = "Context Switching",
- provides = { "NUT_CONTEXT_SWITCH" },
- requires = { "HW_MCU_AVR32", "TOOL_GCC" },
- sources = { "avr32/os/context.c" },
- },
- --
- -- System Timer Hardware
- --
- {
- name = "nutarch_ostimer_avr32",
- brief = "System Timer",
- requires = { "HW_TIMER_AVR32" },
- provides = { "NUT_OSTIMER_DEV" },
- sources = { "avr32/dev/ostimer.c" },
- options =
- {
- {
- macro = "AVR32_PLL_MAINCK",
- brief = "Main Clock",
- description = "Frequency of the external crystal. If this option is "..
- "enabled and NUT_CPU_FREQ is not enabled, then the "..
- "specified value will be used together with "..
- "the PLL register settings to determine the CPU master clock. "..
- "Otherwise you must specify NUT_CPU_FREQ.",
- requires = { "HW_PLL_AT91" },
- flavor = "booldata",
- file = "include/cfg/clock.h"
- },
- },
- },
- {
- name = "nutarch_wdt_avr32",
- brief = "Watchdog Timer",
- requires = { "HW_WDOG_AVR32" },
- sources = { "avr32/dev/wdt.c" },
- },
- --
- -- Interrupt handling.
- --
- {
- name = "nutarch_avr32_irq",
- brief = "Interrupt Handler",
- requires = { "HW_MCU_AVR32" },
- provides = { "DEV_IRQ_AVR32" },
- sources =
- {
- "avr32/dev/ih_irq0.c",
- "avr32/dev/ih_irq1.c",
- "avr32/dev/ih_irq2.c",
- "avr32/dev/ih_irq3.c",
- "avr32/dev/ih_irq4.c",
- "avr32/dev/ih_irq5.c",
- "avr32/dev/ih_irq6.c",
- "avr32/dev/ih_irq7.c",
- "avr32/dev/ih_tc0.c",
- "avr32/dev/ih_gpio0.c",
- "avr32/dev/ih_nmi.c",
- "avr32/dev/ihndlr.c",
- },
- options =
- {
- {
- macro = "INTERRUPT0_ALT_PIN",
- brief = "External Interrupt 0 Pin",
- type = "integer",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT0_ALT_PINSET",
- brief = "External Interrupt 0 Alternative Pinset",
- type = "enumerated",
- choices = function() return GetAlternativePinsets() end,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT1_ALT_PIN",
- brief = "External Interrupt 1 Pin",
- type = "integer",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT1_ALT_PINSET",
- brief = "External Interrupt 1 Alternative Pinset",
- type = "enumerated",
- choices = function() return GetAlternativePinsets() end,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT2_ALT_PIN",
- brief = "External Interrupt 2 Pin",
- type = "integer",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT2_ALT_PINSET",
- brief = "External Interrupt 2 Alternative Pinset",
- type = "enumerated",
- choices = function() return GetAlternativePinsets() end,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT3_ALT_PIN",
- brief = "External Interrupt 3 Pin",
- type = "integer",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT3_ALT_PINSET",
- brief = "External Interrupt 3 Alternative Pinset",
- type = "enumerated",
- choices = function() return GetAlternativePinsets() end,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT4_ALT_PIN",
- brief = "External Interrupt 4 Pin",
- type = "integer",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT4_ALT_PINSET",
- brief = "External Interrupt 4 Alternative Pinset",
- type = "enumerated",
- choices = function() return GetAlternativePinsets() end,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT5_ALT_PIN",
- brief = "External Interrupt 5 Pin",
- type = "integer",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT5_ALT_PINSET",
- brief = "External Interrupt 5 Alternative Pinset",
- type = "enumerated",
- choices = function() return GetAlternativePinsets() end,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT6_ALT_PIN",
- brief = "External Interrupt 6 Pin",
- type = "integer",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT6_ALT_PINSET",
- brief = "External Interrupt 6 Alternative Pinset",
- type = "enumerated",
- choices = function() return GetAlternativePinsets() end,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT7_ALT_PIN",
- brief = "External Interrupt 7 Pin",
- type = "integer",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT7_ALT_PINSET",
- brief = "External Interrupt 7 Alternative Pinset",
- type = "enumerated",
- choices = function() return GetAlternativePinsets() end,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT_NMI_ENABLE",
- brief = "Enable NMI",
- description = "When selected, the driver will not support any handshake signals.",
- flavor = "boolean",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT_NMI_ALT_PIN",
- brief = "External Interrupt NMI Pin",
- type = "integer",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "INTERRUPT_NMI_ALT_PINSET",
- brief = "External Interrupt NMI Alternative Pinset",
- type = "enumerated",
- choices = function() return GetAlternativePinsets() end,
- file = "include/cfg/arch/avr32pio.h"
- },
- },
- },
- --
- -- Device Drivers
- --
- {
- name = "nutarch_avr32_debug",
- brief = "UART Debug Output",
- description = "This simple UART output driver uses polling instead of "..
- "interrupts and can be used within interrupt routines. It "..
- "is mainly used for debugging and tracing.\n\n"..
- "Call NutRegisterDevice(&devDebug0, 0, 0) for U(S)ART0 and "..
- "NutRegisterDevice(&devDebug1, 0, 0) for U(S)ART1. "..
- "Then you can use any of the stdio functions to open "..
- "device uart0 or uart1 resp, up to the number of U(S)ARTs"..
- "available",
- requires = { "HW_UART_AVR32" },
- provides = { "DEV_UART", "DEV_FILE", "DEV_WRITE" },
- sources =
- {
- "avr32/dev/debug.c",
- },
- },
- {
- name = "nutarch_avr32_usart0",
- brief = "USART0 Driver",
- description = "Hardware specific USART driver. Implements hardware "..
- "functions for the generic driver framework.",
- requires = { "HW_UART_AVR32", "DEV_IRQ_AVR32", "NUT_EVENT", "CRT_HEAPMEM" },
- provides = { "DEV_UART_SPECIFIC" },
- sources =
- {
- "avr32/dev/usart0.c",
- "avr32/dev/ih_uart0.c"
- },
- options =
- {
- {
- macro = "UART0_ALT_PINSET",
- brief = "USART0 Alternative Pinset",
- type = "enumerated",
- choices = function() return GetAlternativePinsets() end,
- file = "include/cfg/uart.h"
- },
- {
- macro = "UART0_RXTX_ONLY",
- brief = "Receive/Transmit Only",
- description = "When selected, the driver will not support any handshake signals.",
- flavor = "boolean",
- exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
- file = "include/cfg/uart.h"
- },
- {
- macro = "UART0_HARDWARE_HANDSHAKE",
- brief = "Hardware Handshake",
- description = "When selected, the driver will support RTS/CTS hardware handshake. "..
- "Make sure, that the related peripheral pins are available.",
- flavor = "boolean",
- exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
- requires = { "HW_UART0_RTSCTS" },
- file = "include/cfg/uart.h"
- },
- {
- macro = "UART0_MODEM_CONTROL",
- brief = "Full Modem Control",
- description = "When selected, the driver will support full modem control. "..
- "Make sure, that all related peripheral pins are available.",
- flavor = "boolean",
- exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
- requires = { "HW_UART0_MODEM" },
- file = "include/cfg/uart.h"
- },
- {
- macro = "AVR32_UART0_RS485",
- brief = "USE HW RS485 on UART0",
- description = "If enabled, UART0 driver will enable hw RS485 on SAM7x."..
- "The UART0 RTS pin is used for RS485 direction switching.",
- provides = { "AVR32_UART0_RS485" },
- flavor = "booldata",
- },
- },
- },
- {
- name = "nutarch_avr32_usart1",
- brief = "USART1 Driver",
- description = "Hardware specific USART driver. Implements hardware "..
- "functions for the generic driver framework.",
- requires = { "HW_UART_AVR32", "DEV_IRQ_AVR32", "NUT_EVENT", "CRT_HEAPMEM" },
- provides = { "DEV_UART_SPECIFIC" },
- sources =
- {
- "avr32/dev/usart1.c",
- "avr32/dev/ih_uart1.c",
- },
- options =
- {
- {
- macro = "UART1_ALT_PINSET",
- brief = "USART1 Alternative Pinset",
- type = "enumerated",
- choices = function() return GetAlternativePinsets() end,
- file = "include/cfg/uart.h"
- },
- {
- macro = "UART1_RXTX_ONLY",
- brief = "Receive/Transmit Only",
- description = "When selected, the driver will not support any handshake signals.",
- flavor = "boolean",
- exclusivity = { "UART1_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
- file = "include/cfg/uart.h"
- },
- {
- macro = "UART1_HARDWARE_HANDSHAKE",
- brief = "Hardware Handshake",
- description = "When selected, the driver will support RTS/CTS hardware handshake. "..
- "Make sure, that the related peripheral pins are available.",
- flavor = "boolean",
- exclusivity = { "UART1_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
- requires = { "HW_UART1_RTSCTS" },
- file = "include/cfg/uart.h"
- },
- {
- macro = "UART1_MODEM_CONTROL",
- brief = "Full Modem Control",
- description = "When selected, the driver will support full modem control. "..
- "Make sure, that all related peripheral pins are available.",
- flavor = "boolean",
- exclusivity = { "UART1_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
- requires = { "HW_UART1_MODEM" },
- file = "include/cfg/uart.h"
- },
- {
- macro = "AVR32_UART1_RS485",
- brief = "USE HW RS485 on UART1",
- description = "If enabled, UART1 driver will enable hw RS485 on SAM7x."..
- "The UART1 RTS pin is used for RS485 direction switching.",
- provides = { "AVR32_UART1_RS485" },
- flavor = "booldata",
- },
- },
- },
- {
- name = "nutarch_avr32_usart2",
- brief = "USART2 Driver",
- description = "Hardware specific USART driver. Implements hardware "..
- "functions for the generic driver framework.",
- requires = { "HW_UART_AVR32", "HW_UART2_AVR32", "DEV_IRQ_AVR32", "NUT_EVENT", "CRT_HEAPMEM" },
- provides = { "DEV_UART_SPECIFIC" },
- sources =
- {
- "avr32/dev/usart2.c",
- "avr32/dev/ih_uart2.c",
- },
- options =
- {
- {
- macro = "UART2_ALT_PINSET",
- brief = "USART2 Alternative Pinset",
- type = "enumerated",
- choices = function() return GetAlternativePinsets() end,
- file = "include/cfg/uart.h"
- },
- {
- macro = "UART2_RXTX_ONLY",
- brief = "Receive/Transmit Only",
- description = "When selected, the driver will not support any handshake signals.",
- flavor = "boolean",
- exclusivity = { "UART2_RXTX_ONLY", "UART2_HARDWARE_HANDSHAKE", "UART2_MODEM_CONTROL" },
- file = "include/cfg/uart.h"
- },
- {
- macro = "UART2_HARDWARE_HANDSHAKE",
- brief = "Hardware Handshake",
- description = "When selected, the driver will support RTS/CTS hardware handshake. "..
- "Make sure, that the related peripheral pins are available.",
- flavor = "boolean",
- exclusivity = { "UART2_RXTX_ONLY", "UART2_HARDWARE_HANDSHAKE", "UART2_MODEM_CONTROL" },
- requires = { "HW_UART2_RTSCTS" },
- file = "include/cfg/uart.h"
- },
- {
- macro = "UART2_MODEM_CONTROL",
- brief = "Full Modem Control",
- description = "When selected, the driver will support full modem control. "..
- "Make sure, that all related peripheral pins are available.",
- flavor = "boolean",
- exclusivity = { "UART2_RXTX_ONLY", "UART2_HARDWARE_HANDSHAKE", "UART2_MODEM_CONTROL" },
- requires = { "HW_UART2_MODEM" },
- file = "include/cfg/uart.h"
- },
- {
- macro = "AVR32_UART2_RS485",
- brief = "USE HW RS485 on UART1",
- description = "If enabled, UART1 driver will enable hw RS485 on SAM7x."..
- "The UART1 RTS pin is used for RS485 direction switching.",
- provides = { "AVR32_UART2_RS485" },
- flavor = "booldata",
- },
- },
- },
- {
- name = "nutarch_avr32_macb",
- brief = "MACB Driver",
- description = "LAN driver for AVR32.",
- requires = { "HW_MACB_AVR32", "NUT_EVENT", "NUT_TIMER" },
- provides = { "NET_PHY" },
- sources =
- {
- "avr32/dev/macb.c",
- "avr32/dev/ih_macb.c"
- },
- options =
- {
- {
- macro = "PHY_PWRDN_BIT",
- brief = "PHY Power Down Bit",
- description = "For the SAM7X default is 18.\n\n",
- provides = { "PHY_PWRDN_CONTROL" },
- flavor = "booldata",
- type = "enumerated",
- choices = mcu_32bit_choice,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "PHY_PWRDN_NEGPOL",
- brief = "PHY Power Down Polarity",
- description = "Select this, if the PHY is powered down by a low signal.",
- requires = { "PHY_PWRDN_CONTROL" },
- flavor = "boolean",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "NUT_THREAD_NICRXSTACK",
- brief = "Receiver Thread Stack",
- description = "Number of bytes to be allocated for the stack of the NIC receive thread.",
- default = "768",
- type = "integer",
- file = "include/cfg/dev.h"
- },
- {
- macro = "EMAC_RX_BUFFERS",
- brief = "Receive Buffers",
- description = "Number of 128 byte receive buffers.\n"..
- "Increase to handle high traffic situations.\n"..
- "Decrease to handle low memory situations.\n"..
- "Default is 32.\n",
- flavor = "booldata",
- type = "integer",
- file = "include/cfg/dev.h"
- },
- {
- macro = "EMAC_TX_BUFSIZ",
- brief = "Transmit Buffer Size",
- description = "The driver will allocate two transmit buffers.\n"..
- "Can be decreased in low memory situations. Be aware, "..
- "that this may break your network application. Do not "..
- "change this without exactly knowing the consequences.\n"..
- "Default is 1536.\n",
- flavor = "booldata",
- type = "integer",
- file = "include/cfg/dev.h"
- },
- }
- },
- --
- -- Special Functions
- --
- {
- name = "nutarch_avr32_gpio",
- brief = "GPIO Controller",
- description = "Generic port I/O API.",
- requires = { "HW_MCU_AVR32" },
- sources =
- {
- "avr32/dev/gpio_nutos.c",
- },
- },
- {
- name = "nutarch_avr32_rstc",
- brief = "Reset Controller",
- description = "reset controller support.",
- requires = { "HW_MCU_AVR32" },
- provides = { "DEV_MCU_RESET" },
- sources = { "avr32/dev/reset.c" },
- },
- {
- name = "nutarch_avr32_spibus0",
- brief = "SPI0 Bus Controller",
- description = "Hardware specific SPI driver. Implements hardware "..
- "functions for the SPI0 bus.",
- requires = { "HW_SPI_AVR32_0" },
- provides = { "SPIBUS_CONTROLLER" },
- sources =
- {
- "avr32/dev/spibus.c",
- "avr32/dev/spibus0.c",
- "avr32/dev/ih_spi0.c",
- },
- options =
- {
- {
- macro = "SPIBUS0_POLLING_MODE",
- brief = "Polling Mode (First Controller)",
- description = "If enabled, the controller will use polling mode. By default "..
- "interrupt mode is used.",
- flavor = "boolean",
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPIBUS0_DOUBLE_BUFFER",
- brief = "PDC Mode (First Controller)",
- description = "If enabled, the controller will use PDC mode.\n\n"..
- "Under development.",
- requires = { "NOT_AVAILABLE" },
- flavor = "boolean",
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI0_CS0_PIO_ID",
- brief = "CS0 Port ID (First Controller)",
- description = "ID of the port used for SPI bus 0 chip select 0.",
- type = "enumerated",
- choices = function() return GetAvr32PioIds() end,
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI0_CS0_PIO_BIT",
- brief = "CS0 Port Bit (First Controller)",
- description = "Port bit used for SPI bus 0 chip select 0.",
- type = "enumerated",
- choices = mcu_32bit_choice,
- flavor = "integer",
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI0_CS1_PIO_ID",
- brief = "CS1 Port ID (First Controller)",
- description = "ID of the port used for SPI bus 0 chip select 1.",
- type = "enumerated",
- choices = function() return GetAvr32PioIds() end,
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI0_CS1_PIO_BIT",
- brief = "CS1 Port Bit (First Controller)",
- description = "Port bit used for SPI bus 0 chip select 1.",
- type = "enumerated",
- choices = mcu_32bit_choice,
- flavor = "integer",
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI0_CS2_PIO_ID",
- brief = "CS2 Port ID (First Controller)",
- description = "ID of the port used for SPI bus 0 chip select 2.",
- type = "enumerated",
- choices = function() return GetAvr32PioIds() end,
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI0_CS2_PIO_BIT",
- brief = "CS2 Port Bit (First Controller)",
- description = "Port bit used for SPI bus 0 chip select 2.",
- type = "enumerated",
- choices = mcu_32bit_choice,
- flavor = "integer",
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI0_CS3_PIO_ID",
- brief = "CS3 Port ID (First Controller)",
- description = "ID of the port used for SPI bus 0 chip select 3.",
- type = "enumerated",
- choices = function() return GetAvr32PioIds() end,
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI0_CS3_PIO_BIT",
- brief = "CS3 Port Bit (First Controller)",
- description = "Port bit used for SPI bus 0 chip select 3.",
- type = "enumerated",
- choices = mcu_32bit_choice,
- flavor = "integer",
- file = "include/cfg/spi.h"
- },
- },
- },
- {
- name = "nutarch_avr32_spibus1",
- brief = "SPI1 Bus Controller",
- description = "Hardware specific SPI driver. Implements hardware "..
- "functions for the SPI1 bus.",
- requires = { "HW_SPI_AVR32_1" },
- provides = { "SPIBUS_CONTROLLER" },
- sources =
- {
- "avr32/dev/spibus1.c",
- "avr32/dev/ih_spi1.c",
- },
- options =
- {
- {
- macro = "SPIBUS1_POLLING_MODE",
- brief = "Polling Mode (Second Controller)",
- description = "If enabled, the controller will use polling mode. By default "..
- "interrupt mode is used.",
- flavor = "boolean",
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPIBUS1_DOUBLE_BUFFER",
- brief = "PDC Mode (Second Controller)",
- description = "If enabled, the controller will use PDC mode.\n\n"..
- "Under development.",
- requires = { "NOT_AVAILABLE" },
- flavor = "boolean",
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI1_CS0_PIO_ID",
- brief = "CS0 Port ID (Second Controller)",
- description = "ID of the port used for SPI bus 1 chip select 0.",
- type = "enumerated",
- choices = function() return GetAvr32PioIds() end,
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI1_CS0_PIO_BIT",
- brief = "CS0 Port Bit (Second Controller)",
- description = "Port bit used for SPI bus 1 chip select 0.",
- type = "enumerated",
- choices = mcu_32bit_choice,
- flavor = "integer",
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI1_CS1_PIO_ID",
- brief = "CS1 Port ID (Second Controller)",
- description = "ID of the port used for SPI bus 1 chip select 1.",
- type = "enumerated",
- choices = function() return GetAvr32PioIds() end,
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI1_CS1_PIO_BIT",
- brief = "CS1 Port Bit (Second Controller)",
- description = "Port bit used for SPI bus 1 chip select 1.",
- type = "enumerated",
- choices = mcu_32bit_choice,
- flavor = "integer",
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI1_CS2_PIO_ID",
- brief = "CS2 Port ID (Second Controller)",
- description = "ID of the port used for SPI bus 1 chip select 2.",
- type = "enumerated",
- choices = function() return GetAvr32PioIds() end,
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI1_CS2_PIO_BIT",
- brief = "CS2 Port Bit (Second Controller)",
- description = "Port bit used for SPI bus 1 chip select 2.",
- type = "enumerated",
- choices = mcu_32bit_choice,
- flavor = "integer",
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI1_CS3_PIO_ID",
- brief = "CS3 Port ID (Second Controller)",
- description = "ID of the port used for SPI bus 1 chip select 3.",
- type = "enumerated",
- choices = function() return GetAvr32PioIds() end,
- file = "include/cfg/spi.h"
- },
- {
- macro = "SPI1_CS3_PIO_BIT",
- brief = "CS3 Port Bit (Second Controller)",
- description = "Port bit used for SPI bus 1 chip select 3.",
- type = "enumerated",
- choices = mcu_32bit_choice,
- flavor = "integer",
- file = "include/cfg/spi.h"
- },
- },
- },
- {
- name = "nutarch_avr32_rtcc",
- brief = "RTC Controller",
- description = "Routines for RTC.",
- requires = { "HW_RTC_AVR32" },
- sources = { "avr32/dev/ih_rtc.c" },
- },
- {
- name = "nutarch_avr32_flashc",
- brief = "Flash Controller",
- description = "Routines for reading and writing embedded flash memory.",
- requires = { "HW_EFC_AVR32" },
- sources = { "avr32/dev/flashc.c" },
- },
- {
- name = "nutarch_avr32_hd44780",
- brief = "HD44780 Driver",
- requires = { "HW_MCU_AVR32" },
- provides = { "DEV_FILE", "DEV_WRITE", "LCD_GPIO" },
- sources = { "avr32/dev/hd44780.c" },
- options =
- {
- --
- -- LCD size parameters
- --
- {
- macro = "LCD_ROWS",
- brief = "Rows",
- description = "The number of available display rows, either 1, 2 or 4.",
- default = "4",
- flavor = "integer",
- file = "include/cfg/lcd.h"
- },
- {
- macro = "LCD_COLS",
- brief = "Columns",
- description = "The number of available display columns, either 8, 16, 20 or 40.",
- default = "20",
- flavor = "integer",
- file = "include/cfg/lcd.h"
- },
- --
- -- Selection of parallel interface parameters
- --
- {
- macro = "LCD_IF_8BIT",
- brief = "8-Bit Mode",
- description = "Select parallel bus width is 8 bit.\n"..
- "Splitting single bus lines accross ports is not "..
- "supported for data bit lines.\n"..
- "In 8 bit mode all data lines have to be aligned "..
- "in one row.\n"..
- "This option is actually not supported in this driver.",
- requires = { "LCD_GPIO" },
- flavor = "booldata",
- exclusivity = { "LCD_IF_8BIT", "LCD_IF_4BIT" },
- provides = { "LCD_IF_8BIT" },
- file = "include/cfg/lcd.h"
- },
- {
- macro = "LCD_IF_4BIT",
- brief = "Use 4-Bit Mode",
- description = "Select parallel bus width is 4 bit."..
- "Splitting single bus lines accross ports is not"..
- "supported for data bit lines.",
- requires = { "LCD_GPIO" },
- flavor = "booldata",
- exclusivity = { "LCD_IF_8BIT", "LCD_IF_4BIT" },
- provides = { "LCD_IF_4BIT" },
- file = "include/cfg/lcd.h"
- },
- --
- -- Selection of parallel interface parameters
- --
- {
- macro = "LCD_DATA_PIO_ID",
- brief = "Port of LCD data pins",
- requires = { "LCD_GPIO" },
- description = "Port of the below defined data pins. Valid for "..
- "both, single bit definitions or LSB.",
- type = "enumerated",
- choices = avr32_pio_id_choice,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "LCD_DATA_LSB",
- brief = "Least Significant Data Bit",
- requires = { "LCD_GPIO" },
- description = "Bit number of the least significant data bit. The remaining "..
- "data bits must be connected to the following port bits.",
- type = "enumerated",
- flavor = "booldata",
- choices = mcu_32bit_choice,
- file = "include/cfg/arch/avr32pio.h"
- },
- --
- -- Selection of display control lines
- --
- {
- macro = "LCD_EN_PIO_ID",
- brief = "Enable Port",
- description = "Choose port used for the enable line.",
- type = "enumerated",
- choices = avr32_pio_id_choice,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "LCD_EN_BIT",
- brief = "Enable Bit",
- description = "Port bit of the LCD enable line. "..
- "This line must be exclusively reserved."..
- "For parallel chips this is the active high enable signal.\n"..
- "For serial chips this is the active low chip select line.",
- default = "8",
- type = "enumerated",
- choices = mcu_32bit_choice,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "LCD_RS_PIO_ID",
- brief = "RS Port",
- description = "Choose port for the Register Select line.",
- type = "enumerated",
- choices = avr32_pio_id_choice,
- flavor = "integer",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "LCD_RS_BIT",
- brief = "RS Bit",
- description = "Choose bit for the Register Select line.",
- default = "3",
- type = "enumerated",
- choices = mcu_32bit_choice,
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "LCD_RW_PIO_ID",
- brief = "RW Port",
- description = "Choose port for the Read Write line.",
- type = "enumerated",
- choices = avr32_pio_id_choice,
- flavor = "integer",
- file = "include/cfg/arch/avr32pio.h"
- },
- {
- macro = "LCD_RW_BIT",
- brief = "RW Bit",
- description = "Choose bit for the Read Write line.",
- default = "9",
- type = "enumerated",
- choices = mcu_32bit_choice,
- file = "include/cfg/arch/avr32pio.h"
- }
- }
- }
- }
|