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.

PROCESSOR-SDK-AM335X: Profinet detection of stale data

Part Number: PROCESSOR-SDK-AM335X

Hello,

I am currently working on the Profinet Slave on the AM335x and have noticed that the PRU-ICSS continues to send PNIO RTC frames after I use the debugger to halt execution of the AM335x.  

Is there some functionality in the PRU-ICSS that detects that the AM335x is no longer updating the IOD->IOC data and can terminate production of the PNIO RTC frames being sent to the IOC?   

The potential of the PRU-ICSS continuing to product PNIO RTC frames in the event of a problem in the AM335x that causes stale data to be sent to the IOC is of major concern as ongoing sending of stale data to the IOC in our industrial automation systems could have dire consequences.

thank you,

Mark.

  • The RTOS team have been notified. They will respond here.
  • Mark,

    >> halt execution of the AM335x.
    Do you halt A8 core only? Would it be OK if you use JTAG debugger to connect and halt PRU cores?

    Regards,
    Garrett
  • Hi Garrett,

    Halting the A8 core simulates a problem in the A8, for example some type of execution hang of the A8.

    The real concern that I have is that in a unit in some large manufacturing system that is using the PROFINET stack to provide communication between a local controller  (IOD) and a PLC (IOC),    if the A8 hangs and stops providing critical feedback data to the PRU,  but the PRU continues to provide stale/old data to the PLC via  the PN RTC,  there is the potential for a serious problem.     The PLC will have no indication of a problem since the PRU is still sending frames and updating the APDU.

    I am hoping that the PRU code offers some functionality to detect the lack of the A8 refreshing the PN data and either stops providing PN RTC frames (the PLC will then timeout on the AR) or indicates the problem in some other way to the PLC (IOC).

    Thanks,

    Mark

  • Mark,

    Now I understand your points! It's a good suggestion to have the feature of PRU detecting the lack of the A8 refreshing the PN data and then take action appropriately. I will check if this is already available today and request the enhancement if not available.

    Regards,
    Garrett
  • Hi Mark,

    Actually the host WD support, exactly to address this problem - if host CPU is not triggering this WD due to a crash, PRU will stop sending PPMs.

    Make sure WATCHDOG_SUPPORT is enabled. See the comments below in iPNDrv.h:

    * @page PN_WATCHDOG_PAGE Watchdog timer

    * @tableofcontents

    * @section WATCHDOG_INTRO Introduction

    * Watchdog timer is used as a safety feature to monitor the application state and to turn off the PPM transmission after pre-defined interval if application is not responding. The watchdog will thereby protect the system from errors or faults by timeout or expiration. The expiration is used to initiate corrective action in order to keep the system in a safe state and restore normal operation based on configuration. Therefore, if the system is stable, the watchdog timer should be regularly reset or cleared to avoid timeout or expiration.

    *

    * Application can use the API PN_setWatchDogTimer (defined in iPNDrv.c) to set the timeout value. Application needs to enable the WATCHDOG_SUPPORT macro to use this feature.

    * By default the PROFINET Slave driver sets the timeout to 100ms (watchDogExpireDuration defined in iPndrv.h) as follows:

    * PN_setWatchDogTimer(pnHandle, watchDogExpireDuration)

    * The PN_tapWatchDog_task task defined in iPnOs.c resets the watchdog timer periodically.

    *

    * This timeout is system dependent and is the responsibility of user to set the trigger frequency and the timeout.

    *

    * If watchdog timer expires, the firmware will stop all active PPM connections. Application can check the expiry state of watchdog timer using WD_STATUS register in ICSS IEP. Bit 0 of WD_STATUS is PD_WD_STAT.

    * Example:

    * Condition for Active or disabled: 0x0001 == HWREGH(emacBaseAddr->prussIepRegs + CSL_ICSSIEP_WD_STATUS_REG)

    * Condition for Expired: 0x0000 == HWREGH(emacBaseAddr->prussIepRegs + CSL_ICSSIEP_WD_STATUS_REG)

    *

    * The API definitions can be found here @ref PN_WATCHDOG

    */

    Regards,

    Garrett