infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 4 of 4

Thread: Ping failure with RTOS in XMC4500 when power up

  1. #1
    New Member New Member legend1996 is on a distinguished road
    Join Date
    Aug 2018
    Posts
    3
    Points
    40

    Ping failure with RTOS in XMC4500 when power up

    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 CPUClick image for larger version

Name:	LWIP_Set3.png
Views:	1
Size:	18.3 KB
ID:	3566Click image for larger version

Name:	LWIP_Set1.png
Views:	0
Size:	27.6 KB
ID:	3567Click image for larger version

Name:	LWIP_Set2.png
Views:	0
Size:	20.0 KB
ID:	3568Click image for larger version

Name:	LWIP_Set4.png
Views:	0
Size:	20.6 KB
ID:	3569Click image for larger version

Name:	LWIP_Set3.png
Views:	1
Size:	18.3 KB
ID:	3566Click image for larger version

Name:	LWIP_Set1.png
Views:	0
Size:	27.6 KB
ID:	3567Click image for larger version

Name:	LWIP_Set2.png
Views:	0
Size:	20.0 KB
ID:	3568Click image for larger version

Name:	LWIP_Set4.png
Views:	0
Size:	20.6 KB
ID:	3569
    Software configuration: Showing in the picture
    Related project attached.
    ?????

  2. #2
    New Member New Member legend1996 is on a distinguished road
    Join Date
    Aug 2018
    Posts
    3
    Points
    40
    Quote Originally Posted by legend1996 View Post
    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 CPUAttachment 3566Attachment 3567Attachment 3568Attachment 3569Attachment 3566Attachment 3567Attachment 3568Attachment 3569
    Software configuration: Showing in the picture
    Related project attached.
    The Problem still stand in my way ,any one who have a suggestion?

  3. #3

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    392
    Hi,

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

    Code:
    /* 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

    Code:
    /* 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
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  4. #4
    New Member New Member legend1996 is on a distinguished road
    Join Date
    Aug 2018
    Posts
    3
    Points
    40
    Quote Originally Posted by jferreira View Post
    Hi,

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

    Code:
    /* 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

    Code:
    /* 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

+ Reply to Thread

Tags for this Thread

Disclaimer

All content and materials on this site are provided as is. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.