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-AM437X: EtherCAT PRU MMU configuration

Other Parts Discussed in Thread: PRU-ICSS-INDUSTRIAL-SW

Hello,

Using the AM437x IDK  board and PRU-ICSS-EtherCAT_Slave_01.00.02.01 firmware

Ethercat_slave_full_AM437x_arm example is adapted and a TxPdo of size 1KBytes defined to evaluate the am437x EtherCAT performance. It took about 50us to copy the 1k data to PRU in PDI_Isr(). When TxPdo object size is set as 6KBytes, the time increased to 300us. This is unacceptable when running 1ms EtherCAT cycle time.

Trace down the code, the time is mainly coming in function (from tiescbsp.c)

void bsp_write(PRUICSS_Handle pruIcssHandle, Uint8 *pdata, Uint16 address, Uint16 len)

uint8_t *pEsc = (uint8_t *)(((PRUICSS_HwAttrs *)(pruIcssHandle->hwAttrs))->baseAddr + PRU_ICSS_SHARED_RAM);
memcpy(&pEsc[address], pdata, len);

Further investigation I found the MMU configuration for PRU-ICSS0/1 is set as Bufferable in am437x_app.cfg. If change this to Non Bufferable, then It took only 7us to copy the 1k data to PRU. When TxPdo object size is 6KBytes, the time is about 50us. 

Questions:

1. Why the PRU shared memory is set as "Bufferable"? this results in a big performance issue

2. Any issue if set the MMU as "Non Bufferable"?

Thank you.

  • Hi,

    Have you read this notice on top of the forum: e2e.ti.com/.../580869 :

    TI is moving support of all protocols for AM335x and AM437x to PRU-ICSS-INDUSTRIAL-SW in order to provide a single model for industrial software delivery on current and future devices. PRU-ICSS-INDUSTRIAL-SW is already in use for AM57x devices.

    AM335x and AM437x industrial protocol support has begun migrating from SYSBIOSSDK-IND-SITARA (Ind SDK 2.x) to PRU-ICSS-INDUSTRIAL-SW.
    All current protocols for AM335x and AM437x will be supported on PRU-ICSS-INDUSTRIAL-SW by the end of June 2017.

    TI stopped providing and supporting SYSBIOSSDK-IND-AM335x on 31 March 2017, and will no longer provide or support SYSBIOSSDK-IND-SITARA after 30 June 2017.

    If you are interested in receiving maintenance releases and technical support for either of these SDKs after these dates please contact IndSDKSupport@list.ti.com or your TI representative.
  • I already use the latest/greatest PRU-ICSS-EtherCAT_Slave_01.00.02.01 and awared of the notice you mentioned.

    Please pass my questions to EtherCAT firmware engineer.

    Thank you.
  • Hi Karl, in the past, in some tests, I have used MMU "Bufferable" in order to increase performance. Interesting to see here is not the case. I will pass this information to the developers, thanks for pointing it out. On the other hand, it shouldn't be any issue to use "Non Bufferable"

    Thank you,

    Paula

  • Hi Karl, our developers tested write and read of 100 bytes from ICSS Shared Memory 50 times each. The minimum and maximum time (in CPU cycles) taken for all the possible combination of Bufferable and tex settings are as follows:

    Shared Mem   max min
    Write buf : false, tex : 1 385 78
      buf : true, tex : 1 3075 2830
      buf : false, tex : 0 3084 2832
      buf : true, tex : 0 367 123
           
    Read buf : false, tex : 1 2809 2455
      buf : true, tex : 1 2780 2617
      buf : false, tex : 0 2802 2617
      buf : true, tex : 0 1443 1313

    From above results the most optimal combination is Buf: True and tex:0 (which is our current  MMU settings for ICSS region). However, for only writing we see Buf: false, tex:1 gives good results.

    We wanted to share this test results with you, for your reference.

    thank you,

    Paula

  • The MMU settings was Buf: True and tex: 1. What I did was to change the Buf to False and the performance improved dramatically. Thanks for sharing your test results.

    Karl