Add comment warning for new users about changing pins on Ethernet for different devices
Not all STM32H7 devices share the pins of the example. Added a warning and a specific example for STM32H747XIH
This commit is contained in:
parent
56e01d969f
commit
47ebec82b8
1 changed files with 11 additions and 9 deletions
|
@ -64,19 +64,21 @@ async fn main(spawner: Spawner) -> ! {
|
||||||
let mac_addr = [0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF];
|
let mac_addr = [0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF];
|
||||||
|
|
||||||
static PACKETS: StaticCell<PacketQueue<4, 4>> = StaticCell::new();
|
static PACKETS: StaticCell<PacketQueue<4, 4>> = StaticCell::new();
|
||||||
|
// warning: Not all STM32H7 devices have the exact same pins here
|
||||||
|
// for STM32H747XIH, replace p.PB13 for PG12
|
||||||
let device = Ethernet::new(
|
let device = Ethernet::new(
|
||||||
PACKETS.init(PacketQueue::<4, 4>::new()),
|
PACKETS.init(PacketQueue::<4, 4>::new()),
|
||||||
p.ETH,
|
p.ETH,
|
||||||
Irqs,
|
Irqs,
|
||||||
p.PA1,
|
p.PA1, // ref_clk
|
||||||
p.PA2,
|
p.PA2, // mdio
|
||||||
p.PC1,
|
p.PC1, // eth_mdc
|
||||||
p.PA7,
|
p.PA7, // CRS_DV: Carrier Sense
|
||||||
p.PC4,
|
p.PC4, // RX_D0: Received Bit 0
|
||||||
p.PC5,
|
p.PC5, // RX_D1: Received Bit 1
|
||||||
p.PG13,
|
p.PG13,// TX_D0: Transmit Bit 0
|
||||||
p.PB13,
|
p.PB13,// TX_D1: Transmit Bit 1
|
||||||
p.PG11,
|
p.PG11,// TX_EN: Transmit Enable
|
||||||
GenericSMI::new(0),
|
GenericSMI::new(0),
|
||||||
mac_addr,
|
mac_addr,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue