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.

TMS320F28335: Communication issues on external interface (HPI interface between C6747 and F28335; parallel bus to EtherCAT Module)

Part Number: TMS320F28335

Setup:

TI F28335 communicates via parallel bus (XINTF) with the following nodes:

  • TI C6747
    • XINTF zone 7
    • over HPI
    • address + data multiplexed
  • EtherCAT module
    • XINTF zone 6
    • separate address and data lines
  • external ADC
    • XINTF zone 0

Problems:

1.    First High-Word read = 0x0000

The first High-Word is read out with 0x0000 each time a new address is set.

 

This happens:

  • in auto-increment-mode:
    • the first read access after setting a new start address
  • in NON-auto-increment-mode (i.e. when reading a single value):
    • every time

→ Reason for this behavior is probably a wrong reaction/function of the xReady signal. The F28335 finishes its read request although it receives a BUSY signal from the C6747.

 

This behavior can be influenced by changing the XRDACTIVE setting.

a) With setting XRDACTIVE = 4, the xReady signal is ignored. (see Figure 1)

b) With setting XRDACTIVE = 5, the F28335 reacts correctly on the xReady signal. (see Figure 2)

Question 1

Why does the slight change of XRDACTIVE from “4” to “5” ticks change the reaction on the xReady signal?

  • Why is the behavior related to the active tick setting?
  • Why does the F28335 not wait for the C6747 in case the active ticks are set to 4? It seems to ignore the xReady signal completely in this case.

 

 

Question 2

So far, we always use asynchronous mode for this XINTF (READYMODE = 1).
Can you explain the difference between asynchronous and synchronous mode in more detail?
In the datasheet this topic is scarcely covered.

2.    Timing restrictions for XINTF

Before getting to the results above, the following settings for the XINTF (Zone 7) have been used:

Parameter

Description

Value

XWRLEAD

Write LeadTicks

1

XWRACTIVE

Write ActiveTicks 

2

XWRTRAIL

Write TrailTicks 

2

XRDLEAD

Read LeadTicks 

3

XRDACTIVE

Read ActiveTicks  

4

XRDTRAIL

Read TrailTicks  

3

USEREADY

Use XREADY Pin       

1

READYMODE

Enable the XREADY sampling

1

X2TIMING

Double the TimingSettings 

0

 

After checking in the datasheet, it seems this is an invalid configuration (see Figure 3).

Although the criteria    XRDTRAIL == 0    AND   XWDTRAIL == 0   was not met, the communication behavior stayed the same.
i.e. HIGH-word errors when XRDACTIVE = 4 and no HIGH-word errors with XRDACTIVE = 5.

Question 3

Can you explain how this wrong setting influences the communication? The reason I ask this is, that for another XINTF zone we must violate the above rules to get a working communication.

The XINTF settings for communication with the attached EtherCAT Board (Zone 6) are as follows:

Parameter

Description

Value

XWRLEAD

Write LeadTicks

3

XWRACTIVE

Write ActiveTicks 

7

XWRTRAIL

Write TrailTicks 

3

XRDLEAD

Read LeadTicks 

2

XRDACTIVE

Read ActiveTicks  

7

XRDTRAIL

Read TrailTicks  

2

USEREADY

Use XREADY Pin       

1

READYMODE

Enable the XREADY sampling

1

X2TIMING

Double the TimingSettings 

0

When changing XWRTRAIL to “0” as implicated, the communication does not work anymore. Data is then written incorrectly to the EtherCAT module.

Question 4

Can you please explain in more detail the timing requirements for XINTF of C2000 (trail, active, lead ticks, …)?

3.    Read request from wrong address

Another issue we came across is that the address where the data is read from the C6747 is corrupted because of wrong XINTF settings. We cannot see the issue on the scope, but when checking the F28335 registers, it is clear, that the wrong address is set.

Error example:

On C6747 @address 0x8001 F37C the value 0x3B3C 3D3E is stored. When reading from this address, the data 0x6C6D 6E6F is read instead (incorrectly).

The described problem could be solved by increasing the XWRLEAD from “1” to “3”. On the scope, however, the timing when the address bits toggle does not really change in relation to the write pulse start. But in the test firmware no communication errors occur. The increased time between CS start (green) and Write start (magenta) can be seen in Figure 8.

Question 5

Can you explain, why the change of XWRLEAD solves the issue, although timing of data/address lines seems to be unchanged in relation to Write pulse.

For better readability the description can also be found here: 

TMS320F28335_Communication_Issues_External_Interface.pdf

  • Hi Daniel,
    This issue has been forwarded to one of our domain expert. You will getting a response shortly.
    Thanks,
    Krishna
  • Daniel,

    Can you share your XINTF register values?

    Are you using the WD reset workaround from the Possible Incorrect Operation of XINTF Module After Power Up Advisory in the Errata?

    Can you capture the XREADY signal for both XRDACTIVE conditions using an oscilloscope?  I wonder if the signal may be slow moving and not satisfying the logic analyzer VIH threshold, but satisfying the F28335 VIH level.

    -Tommy

  • Daniel,

    The XINTF Reference Guide has more module-level details such as the difference between synchronous and asynchronous XREADY modes.

    Each Zone has its own settings so you can use a different set of timing values for each external device.

    The XINTF state machine looks for the XREADY signal N-cycles before the end of the ACTIVE phase.  The number of cycles is determined by the READYMODE setting so that's why the LEAD and ACTIVE requirements vary with READYMODE.

    It is difficult to say what will happen when the timing recommendations are not followed.  Many of the guidelines are intended to avoid potential boundary condition problems.

    -Tommy

  • Daniel,

    Are you still having issues?

    -Tommy
  • Daniel,

    It has been a while since your last update. I assume that you were able to resolve your issue. If this isn’t the case, please reject this resolution and reply to this thread. If this thread is locked, please make a new thread describing the current status of your issue.

    -Tommy
  • Sorry for the late reply. We were able to solve the problems by changing the tick settings of the XINTF. Your answer above helped explaining, why more active ticks for the read process might be needed.

    All in all we have robust settings now, but it is still unclear why we need to use tick settings for one XINTF zone which are against the reference guide. (as described earlier, we use "Trail Ticks != 0" although the Zone is in "Asynchroneous mode")

    As soon as we use the proposed ones (Trail Ticks Read = 0; Trail Ticks Write = 0) the communication with this module fails.