This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6421: PROFINET on AM6421 Custom Board - AR Connect indication received, application hangs after PN_APP_IOD_cbArConnectInd

Part Number: AM6421

Hi TI Team,

We are porting the AM64x PROFINET IO Device example from the TI EVM to our custom board.

Hardware

  • Processor: AM6421
  • PHY: DP83822 (MII mode)
  • SDK: ind_comms_sdk_am64x_11_00_00_13

Current Status

The following functionality is working correctly:

  • PHY detection is successful.
  • MAC address is read correctly from EEPROM.(we are writing MAC Address into EEPROM)
  • PRU initialization completes successfully.
  • PN_API_IOD_initStack() returns success.
  • The device is discovered from the PLC.
  • PLC is able to assign the IP address.
  • AR Connect indication is received.

The application log is shown below:


The ret in PN_API_IOD_initStack : 0
Using user-defined submodule configuration (not from remanent memory). : 0x00000000before
IOD callback
IOD Start Up
Restore remanent memory indicated.
Restore remanent memory indicated.
Restore remanent memory indicated.
Restore remanent memory indicated.
Restore remanent memory indicated.
Reading the mac addres : the offset is : 64
MAC Address = 70:FF:76:1E:E9:C7
[APP] INFO: Initializing PRU instance ...
                                         APP_pruInit
Reading the mac addres : the offset is : 64
CUST_PHY_DP83822_detect     2000a240
CUST_PHY_DP83822_detect     2000a240
Phy 1 : Disable RGMII mode
Phy 1 : Disable GBit ANEG
Phy 2 : Disable RGMII mode
Phy 2 : Disable GBit ANEG
MAC Address = 70:FF:76:1E:E9:C7
DP83822 detected
Ret Val after PHY_init is 0
DP83822 detected
Ret Val after PHY_init is 0
Module/submodule successfully plugged into slot 0, subslot 1
Module/submodule successfully plugged into slot 0, subslot 2
Module/submodule successfully plugged into slot 0, subslot 3
Module/submodule successfully plugged into slot 0, subslot 4
Module/submodule successfully plugged into slot 1, subslot 1
Module/submodule successfully plugged into slot 1, subslot 2
Module/submodule successfully plugged into slot 1, subslot 3
Restore remanent memory indicated.
IOD Start end :0
Cyclic task
IP address = 192.168.0.2, Subnet mask = 255.255.255.0, Default router = 0.0.0.0
IP address = 0.0.0.0, Subnet mask = 0.0.0.0, Default router = 0.0.0.0
Save remanent memory indicated (2, 0).
IP address = 192.168.0.2, Subnet mask = 255.255.255.0, Default router = 192.168.0.2
The write : 0
Save remanent memory indicated (1, 0).
The write : 0
PN_APP_IOD_cbArConnectInd
Connect_ind: AR = 1, AR type = 1, send clock factor = 32, Reduction ratio (in) = 2, reduction ratio (out) = 2, session key = 1025, ho
 

Problem

After PN_APP_IOD_cbArConnectInd() is called, no further logs are printed and the application appears to stop progressing.

On the PLC (TIA Portal), after downloading the hardware configuration, the device reports:

  • Module exists, faulty
  • Error in lower-level component
  • Fault LED (SF)

Any suggestions on where to debug next would be greatly appreciated. 


Thanks & regards,
Sonu 

  • Hello Sonu,

    1. Is there a reason for not using the latest SDK release (2026_00_00_06)? it is highly recommended from our side as it includes many improvements and bug fixes.
    2. What do you see on Code Composer Studio debug while the program is "hanging"?
    3. Would you be able to share a Wireshark log starting from device startup and ending when the problem appears?

    Kind regards,
    Kamil

  • Hi Kamil,

    Thank you for your response.

    1. We are currently in the production phase, so upgrading or changing the SDK version is unfortunately not an option for us.
    2. We tested the same application on the AM64x EVM, and it works correctly. On our custom board (DP83822 PHY), the device is successfully discovered by the PLC, the device name and IP address are assigned, and the AR Connect indication is received once we download the PLC configuration, However application stops progressing after the following log:
    IP address = 192.168.0.2, Subnet mask = 255.255.255.0, Default router = 0.0.0.0
    IP address = 0.0.0.0, Subnet mask = 0.0.0.0, Default router = 0.0.0.0
    Save remanent memory indicated (2, 0).
    IP address = 192.168.0.2, Subnet mask = 255.255.255.0, Default router = 192.168.0.2
    The write : 0
    Save remanent memory indicated (1, 0).
    The write : 0
    PN_APP_IOD_cbArConnectInd
    Connect_ind: AR = 1, AR type = 1, send clock factor = 32, Reduction ratio (in) = 2, reduction ratio (out) = 2, session key = 1025, ho 

    No further logs are printed, and the PLC reports the module as faulty.

    1. I have attached the Wireshark capture (Wireshark_log_profinet2.zip) for your reference.

    Could you please review the capture and let us know if you notice anything abnormal in the PROFINET communication? Also, are there any additional callbacks or APIs that should be checked after PN_APP_IOD_cbArConnectInd() to help identify where the application is getting stuck?

    Wireshark_log_profinet2.zip


    Thank you for your support.


    Thanks & regards,
    Sonu 

  • Hi Kamil,

    I hope you're doing well.

    Could you please let me know if you had a chance to review my responses? If you need any additional information or logs from my side, I'd be happy to provide them.

    Looking forward to your response.

    Thanks & regards,
    Sonu

  • Hi Sonu,

    From the trace you shared I can see that the device isn't responding to some ARP and PING requests. PROFINET ApplicationReady notification is also missing at connection establishment. This might indicate parametrization issues or wrong settings for the stack or PHY.

    From the log you shared, I see you're setting a gateway IP, would you please try to go without this option and see if the problem persists? I also advise you to carefully revise the the function implementations of your custom PHY and compare them to what we are providing in "custom_phy" folder.

    Since you are using a relatively old SDK and a custom PHY, it won't be possible for us to reproduce your problem or efficiently support your request as a standard service. If you are interested in individual custom support please reach out to your regional sales representatives.

    Kind regards,
    Kamil