Raspberry Pi · SC1112
Raspberry Pi 5
Raspberry Pi 5: a BCM2712 (four Cortex-A76 cores) running Linux, with a PCIe lane.
En bref
Single-board computer: four 2.4 GHz Cortex-A76 cores (BCM2712), 2 to 16 GB of RAM (8 GB here: override `ram`), Gigabit Ethernet, Wi-Fi, PCIe 2.0 x1, two MIPI camera/display connectors. CAN through an MCP2515 HAT (SocketCAN, can0). The pins are those of Gobot's Raspberry Pi adaptor; it was written before the Pi 5, whose GPIO comes from its RP1 chip: not yet tried on one.
Caractéristiques
Lues dans le modèle de la carte, dans le store.
- Processeur
- BCM2712 · 4× Cortex-A76
- Horloge
- 2.4 GHz
- RAM
- 8 GB
- Broches GPIO
- 28
- Niveau logique
- 3.3 V
- Alimentation
- 5 V USB-C (in); 3.3 V (pins 1, 17): 3.3 V; 5 V (pins 2, 4): 5 V
- Courant par broche
- pas encore dans le modèle de la carte
- Bus
- UART ×1, I²C ×2, SPI ×2
- Tourne
- sous Linux
Brochage
Chaque broche selon ce qu’elle fait. Survolez ou touchez une broche pour voir ce qu’elle peut être d’autre.
- Alimentation 3
- Numérique 13
- Bus 15
- pin3pin 3
- pin5pin 5
- pin7pin 7
- pin8pin 8
- pin10pin 10
- pin11pin 11
- pin12pin 12
- pin13pin 13
- pin15pin 15
- pin16pin 16
- pin18pin 18
- pin19pin 19
- pin21pin 21
- pin22pin 22
- pin23pin 23
- pin24pin 24
- pin26pin 26
- pin29pin 29
- pin31pin 31
- pin32pin 32
- pin33pin 33
- pin35pin 35
- pin36pin 36
- pin37pin 37
- pin38pin 38
- pin40pin 40
- pin27pin27
- pin28pin28
- pwr5 V USB-C
- v3v33.3 V (pins 1, 17)
- v55 V (pins 2, 4)
Attention
Ce qu’archec vérifie pour cette carte, d’après ses données. Chaque point nomme la vérification qui l’attrape.
Ses broches travaillent en 3.3 V. La sortie d’un capteur 5 V sur l’une d’elles demande un adaptateur de niveau entre les deux.
vérification
pin-levelElle donne 3.3 V (3.3 V (pins 1, 17)), 5 V (5 V (pins 2, 4)). Alimentez chaque pièce depuis une sortie à sa propre tension.
vérification
board-supplyElle a 1 UART, 2 I²C, 2 SPI. Un bus de plus d’un même type est une erreur.
vérification
board-peripheral
Premier modèle
Un clignotement pour cette carte : la carte, une LED et une partie qui l’inverse toutes les 500 ms. archec le vérifie, puis écrit le code à droite.
project Blink "Blink" {
version "0.1.0"
edition "1.0"
uses arche-hw-store "^0.1"
}
include "arche-hw-store/boards/raspberry-pi-5/raspberry-pi-5.arche"
include "arche-hw-store/devices/led/led.arche"
/// Turns the LED over at each step.
component Blinker "Blinker" {
out led: requires Led
fn blink "Blink" {
```arche
led.toggle()
```
wcet 50us
}
}
/// The board, an LED on pin 3, and the blinker.
system Hw "Blink" {
part board: RaspberryPi5
part led: GpioLed
part blinker: Blinker
board.pin3 -> led.pin
blinker.led -> led.led
}
/// The firmware: the blinker every 500 ms.
deployment OnBoard "On the board" {
system Hw
platform Hw
binary blink on board {
language go
thread main "Blink" { runs blinker; period 500ms; step blink }
}
}
// Code generated by archec gen --target go: the parts the binary runs. DO NOT EDIT: run it again.
package main
import "math"
var _ = math.Abs
// @arche Blinker main.arche:11 component
// Blinker: Blinker
type Blinker struct {
archePart
Inbox chan Envelope
Out func(port string, m any)
// Call: port.op(…) in the model — the operation of the part the port's link reaches (main.go sets it)
Call func(port, op string, args ...any) any
}
// @arche Blinker.init main.arche:11 init
func NewBlinker() *Blinker {
self := &Blinker{Inbox: make(chan Envelope, 16), Out: func(string, any) {}, Call: func(string, string, ...any) any { return nil }}
// USER CODE BEGIN Blinker.init
// USER CODE END Blinker.init
return self
}
// Send: a message on one of the part's ports.
func (self *Blinker) Send(port string, m any) { self.Out(port, m) }
// @arche Blinker.blink main.arche:13 fn
// Blink: Blink
func (self *Blinker) Blink() {
self.Call("led", "toggle")
}
// @arche Blinker.receive main.arche:11 receive
// Receive: a message that arrived on one of the part's ports.
func (self *Blinker) Receive(port string, m any) {
_, _ = port, m
}blink/parts.go, l’un des 155 fichiers qu’archec écrit.