DP83640: FreeRTOS plus UDP project help - RM46L852

Part Number: DP83640
Other Parts Discussed in Thread: HALCOGEN, RM46L852,

Tool/software:

Hello experts,

I am trying to get ethernet communications to work on a custom development board using RMII with a RM46L852 mcu, using FreeRTOS plus UDP stack. I am performing the hardware initialization using driver code generated by HALCoGen. The initializations I am doing in the exact order are:

1. Enabling interrupts
2. Initializing SCI and GIO
3. Initializing MDIO with the CPU clock frequency as the input frequency and 2.5MHz as the output frequency
4. Performing the DP83640 PHY Link setup using EMACLinkSetup using EMAC_0_BASE, EMAC_PHYBASE and MDIO_0_BASE.
5. Performing a PHY reset using pin #29 (asserting and then deasserting a reset) on the DP83640 module.
6. EMACInit using EMAC_0_CTRL_BASE and EMAC_0_BASE.

Here, EMAC_0_CTRL_BASE, EMAC_0_BASE etc. are all constants generated by HALCoGen.I am also attaching my EMAC config in HALCoGen if that might help, along with the PINMUX:

After this I initialize the TCP plus UDP stack using the FreeRTOS_IPInit() function, and start my Ethernet Task.

I want to confirm the validity of the initialization steps, or if I am missing some config, because this does not work. When I tried using the scheduler, the memory allocation for socket fails and the only way I am able to start the ethernet Task is by manually calling it as a function, which makes me think the hardware config could be the problem.

Is it possible the DP83640 is not getting setup correctly? Can any other information from my side help isolate the issue?

Please, is there an example project for testing network connectivity using the MDIO and RMII using DP83640, with the RM46L852 MCU?

Thank you!

- Karan