S7G2 NetX PHY address

Hello,

I am working with SSP 120b on a custom board with a S7G2 (same reference on the SK-S7G2) with a different PHY.

I try to make the Nx_Duo_Http_Server Demo working. It runs well on the SK-S7G2 but on my custom board I see netwotks LED working but I have no ping answer (first packet return host unreachable and three next packet are timed out.

My PHY is a Texas Instrument DP83848 used in RMII mode on synergy ethernet channel 1. The main difference I spotted is the PHY adress we had to set it to 0x03 and the starter kit is set to 0x00. I wonder if this could be the issue. I read chapter 29 of the S7G2 datasheet and NetX user guide but I can't find how to set this PHYAD (register or function ...)

any idea to solve this issue or to set PHYAD ?

 

Regards

  • Hello TLHQ,

    To use Synergy with phy different than provided on our kits (which is a Micrel phy), you should modify or create your own phy driver. You will find these files in synergy/ssp/src/framework/sf_el_nx/phy. I recommend saving them after making modifications and setting to read only. You'll most likely have to modify initialization sequence or read/write functions to apply different phy address.

    Regards
  • In reply to Renesas Karol:

    Thanks Karol, this helps a lot, I will try to edit the driver.
  • In reply to TLHQ:

    Hello Karol,
    Thanks to your advice I have something working, I can ping and display a simple html page throught a LAN with fixed IP and customize network LEDs configuration.
    I still have an issue. I can't send pictures in the html demo page. When there is no picture it works fine but when I try to send the demo pictures : ping is timed out and web browser load during a very long time and finally display the default broken picture.
    Any idea ? Maybe something wrong in nx_http_server_callback_data_send function ?

  • In reply to TLHQ:

    Hello TLHQ,

    Try setting packet size in your packet pool to 1568. A small bug sneaked into 1.2.0 release where driver will fail to chain packets if data is too big to fit into a single packet. 1568 bytes per packet should be sufficient to handle maximum MTU of 1500* (EDIT: typo).

    Regards

  • In reply to Renesas Karol:

    Hello Karol,

    I think packet pool is already 1568

       In demo_nx_http_application.c

    static ULONG packet_pool_area[((1536 + 32 + sizeof(NX_PACKET)) * 50) / sizeof(ULONG)];

    /* Create a packet pool.  */
        status =  nx_packet_pool_create(&pool_0, (CHAR*)"NetX Main Packet Pool", (1536 + 32), packet_pool_area, sizeof(packet_pool_area));

    Regards,

  • In reply to TLHQ:

    Hello TLHQ,

    You'll need to set 1568 in the configurator.

    Regards
  • In reply to Renesas Karol:

    Hum I don't know where do you set it ?

    In the demo configuration.xml > threads > NetX on nx > ETHER on sf_el_nx > property

    I have no packet size option

  • In reply to TLHQ:

    Under NetX there is packet pool instance framework. In case creating you own packet pool then have to make sure its 1568 bytes as per above mentioned.
  • In reply to TLHQ:

    Hello TLHQ,

    If you're using deprecated stacks, then the packet size you've shown is set correctly. I recommend building a simple application using non-deprecated modules and testing ping with various sizes.

    Regards
  • In reply to Renesas Karol:

    I use the demo from "For_SSP_Distribution_1.2.0-b.1_Application_Projects_Pack_3" => "Package-NetX Webserver with Duo support with SSP 1.2-b1"
    It runs well on SK-S7G2 but my custom board has this issue with pictures in html.
  • In reply to TLHQ:

    The error comes from nx_packet_data_append function. With no timeout it is stuck in an infinite loop, if I set a timeout it exits but with a strange error code I think not reliable (code 536739956(d) / 1FFE0074(h)).

    nx_packet_data_append works fine to send html strings (htmlwrite) but can't send picture resource nxlogo.

    I am investigating ...

    To send the picture before calling nx_packet_data_append, it allocates a new TCP packet with nx_packet_allocate (no error here)

  • In reply to TLHQ:

    Hello TLHQ,

    I think problem arises when allocating a chained packet. Can you check what's the maximum ping size your board can respond to?

    Regards
  • In reply to Renesas Karol:

    I don't know where to find this information.
    Since I added a timeout in nx_packet_data_append ping is ok (it is ok before transfering the picture, it is timed out one or two times during the picture transfer and it is alive again after)
    I tried to edit nxd_http_server.h > NX_HTTP_TYPE_OF_SERVICE by putting NX_IP_MAX_DATA and no NX_IP_NORMAL (and checking read-only option) but there is not effect.
  • In reply to TLHQ:

    Hello TLHQ,

    Changes to any of the NetX header files from the "synergy" folder will only take effect when NetX Source is added to the project.

    This setting in included in the new configuration stacks for NetX, so I highly recommend you use non-deprecated NetX Duo stack to implement HTTP server.
     
    Regards

  • In reply to Renesas Karol:

    Oh ok, I can't compile with NetX Source "ERROR NX_IP_HEADER undeclared (first use in this function) | nx_arp_dynamic_entry_set.c line 325"
    Well, I think the issue is different because the demo code works well without change on SK-S7G2. This is something specific happening on my custom board but I don't get what it could be. PHY is different but it seems well configured to me now and it works with configuration, html strings and ping.
    Why would nx_packet_data_append crash with that strange status code return behaviour ?