Ping failure with RTOS in XMC4500 when power up

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
User15614
Level 1
Level 1
Description:Recently,i have use Infineon's XMC4500 MCU to achieve Ethernet communication between thinkpad and self-designed board. Well, everything runs smoothly until my board suddenly power off (110V, 4A) .
Confused but cuorious, i tried many way to failgure it out but in vain, like set the highest priority and change thread number and stack size etc.
It just don't work, i can't ping through netwire when my board power up again !!!
Firstly, if i power up from the new download code, which can ping through netwire, the Ethernet can't ping through unless i give a Reset signal Physically.
Secondelly, when i used Ethernet without RTOS enabled, it just work well,and the connection is rebuild when i suddenly power off and then power up.
However, if i enabled RTOS, things goes wrong, i have encounter a bug during this process!!!
Apparently, Reset processes is included in power up processes (all reset the core domain), and for power up processes there is PAD domain and Debug&Trace System Reset.
It seems that the Ethernet part failed to connect with my board never until i pull down the reset button or give a reset singnal.
How can i initialize my program with a software RESET? And will it work?

I really don't know what is wrong during these processes, for me ,the core code is hard to analysis and i'm lack of tool to find out the problems.
Hopefully, there is any one who can help me to figure out what's going on there.

Environment:WIN10 ,DAVE4.3.2 ,XMC4500 CPU3218.attach3219.attach3220.attach3221.attach3218.attach3219.attach3220.attach3221.attach
Software configuration: Showing in the picture
Related project attached.
0 Likes
4 Replies
User15614
Level 1
Level 1
legend1996 wrote:
Description:Recently,i have use Infineon's XMC4500 MCU to achieve Ethernet communication between thinkpad and self-designed board. Well, everything runs smoothly until my board suddenly power off (110V, 4A) .
Confused but cuorious, i tried many way to failgure it out but in vain, like set the highest priority and change thread number and stack size etc.
It just don't work, i can't ping through netwire when my board power up again !!!
Firstly, if i power up from the new download code, which can ping through netwire, the Ethernet can't ping through unless i give a Reset signal Physically.
Secondelly, when i used Ethernet without RTOS enabled, it just work well,and the connection is rebuild when i suddenly power off and then power up.
However, if i enabled RTOS, things goes wrong, i have encounter a bug during this process!!!
Apparently, Reset processes is included in power up processes (all reset the core domain), and for power up processes there is PAD domain and Debug&Trace System Reset.
It seems that the Ethernet part failed to connect with my board never until i pull down the reset button or give a reset singnal.
How can i initialize my program with a software RESET? And will it work?

I really don't know what is wrong during these processes, for me ,the core code is hard to analysis and i'm lack of tool to find out the problems.
Hopefully, there is any one who can help me to figure out what's going on there.

Environment:WIN10 ,DAVE4.3.2 ,XMC4500 CPU3218.attach3219.attach3220.attach3221.attach3218.attach3219.attach3220.attach3221.attach
Software configuration: Showing in the picture
Related project attached.

The Problem still stand in my way ,any one who have a suggestion?
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

In file Libraries/XMCLib/src/xmc_eth_phy_dp83848.c, in function XMC_ETH_PHY_Init() replace

/* PHY initialize */
int32_t XMC_ETH_PHY_Init(XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr, const XMC_ETH_PHY_CONFIG_t *const config)
{
int32_t status;
uint16_t reg_val;

status = XMC_ETH_PHY_IsDeviceIdValid(eth_mac, phy_addr);
...

by

/* PHY initialize */
int32_t XMC_ETH_PHY_Init(XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr, const XMC_ETH_PHY_CONFIG_t *const config)
{
uint32_t retries = 0xffffffffUL;
int32_t status;
uint16_t reg_val;

while (((status = XMC_ETH_PHY_IsDeviceIdValid(eth_mac, phy_addr)) != XMC_ETH_PHY_STATUS_OK) && --retries);
...

Regards,
Jesus
0 Likes
User15614
Level 1
Level 1
jferreira wrote:
Hi,

In file Libraries/XMCLib/src/xmc_eth_phy_dp83848.c, in function XMC_ETH_PHY_Init() replace

/* PHY initialize */
int32_t XMC_ETH_PHY_Init(XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr, const XMC_ETH_PHY_CONFIG_t *const config)
{
int32_t status;
uint16_t reg_val;

status = XMC_ETH_PHY_IsDeviceIdValid(eth_mac, phy_addr);
...

by

/* PHY initialize */
int32_t XMC_ETH_PHY_Init(XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr, const XMC_ETH_PHY_CONFIG_t *const config)
{
uint32_t retries = 0xffffffffUL;
int32_t status;
uint16_t reg_val;

while (((status = XMC_ETH_PHY_IsDeviceIdValid(eth_mac, phy_addr)) != XMC_ETH_PHY_STATUS_OK) && --retries);
...

Regards,
Jesus


wow, it works very well!!! thank you very much, but would you like to tell me the reason or simply explain for me ?
because for a designer, it's happy to solve a bug, but it's confused that why would this happen and what should do next?
Thanks again,write soon.
Best regards,
DB.king
0 Likes
User15614
Level 1
Level 1
But it's confused that why would this happen and what should do next?
Thanks again,write soon.
Best regards,
DB.king
0 Likes