STMicroelectronics · NUCLEO-F446RE

NUCLEO-F446RE

ST NUCLEO-F446RE: an STM32F446RE (Cortex-M4F with two bxCAN) on a Nucleo-64 board with an on-board ST-LINK.

EmbassyZephyrSTMicroelectronics
NUCLEO-F446RESTMicroelectronics · STM32F446RE · Cortex-M4F · 180 MHz · 128 KB · bare metalCN7CN10STM32F446RENUCLEO-F446RE1234567891011121can0 CANCAN1 (add a transceiver) · tx PA12, rx PA112uart2 UARTUSART2 (ST-LINK virtual COM) · tx PA2, rx PA33usb USBST-LINK USB4pwr Power5 V USB5v3v3 Power3.3 V (Arduino power header)6v5 Power5 V (Arduino power header)7button GPIOUser button (low when pressed) · io PC138i2c1 I²CI2C1 (Arduino D14, D15) · sda PB9, scl PB89i2c2 I²CI2C2 (Arduino D3, D6) · sda PB3, scl PB1010i2c3 I²CI2C3 (Arduino D5, D7) · sda PB4, scl PA811spi1 SPISPI1 (Arduino D13, D11, D12, A2) · sck PA5,mosi PA7, miso PA6, cs PA412uart1 UARTUSART1 · tx PB6, rx PB71 GPIO pins, each a port (led, …)

In short

STM32F446RE Nucleo-64: one 180 MHz Cortex-M4F, 128 KB SRAM, 512 KB flash, two bxCAN (classic CAN, 8-byte frames). No CAN transceiver on the board: CAN1 is on PA11/PA12 of the morpho connector.

Clock180 MHz
Flash512 KB
RAM128 KB
GPIO50
Logic—

Specs

From the board’s model in the store.

Processor
STM32F446RE · 1× Cortex-M4F · chip "stm32f446re"
Clock
180 MHz
Flash
512 KB
RAM
128 KB
GPIO pins
50
ADC
ADC1 16 ch 12-bit, ADC2 16 ch 12-bit, ADC3 8 ch 12-bit
Logic level
not in the board’s model yet
Power
5 V USB (in); 3.3 V (Arduino power header): 3.3 V; 5 V (Arduino power header): 5 V
Current per pin
not in the board’s model yet
Buses
UART ×6, I²C ×3, SPI ×3, CAN ×2, USB ×1
Runs
bare metal (no OS)

Pin map

Each pin by what it does. Hover or tap a pin to see what else it can be.

  • Power 3
  • Digital 17
  • Analog 10
  • Bus 20
  • Control 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
  • PB12PB12
  • PB13PB13
  • PB14PB14
  • PB15PB15
  • PC0PC0
  • PC1PC1
  • PC2PC2
  • PC3PC3
  • PC4PC4
  • PC5PC5
  • PC6PC6
  • PC7PC7
  • PC8PC8
  • PC9PC9
  • PC10PC10
  • PC11PC11
  • PC12PC12
  • PC13PC13
  • PC14PC14
  • PC15PC15
  • PD2PD2
  • PH0PH0
  • PH1PH1
  • pwr5 V USB
  • v3v33.3 V (Arduino power header)
  • v55 V (Arduino power header)

Watch out

What archec checks for this board, from its data. Each one names the check that catches it.

  • Two of the board’s connectors share these pins: PA5 (User LD2, green / SPI1 (Arduino D13, D11, D12, A2)). Use one or the other.

    check pin-conflict

  • The board already uses PA5 (User LD2, green), PC13 (User button (low when pressed)). Something else wired there fights with it.

    check pin-conflict

  • It gives 3.3 V (3.3 V (Arduino power header)), 5 V (5 V (Arduino power header)). Power each part from a rail at its own voltage.

    check board-supply

  • It has 6 UART, 3 I²C, 3 SPI, 2 CAN. One more bus of a kind than that is an error.

    check board-peripheral

  • Each bus goes on the pins that can carry it (see the pin map). Another pin is an error.

    check pin-function

First model

A blink for this board: the board, an LED and a part that turns it over every 500 ms. archec checks it, then writes the code on the right.

main.archeOpen in the playground
project Blink "Blink" {
  version "0.1.0"
  edition "1.0"
  uses arche-hw-store "^0.1"
}

include "arche-hw-store/boards/nucleo-f446re/nucleo-f446re.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:   NucleoF446RE
  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 }
  }
}
archec gen --target embassyblink/src/app/blinker.rs
//! 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, one of the 14 files archec writes.

Open in the playground

Parts on the board

What each numbered part is. Click a number to find it on the board.

1 2 3 4 5 6 7 8 9 10 11 12

Find the part

The quiz names a part: click it on the board. A first try scores a point.

Compare every board