Re: Broadcast Ethernet from F405 and DP83848
Posted: Sat Mar 04, 2023 4:35 am
that's exactly what I did - just changed the makefile to use the REV_D config, and the sample app worked great!
Also got udp broadcast messages working.
I noticed it takes a few seconds after calling lwipinit() until the driver is truly ready. If my app does not wait, the sendto() never succeeds.
Since open-loop sleeps are risky, I wrote a little wrapper around netif_is_link_up(), in lwipthread.c:
in my app I then call:
Is there already a way of checking if the driver is ready?
Also got udp broadcast messages working.
I noticed it takes a few seconds after calling lwipinit() until the driver is truly ready. If my app does not wait, the sendto() never succeeds.
Since open-loop sleeps are risky, I wrote a little wrapper around netif_is_link_up(), in lwipthread.c:
Code: Select all
bool lwipReady() {
return netif_is_link_up(&thisif);
}in my app I then call:
Code: Select all
lwipInit(nullptr);
while (!lwipReady()) {
chThdSleepMilliseconds(50);
}Is there already a way of checking if the driver is ready?