Loading...
Searching...
No Matches
periph_conf.h File Reference

Peripheral configuration for the Gaisler NOEL-V ZedBoard. More...

Detailed Description

Peripheral configuration for the Gaisler NOEL-V ZedBoard.

Peripheral addresses are taken from: grmon4> info sys

Author
Matvii Ivashchenko

Definition in file periph_conf.h.

#include "kernel_defines.h"
#include "periph_cpu.h"
+ Include dependency graph for periph_conf.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Clock configuration

Must match the frequency of the FPGA bitstream (GRMON info sys reports the actual AHB frequency).

The ACLINT mtime counter runs at half of it.

#define CLOCK_CORECLOCK   (40000000UL)
 CPU core clock, 40 MHz.
 

Timer configuration

One timer via RISC-V ACLINT (CLINT).

CLINT base address is defined in cpu_conf.h (0xe0000000).

#define TIMER_NUMOF   (1)
 

GPIO configuration

grmon: gpio0 APB: ff983000 - ff983100

#define GPIO0_BASE_ADDR   (0xff983000UL)
 GRGPIO base address.
 

UART configuration

grmon: uart0 APB: ff900000 - ff900100 IRQ: 1

SW3 = 0: UART0 routed to RIOT application SW3 = 1: UART0 routed to debug (GRMON)

#define UART0_BASE_ADDR   (0xff900000UL)
 APBUART0 base address.
 
#define UART0_IRQ   (1U)
 APBUART0 PLIC interrupt line.
 
#define UART_NUMOF   ARRAY_SIZE(uart_config)
 
static const uart_conf_t uart_config []
 

GRETH Ethernet configuration

grmon: greth0 APB: ff984000 - ff984100 IRQ: 5

#define GRETH_PARAM_BASE   (0xff984000UL)
 GRETH base address.
 
#define GRETH_PARAM_IRQ   (5U)
 GRETH interrupt line.
 

Macro Definition Documentation

◆ CLOCK_CORECLOCK

#define CLOCK_CORECLOCK   (40000000UL)

CPU core clock, 40 MHz.

Definition at line 30 of file periph_conf.h.

◆ GPIO0_BASE_ADDR

#define GPIO0_BASE_ADDR   (0xff983000UL)

GRGPIO base address.

Definition at line 53 of file periph_conf.h.

◆ GRETH_PARAM_BASE

#define GRETH_PARAM_BASE   (0xff984000UL)

GRETH base address.

Definition at line 84 of file periph_conf.h.

◆ GRETH_PARAM_IRQ

#define GRETH_PARAM_IRQ   (5U)

GRETH interrupt line.

Definition at line 85 of file periph_conf.h.

◆ TIMER_NUMOF

#define TIMER_NUMOF   (1)

Definition at line 44 of file periph_conf.h.

◆ UART0_BASE_ADDR

#define UART0_BASE_ADDR   (0xff900000UL)

APBUART0 base address.

Definition at line 65 of file periph_conf.h.

◆ UART0_IRQ

#define UART0_IRQ   (1U)

APBUART0 PLIC interrupt line.

Definition at line 66 of file periph_conf.h.

◆ UART_NUMOF

#define UART_NUMOF   ARRAY_SIZE(uart_config)

Definition at line 75 of file periph_conf.h.

Variable Documentation

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.addr = UART0_BASE_ADDR,
.irq = UART0_IRQ,
},
}
#define UART0_IRQ
APBUART0 PLIC interrupt line.
Definition periph_conf.h:66
#define UART0_BASE_ADDR
APBUART0 base address.
Definition periph_conf.h:65

Definition at line 68 of file periph_conf.h.