Nut/OS  4.10.3
API Reference
ethernut5.c File Reference
#include <arch/arm.h>
Include dependency graph for ethernut5.c:

Go to the source code of this file.

Defines

#define PMM_RST_BASE   PIOB_BASE
#define PMM_RST_PIN   8
#define ARM_TTD_DOM_LSB   5
#define ARM_TTD_DOM(x)   ((x) << ARM_TTD_DOM_LSB)
#define ARM_TTD_AP_PN_UN   0x000
#define ARM_TTD_AP_PW_UN   0x400
#define ARM_TTD_AP_PW_UR   0x800
#define ARM_TTD_AP_PW_UW   0xC00
#define ARM_TTD_INVALID   0x0
#define ARM_TTD_COARSE_PAGE   0x1
#define ARM_TTD_SECTION   0x12
#define ARM_TTD_FINE_PAGE   0x3
#define ARM_TTD_NC_NB   0x0
#define ARM_TTD_NC_B   0x4
#define ARM_TTD_C_WT   0x8
#define ARM_TTD_C_WB   0xC
#define ARM_SET_CP15_TTBR(val)   __asm__ __volatile__("mcr p15, 0, %0, c2, c0, 0" :: "r"(val) : "cc")
#define ARM_SET_CP15_DACR(val)   __asm__ __volatile__("mcr p15, 0, %0, c3, c0, 0" :: "r"(val) : "cc")

Functions

void __set_stacks (void)
void __init2 (void)
void __clear_bss (void)
void __init3 (void)
void __call_rtos (void)
void __init4 (void)
void NutBoardInit (void)
 Early Ethernut 5 hardware initialization.

Power Management Registers

#define PWRMAN_REG_VERS   0
 Version register.
#define PWRMAN_REG_STA   1
 Feature status register.
#define PWRMAN_REG_ENA   2
 Feature enable register.
#define PWRMAN_REG_DIS   3
 Feature disable register.
#define PWRMAN_REG_TEMP   4
 Board temperature register.
#define PWRMAN_REG_VAUX   6
 Auxiliary input voltage register.
#define PWRMAN_REG_LEDCTL   8
 LED blinking timer register.
#define PWRMAN_BOARD   0x01
 1.8V and 3.3V supply.
#define PWRMAN_VBIN   0x02
 VBUS input at device connector.
#define PWRMAN_VBOUT   0x04
 VBUS output at host connector.
#define PWRMAN_MMC   0x08
 Memory card supply.
#define PWRMAN_RS232   0x10
 RS-232 driver shutdown.
#define PWRMAN_ETHCLK   0x20
 Ethernet clock enable.
#define PWRMAN_ETHRST   0x40
 Ethernet PHY reset.
#define PWRMAN_WAKEUP   0x80
 RTC wake-up.

Define Documentation

#define PMM_RST_BASE   PIOB_BASE

Definition at line 48 of file ethernut5.c.

#define PMM_RST_PIN   8

Definition at line 53 of file ethernut5.c.

#define PWRMAN_REG_VERS   0

Version register.

Definition at line 60 of file ethernut5.c.

#define PWRMAN_REG_STA   1

Feature status register.

Definition at line 62 of file ethernut5.c.

#define PWRMAN_REG_ENA   2

Feature enable register.

Definition at line 64 of file ethernut5.c.

#define PWRMAN_REG_DIS   3

Feature disable register.

Definition at line 66 of file ethernut5.c.

#define PWRMAN_REG_TEMP   4

Board temperature register.

Definition at line 68 of file ethernut5.c.

#define PWRMAN_REG_VAUX   6

Auxiliary input voltage register.

Definition at line 70 of file ethernut5.c.

#define PWRMAN_REG_LEDCTL   8

LED blinking timer register.

Definition at line 72 of file ethernut5.c.

#define PWRMAN_BOARD   0x01

1.8V and 3.3V supply.

Definition at line 78 of file ethernut5.c.

#define PWRMAN_VBIN   0x02

VBUS input at device connector.

Definition at line 80 of file ethernut5.c.

#define PWRMAN_VBOUT   0x04

VBUS output at host connector.

Definition at line 82 of file ethernut5.c.

#define PWRMAN_MMC   0x08

Memory card supply.

Definition at line 84 of file ethernut5.c.

#define PWRMAN_RS232   0x10

RS-232 driver shutdown.

Definition at line 86 of file ethernut5.c.

#define PWRMAN_ETHCLK   0x20

Ethernet clock enable.

Definition at line 88 of file ethernut5.c.

#define PWRMAN_ETHRST   0x40

Ethernet PHY reset.

Definition at line 90 of file ethernut5.c.

#define PWRMAN_WAKEUP   0x80

RTC wake-up.

Definition at line 92 of file ethernut5.c.

#define ARM_TTD_DOM_LSB   5

Definition at line 95 of file ethernut5.c.

#define ARM_TTD_DOM (   x)    ((x) << ARM_TTD_DOM_LSB)

Definition at line 96 of file ethernut5.c.

Referenced by __init4().

#define ARM_TTD_AP_PN_UN   0x000

Definition at line 98 of file ethernut5.c.

#define ARM_TTD_AP_PW_UN   0x400

Definition at line 99 of file ethernut5.c.

Referenced by __init4().

#define ARM_TTD_AP_PW_UR   0x800

Definition at line 100 of file ethernut5.c.

#define ARM_TTD_AP_PW_UW   0xC00

Definition at line 101 of file ethernut5.c.

#define ARM_TTD_INVALID   0x0

Definition at line 103 of file ethernut5.c.

#define ARM_TTD_COARSE_PAGE   0x1

Definition at line 104 of file ethernut5.c.

#define ARM_TTD_SECTION   0x12

Definition at line 105 of file ethernut5.c.

Referenced by __init4().

#define ARM_TTD_FINE_PAGE   0x3

Definition at line 106 of file ethernut5.c.

#define ARM_TTD_NC_NB   0x0

Definition at line 109 of file ethernut5.c.

#define ARM_TTD_NC_B   0x4

Definition at line 111 of file ethernut5.c.

#define ARM_TTD_C_WT   0x8

Definition at line 113 of file ethernut5.c.

Referenced by __init4().

#define ARM_TTD_C_WB   0xC

Definition at line 115 of file ethernut5.c.

Referenced by __init4().

#define ARM_SET_CP15_TTBR (   val)    __asm__ __volatile__("mcr p15, 0, %0, c2, c0, 0" :: "r"(val) : "cc")

Definition at line 117 of file ethernut5.c.

Referenced by __init4().

#define ARM_SET_CP15_DACR (   val)    __asm__ __volatile__("mcr p15, 0, %0, c3, c0, 0" :: "r"(val) : "cc")

Definition at line 118 of file ethernut5.c.

Referenced by __init4().


Function Documentation

void __set_stacks ( void  )

Referenced by __init2().

void __init2 ( void  )

Definition at line 123 of file ethernut5.c.

References __set_stacks(), outr, RSTC_KEY, RSTC_MR, RSTC_URSTEN, WDT_MR, and WDT_WDDIS.

Here is the call graph for this function:

void __clear_bss ( void  )

Referenced by __init3().

void __init3 ( void  )

Definition at line 149 of file ethernut5.c.

References __clear_bss(), ARM_GET_CP15_CR, and ARM_SET_CP15_CR.

Here is the call graph for this function:

void __call_rtos ( void  )

Referenced by __init4().

void __init4 ( void  )

Definition at line 161 of file ethernut5.c.

References __call_rtos(), ARM_GET_CP15_CR, ARM_SET_CP15_CR, ARM_SET_CP15_DACR, ARM_SET_CP15_TTBR, ARM_TTD_AP_PW_UN, ARM_TTD_C_WB, ARM_TTD_C_WT, ARM_TTD_DOM, and ARM_TTD_SECTION.

Here is the call graph for this function:

void NutBoardInit ( void  )

Early Ethernut 5 hardware initialization.

Early AT91SAM7X-EK hardware initialization.

Definition at line 349 of file ethernut5.c.