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.

AM335x Profibus issue

Other Parts Discussed in Thread: AM3356, PROFIBUS, SYSBIOS, TMDSICE3359, AM5728

Hi, Everyone

I have a question about ISDK on AM3356 Profibus.

My custoer develop Profibus product.
It is based on ISDK2.1.1.2.

but Both of PRUs often do not response on their target board.
then ARM core is working.
I show you PRU0 and PRU1's screen shot

It means PC of PRU is loop.

I need to fix this issue.
Please let me know about these question.

(1)Does ISDK of profibus sample code on PRUs use this binary file below?

C:\ti\sysbios_ind_sdk_2.1.1.2\sdk\protocols\profibus_slave\firmware

(2)If yes, Why is it binary code on PRU ? 

(3)Can you open this source code or symbol for our fix ?

(4)Please tell me reason why it is loop if you have idea.

Best Regards
Hiroyasu

  • The ISDK team have been notified. They will respond here.
  • Hi, Biser

    Thank you for your quick response !
    I understand ISDK Team visit.
    but I need to hurry again.
    I wait for ISDK team response.

    best regards
    Hiroyasu
  • Hi Hiroyasu-san, answers below:
    1) yes that is correct, firmware used is profibus_pru0_main_bin.h and profibus_pru1_main_bin.h
    2) There are few reasons, one is for certification. Any modification would require re-certify the protocol
    3) I don't think we can give you the source code, but I will check with the developers which other options for debugging we can offer
    4) Apologize, I don't know which loop could be ..

    thank you,
    Paula
  • Also, do you know if this is something that we could reproduce on our EMVs? if so, could you guide us on how to do it?

    thank you,
    Paula
  • Hi, Paula-san

    Thank you for your reply!
    I want to know more.

    (5)Should customer use profibus_pru0_main_bin.h and profibus_pru1_main_bin.h for their product?

    (6)How should I check loop of PRU ? I can not check. Because it is binary.

    (7)I do not understand your last answer. What is EMV ?

    Best Regards
    Hiroyasu
  • Hi, Paula-san

    Could you reply for me ?

    Best Regards
    Hiroyasu
  • Hi Hiroyasu-san, we will come back with debug tips/procedures later, for now please see below a quick update

    5) Yes you need both PRU. You need to load profibus_pru0_main_bin.h into PRU0 and profibus_pru1_main_bin.h into PRU1. The stack driver will actually take care of loading firmware.
    7) EVM stand for "Evaluation Module". In order to understand better your issue we would like to know how is your setup and how are you testing. Are you using TI's boards? or your own customized boards? Also please clarify the issue, is the slave not connecting with the master?

    One more note: When debugging with CCS, make sure that CCS is not connected to the PRU. CCS reconfigures PRU control register to single step, so when ARM code starts / executes PRU firmware it might be possible that PRU does only one a single step instead of starting.

    Thank you,
    Paula
  • Hi Paula-san

    Thank you !
    Actually This issue occur on customer target board. and now They test on ICEv2 board.

    ARM core is 600MHz on Profibus sample code. (I see GEL file)
    but ARM core is 300MHz on their system.
    and Their system's clock source is 25MHz.(ICEv2 board is 24MHz)

    They change GEL file below

    if(CLKIN==25)
    {
    MPU_PLL_Config( CLKIN, 24, 300, 1);
    CORE_PLL_Config( CLKIN, 24, 1000, 10, 8, 4);
    DDR_PLL_Config( CLKIN, 24, 400, 1);
    PER_PLL_Config( CLKIN, 24, 960, 5);
    DISP_PLL_Config( CLKIN, 24, 48, 1);
    GEL_TextOut("**** AM335x ALL ADPLL Config for OPP == OPP100 is Done ......... \n","Output",1,1,1);
    }

    I think it is correct value.
    Can you tell me where should I change register for ARM core is 300MHz?

    Best Regards
    Hiroyasu
  • Hi Hiroyasu, now I remember =) this is related to E2E e2e.ti.com/.../2002857 right?
    If so, do they confirm the clock is actually at 300MHz? The gel file portion you showed above looks the right place to me.

    Also I got some tips for debugging Profibus:

    1. Check if the slave will lock to a baudrate to confirm that receive path works.
    Connect the slave to a PROFIBUS master that is sending frames. We suggest to start with a low Baudrate, for example 1MBaud. TMG stack checks if PROFIBUS frames are received over time. If not, then, there is a timeout and the stack will set the next baudrate. So, if the stack baudrate detection is continuously operating , then, slave is not lock to a baudrate. On the other hand, if baudrate detection has locked, then receive path should be OK.
    2. To check TX, first check if TX_EN pin number has been altered from the TMDSICE3359 project. PRU firmware needs to know which PRU GPO number has been used to be able to control TX_EN signal for RS485 transceiver.

    hope this helps,

    Thank you,
    Paula
  • Hi, Paula

    Thank you for your reply.
    My customer set 1.5M ~ 12Mbps for PROFIBUS speed.
    and They can get error this case.
    In 9600bps case, They can not see error.
    and In 1.5M ~ 12Mbps case, it is success to sync with PLC first.
    but it dose not connect after 5min.

    and I have another question.
    I showed you screen shot PRU loop.
    In this case, Can you tell me register and Flag PRU provide ? if device have.
    and What information do you need to resolve reason why PRU is stopped ?

    Best Regards
    Hiroyasu
  • Hi, Paula-san

    Could you reply ?
    and We got same error on ICEv2 board and Profibus sample code of ISDK.
    ARM core is executed at 300MHz. (Defalt setting is 600MHz)

    Can you show me where should I take care for PRU loop?

    Best Regards
    Hiroyasu


  • Hiroyasu-san, I will try to reproduce the issue using ICEv2 @300MHz and come back to you.

    thank you,
    Paula
  • Hi, Paula-san

    Thank you !
    I wait for your response !

    By the way I understand ARM can run 300MHz and Customer select 300MHz device for Profibus.
    This understanding is correct ?

    Best Regards
    Hiroyasu
  • Hi, Paula-san

    I can tell you more information about issue.
    My customer use DP-V0.
    You should change some parameter on DP-V0 for your reproducing.

    Best Regards
    Hiroyasu
  • Hi Hiroyasu-san, yes, please send me all the configuration and information that you can think is necessary in order to reproduce the issue on ICEv2.

    thank you,

    Paula

  • Hi Hiroyasu-san, also, I was pointed out that there is a potential bug that might be related with the issue you are facing. A temporary fix is to change below line inside am33xx_bsp.c

    void SendCommandToFDL(void)

    {

       PRUICSS_pruSendWaitCearEvent(pruIcssHandle, ARM_PRU1_INTERRUPT,

                                    SYS_INT_PRUSS1_EVTOUT0 -20, PRU1_ARM_INTERRUPT);

    }

    A fix inside PRUICSS_pruSendWaitCearEvent will be included in SDK 2.1.3 version, but in the meantime, could you please try above change and let us know if this help?

    thank you,

    Paula

  • Hi, Paula-san

    Thank you !
    I will feedback soon.

    Best Regards
    Hiroyasu

  • Hi, Paula-san

    My customer check their source code.
    but It is already fix.

    Problems have occurred with the modified software.

    Do you have other points for fix?

    Best Regards
    Hiroyasu

  • Hi Hiroyasu, I was out of office, I am back, I will try to reproduce the issue tomorrow. I will keep you post it.

    thank you,

    Paula

  • Hi, Paula-san

    Thank you !
    I wait for your reply.

    Best Regards
    Hiroyasu

  • Hi Hiroyasu, a quick update, I tested AM335x Profibus Slave example from sysbios_ind_sdk_02.01.02.02. I also modified gel file so CPU clock is 288MHz. For master I used AM572x IDK running PRU-ICSS Profibus Master (wiki here) at 9.6KBaud. With this combination things seems working OK, please see attached snapshot. I will do some additional testing and keep you post it.

    Thank you,

    Paula

     

  • Hi, Paula-san

    Thank you for your test !
    My customer already made sure it is working at 9600 bps.
    but they mention it is not working at 1.5M ~ 12M bps

    Please confirm with 1.5M ~ 12M bps.

    My customer get error at this environment below:

    -H/W
    AM335x ICEv2
    -S/W
    It is based on ISDK profibus sample code
    it is modified AM335x@300MHz
    They use TMG protocol stack they bought.

    It was reproduced after about 2 hours.

    Best Regards
    Hiroyasu

  • Hiroyasu-san, I think I was able to reproduce the issue after 2 hours and a half using 1,5Mbaud. My Profibus Master reported "Slave out of state DataExchange". and in my slave I see:
    Outputs changed 33 FF FF FF FF FF 0 0
    Outputs changed 0 0 0 0 0 0 0 0

    I will confirm and let you know. Thank you.
    Paula
  • Hi, Paula-san

    Thank you for your reply.
    I want to check if your situation is the same with me.
    Can you tell me PC of PRU when PRU stop ?

    and I have a question.

    How long should we test ? 1day ? 2day?
    I want to know the time when I can say that there is no problem

    Actualy I want to know your progress status by end of week.

    Best Regards
    Hiroyasu
  • Hirayasu-san, I was able to reproduce it using stack lib from sysbios_ind_sdk_02.01.02.02. Then, I changed the stack lib and it seems the problem went away.. still too early to conclude, just want to give you a quick update.
    About your question, because, before it was pretty consistent failing after ~2h, I think if we test it for ~12 or 24h we should be OK.

    thank you,
    Paula
  • Hi, Paul-san

    Thank you ! I got it.

    I want to make sure your reproduce situation is same as my customer.

    Can you tell me your Program Counter of PRU when PRU loop?
    and Can you tell me your plan ?

    My customer need to hurry.
    Is it possible to give me your software ?
    If yes, When will you give me your update software ?

    Best Regards
    Hiroyasu
  • Hi Hiroyasu-san, after using stack library from our GIT repository, I haven't had issues reproducing the hang. I saw it once, but now I think it could have been something else in my setup. Anyhow, as a test, I could send you the stack libraries (debug / release) I have tested in order to see how they work in your customer board. Please send me your email, you can send it via a private E2E message.

    On the other hand, we are close to release Industrial SDK 2.1.3, I will let you know when it is in TI.com so you can give a try as well.

    thank you,
    Paula
  • Hi, Paula-san

    Thank you for your reply.
    Could you show me your Evaluation environment ?
    I want to know your Hardware configuration and Software you use
    and Master you use.

    I understand you do not see error but my customer got error.
    They want to know your environment.

    Best Regards
    Hiroyasu

  • Hi Hiroyasu-san, just to confirm, I sent you an email with latest industrial sdk 02.01.03.02. version, so I guess you tried Profibus example from 2.1.3.2 in your setup and it failed, is my understanding correct?

    If so, is it failing in the same way? How long are you running your test? how many slaves?

    About, my setup, I am using AM5728 IDK for running PRU-ICSS Profibus Master, for slave I am using AM335x ICE board running at 288MHz. I had tried different ISDK versions, but for the latest 02.01.03.02 I tested for >15 hours at 1.5Mbaud without issues..  

    Thank you,

    Paula