forked from renet/ENC424J600
Update tx_stm32f407, tcp_stm32f407 examples
This commit is contained in:
parent
e1c0b0dd23
commit
66f89e8085
|
@ -86,7 +86,7 @@ fn main() -> ! {
|
||||||
let stim0 = &mut itm.stim[0];
|
let stim0 = &mut itm.stim[0];
|
||||||
|
|
||||||
iprintln!(stim0,
|
iprintln!(stim0,
|
||||||
"Eth TCP Server on STM32-H407 via NIC100/ENC424J600");
|
"Eth TCP Server on STM32-F407 via NIC100/ENC424J600");
|
||||||
|
|
||||||
// NIC100 / ENC424J600 Set-up
|
// NIC100 / ENC424J600 Set-up
|
||||||
let spi1 = dp.SPI1;
|
let spi1 = dp.SPI1;
|
||||||
|
|
|
@ -2,16 +2,14 @@
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
||||||
extern crate panic_itm;
|
extern crate panic_itm;
|
||||||
use cortex_m::{iprint, iprintln};
|
use cortex_m::iprintln;
|
||||||
|
|
||||||
use cortex_m_rt::entry;
|
use cortex_m_rt::entry;
|
||||||
use embedded_hal::watchdog::{WatchdogEnable, Watchdog};
|
|
||||||
use embedded_hal::digital::v2::OutputPin;
|
use embedded_hal::digital::v2::OutputPin;
|
||||||
use embedded_hal::blocking::delay::DelayMs;
|
use embedded_hal::blocking::delay::DelayMs;
|
||||||
use stm32f4xx_hal::{
|
use stm32f4xx_hal::{
|
||||||
rcc::RccExt,
|
rcc::RccExt,
|
||||||
gpio::GpioExt,
|
gpio::GpioExt,
|
||||||
watchdog::IndependentWatchdog,
|
|
||||||
time::U32Ext,
|
time::U32Ext,
|
||||||
stm32::{CorePeripherals, Peripherals},
|
stm32::{CorePeripherals, Peripherals},
|
||||||
delay::Delay,
|
delay::Delay,
|
||||||
|
@ -41,7 +39,7 @@ fn main() -> ! {
|
||||||
let stim0 = &mut itm.stim[0];
|
let stim0 = &mut itm.stim[0];
|
||||||
|
|
||||||
iprintln!(stim0,
|
iprintln!(stim0,
|
||||||
"Eth TX Pinging on STM32-H407 via NIC100/ENC424J600");
|
"Eth TX Pinging on STM32-F407 via NIC100/ENC424J600");
|
||||||
|
|
||||||
// NIC100 / ENC424J600 Set-up
|
// NIC100 / ENC424J600 Set-up
|
||||||
let spi1 = dp.SPI1;
|
let spi1 = dp.SPI1;
|
||||||
|
@ -71,9 +69,6 @@ fn main() -> ! {
|
||||||
panic!("Ethernet initialisation Failed!")
|
panic!("Ethernet initialisation Failed!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delay.delay_ms(1_u32);
|
|
||||||
iprintln!(stim0,
|
|
||||||
"- Delayed 1000us (>=256us), PHY regs are now available");
|
|
||||||
|
|
||||||
// Read MAC
|
// Read MAC
|
||||||
let mut eth_mac_addr: [u8; 6] = [0; 6];
|
let mut eth_mac_addr: [u8; 6] = [0; 6];
|
||||||
|
|
Loading…
Reference in New Issue