Hi.
I'm using S32G2 reference board 2.
And I tested Ethernet Loopback example and it works well.
I want to use ethernet not loopback mode,
is there any configuration document to follow?
Cause there are too many configuration tab.
Thanks in advance.
Hi,
I figured out why its not working by enabling the pins.
You need to manually set the GMAC control registers before calling GMAC_Ip_Init. It is describen in the GMAC user manual.
IP_SRC->GMAC_0_CTRL_STS = (IP_SRC->GMAC_0_CTRL_STS & ~(SRC_GMAC_0_CTRL_STS_PHY_MODE_MASK | SRC_GMAC_0_CTRL_STS_PHY_INTF_SEL_MASK)) | (SRC_GMAC_0_CTRL_STS_PHY_MODE(0U) | SRC_GMAC_0_CTRL_STS_PHY_INTF_SEL(GMAC_RGMII_MODE));
Gmac_Ip_Init(INST_GMAC_0, &Gmac_aCtrlConfigPB_VS_0[0]);
Gmac_Ip_EnableController(INST_GMAC_0);
Hope this helps
RTD provides a compact example code to help you to familiarize yourself with
the controller. Full-feature Ethernet support is available under the OS. See
the documents at the links below for details:
https://www.nxp.com/webapp/Download?colCode=VNPRDBEEUG
https://www.nxp.com/webapp/Download?colCode=PFE-Ethernet-LWIP-FreeRTOS_S32G-demo
Best Regards,
Platon
hi, when I use the demo , it contains some errors.
Devassert.h: No such file or directory
how to solve this problem?
well, I want to use Eth_43_GMAC on M7 core
And I use Rx interrupt to receive Eth message, and it works.
But I tried to send message, but it didn't work..
Could you give me an example code to send Ethernet message?
Any simple Tx example on M7 core would do, thanks..
Any update...?
If the loopback demo works for you as you mentioned above, then you do have a
working example of the transmission procedure. Note that the loopback and
non-loopback transmission sequences differ only in the PHY initialization.
There are no examples for Ethernet in addition to what have already been
mentioned in this thread.
Best Regards,
Platon
Hi, nxp support team.
Is there any update on this?
Could you show me the result that tx message is working on M7 core?
You can only check that the Tx buffer has been handled. This is done by Eth_TxConfirmation(). See the driver User Manual for details. There is no feedback on transmit from the PHY to the upper layer by the definition in IEEE 802.3 Clause 22. The only reliable way to ensure that a frame has been transmitted by the PHY on the wire is to capture it.
Could you tell me what did I miss?
This requires debugging which is beyond my scope, sorry. If you want this kind of services, consider our paid support options:
Alternatively, compare your initialization steps with the reference code mentioned earlier in this thread.
Best Regards,
Platon
Could you show me the result that tx message is working on M7 core?
I attached the project file.
It is based on Eth_InternalLoopback_S32G274A_M7 example( RTD AUTOSAR 4.4 D2105)
Here is what I changed:
1) Pin : enable GMAC pins based on RGMII
2. Clock : change clocks
3. Eth_43_GMAC configuration : uncheck 'MAC_CONFIG_LOOPBACK'
4. Code
4.1) change 'destination MAC address'(00-0E-C6-8E-6F-C5)
4.2) Transmit loop
Could you tell me what did I miss?
Hi skseofhm,
I run into the same problem like you. Have found already a solution for this problem. I´m still looking for a hint to enable Ethernet transmission without loopback...
Best regards
Sebastian