STMicroelectronics · NUCLEO-G474RE
NUCLEO-G474RE
ST NUCLEO-G474RE: an STM32G474RE (Cortex-M4F with FDCAN) on a Nucleo-64 board with an on-board ST-LINK (debugger and virtual COM port).
En bref
STM32G474RE Nucleo-64: one 170 MHz Cortex-M4F, 128 KB SRAM, 512 KB flash, three FDCAN (CAN FD) controllers. No CAN transceiver on the board: FDCAN1 is on PA11/PA12 of the morpho connector.
Caractéristiques
Lues dans le modèle de la carte, dans le store.
- Processeur
- STM32G474RE · 1× Cortex-M4F · chip "stm32g474re"
- Horloge
- 170 MHz
- Flash
- 512 KB
- RAM
- 128 KB
- Broches GPIO
- 52
- CAN (ADC)
- ADC1 14 ch 12-bit, ADC2 16 ch 12-bit, ADC3 3 ch 12-bit, ADC4 3 ch 12-bit, ADC5 2 ch 12-bit
- Niveau logique
- pas encore dans le modèle de la carte
- Alimentation
- 5 V USB (in); 3.3 V (Arduino power header): 3.3 V; 5 V (Arduino power header): 5 V
- Courant par broche
- pas encore dans le modèle de la carte
- Bus
- UART ×6, I²C ×4, SPI ×3, CAN ×3, USB ×1
- Tourne
- sans OS (bare metal)
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 9
- Analogique 12
- Bus 28
- Contrôle 3
- PA0PA0
- PA1PA1
- PA2PA2
- PA3PA3
- PA4PA4
- PA5PA5
- PA6PA6
- PA7PA7
- PA8PA8
- PA9PA9
- PA10PA10
- PA11PA11
- PA12PA12
- PA13PA13
- PA14PA14
- PA15PA15
- PB0PB0
- PB1PB1
- PB2PB2
- PB3PB3
- PB4PB4
- PB5PB5
- PB6PB6
- PB7PB7
- PB8PB8
- PB9PB9
- PB10PB10
- PB11PB11
- PB12PB12
- PB13PB13
- PB14PB14
- PB15PB15
- PC0PC0
- PC1PC1
- PC2PC2
- PC3PC3
- PC4PC4
- PC5PC5
- PC6PC6
- PC7PC7
- PC8PC8
- PC9PC9
- PC10PC10
- PC11PC11
- PC12PC12
- PC13PC13
- PC14PC14
- PC15PC15
- PD2PD2
- PF0PF0
- PF1PF1
- PG10PG10
- pwr5 V USB
- v3v33.3 V (Arduino power header)
- v55 V (Arduino power header)
Attention
Ce qu’archec vérifie pour cette carte, d’après ses données. Chaque point nomme la vérification qui l’attrape.
Deux connecteurs de la carte partagent ces broches : PA5 (User LD2, green / SPI1 (Arduino D13, D11, D12, D10)). Utilisez l’un ou l’autre.
vérification
pin-conflictLa carte utilise déjà PA5 (User LD2, green), PC13 (User button (low when pressed)). Autre chose branché là entre en conflit.
vérification
pin-conflictElle donne 3.3 V (3.3 V (Arduino power header)), 5 V (5 V (Arduino power header)). Alimentez chaque pièce depuis une sortie à sa propre tension.
vérification
board-supplyElle a 6 UART, 4 I²C, 3 SPI, 3 CAN. Un bus de plus d’un même type est une erreur.
vérification
board-peripheralChaque bus va sur les broches qui peuvent le porter (voir le brochage). Une autre broche est une erreur.
vérification
pin-function
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/nucleo-g474re/nucleo-g474re.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 the board's User LD2, green (PA5), and the blinker.
system Hw "Blink" {
part board: NucleoG474RE
part led: GpioLed { in pin { pins { pin PA5 } } }
part blinker: Blinker
blinker.led -> led.led
}
/// The firmware: the blinker every 500 ms.
deployment OnBoard "On the board" {
system Hw
platform Hw
binary blink on board {
thread main "Blink" { runs blinker; period 500ms; step blink }
}
}
//! Your code: the state and behaviour of this part. Write it between the USER CODE markers:
//! when the model changes, `archec gen` writes this file again around them (a new function, a
//! new input) and keeps them. Edit outside them and the file is yours: it is left as it is,
//! and the compiler says what to add (a new trait method).
#[allow(unused_imports)]
use crate::arche::*;
// @arche blinker main.arche:25 part
/// blinker
#[derive(Default)]
pub struct Blinker {}
impl BlinkerBehaviour for Blinker {
// @arche blinker.blink main.arche:13 fn
async fn blink(&mut self, _out: &BlinkerOut) {
// Blink: from the model (```arche)
_out.call_led_toggle().await;
}
}blink/src/app/blinker.rs, l’un des 14 fichiers qu’archec écrit.