2017-06-09 11:41 AM
[reposting after 30 days of no responses]
Hello all,
I have been making great progress using CubeMX and HAL for lots of things, now I want to try ethernet. My application is very simple, I only want to send and receive raw ethernet frames -- no UDP or TCP at all. I also prefer not to use LWiP for something so basic. Can anyone point me to an example of raw ethernet frame IO using just HAL? I will be using Nucleo F429ZI.
My requirements:
[ ] send a raw frame (source and destination MAC address, type IP and payload, total less than 1500 bytes)
[ ] receive interrupt upon receipt of a raw ethernet frame
My transactions are slow and simple, I do not even need any buffer queuing.
Thanks for any tips.
#raw-ethernet-frame2018-05-18 01:45 AM
Hi,
Please help me !!! I am new to Ethernet.
I have a costume board with STM32F765 controller and the PHY is KSZ8041TL(Microchip) with RMII mode.
Am generating the low level init code with the help of Cubemx. So for testing the hardware and for making the basic Ethernet communication working - I have two boards with me and i am writing raw data (with out using LwIP) from one board and receiving it other board - that's my plan.
In the cubemx Ethernet configuration i have selected 'user PHY' and by hardware we made the PHY address as 1. We use 50Mhz external clock as well for RMII mode. RX mode is 'Polling mode'.
My code stuck in ' MX_ETH_Init () - > HAL_ETH_Init () 'function.
code section below for your reference.
/* Wait until the auto-negotiation will be completed */
do { HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg); /* Check for the Timeout */ if((HAL_GetTick() - tickstart ) > ETH_TIMEOUT_AUTONEGO_COMPLETED) { /* In case of write timeout */ err = ETH_ERROR; /* Config MAC and DMA */ ETH_MACDMAConfig(heth, err); heth->State= HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); return HAL_TIMEOUT; } } while (((phyreg & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE));If am dong something wrong or i am missing to set something? Please help me .
Thanks and Best Regards,
Vineeth
2018-12-31 11:13 PM
Can you give me project just send and receive data withow lwip? thanks
2018-12-31 11:13 PM
Can you give me project just send and receive data withow lwip? thanks
2019-01-01 12:12 AM
If you paid me enough I would make one.
2019-01-31 02:33 AM
If you got any solution please send it ashwin.raj@manipalgroup.info
Regards
Ashwinraj
2019-07-18 06:33 AM
Is there an example of sending raw ethernet frames without lwip ?
2019-07-18 06:34 AM
Is there an example of sending raw ethernet frames without Lwip ?
2019-07-18 03:49 PM
The solution is in a first answer: "Tear what you need out of ethernetif.c"
> Never could get HAL_ETH_TxCpltCallback to fire.
2019-09-26 12:13 AM
Hi,
Can someone share the loopback example using HAL APIs (without LWIP) ?
Thank you
2019-09-26 04:11 AM