Addressing CompactCom B40 in 16-bit mode

Hi all,
we are developing a drive for motion control with the Anybus CompactCom B40. At the moment, I am working on the Ethercat version; in the near future we will also use Profinet.

The “host application” runs on a DSP Texas Instruments TMS320F28335.
In our prototype board, the Anybus brick is configured to communicate in “16-bit parallel” mode. Connections with the DSP are made as in the “Design Guide” (schematic in section D.3). The only difference is that “!WEL” and “!WEH” lines are connected togheter to “!WE” of our system. The brick B40 works as a memory-mapped device, connected to address bus and data bus of the DSP.

I am using the HMS driver Version 3.05, downloaded some weeks ago. The “Generic” version is included in our C code project. I am following the “Host Application Implementation Guide” but I found a problem even is Step One.

I have some troubles in accessing Anybus registers and memory, because of an addressing problem. In the schematic of Design Guide, A0 line is not used on both host and Anybus sides (on the Anybus the pin is connected as !WE signal). Hence, our the DSP addresses the same location when using odd or even addresses (the Least Significant Bit A0 is not connected, so it has no meaning). In this condition all the 16-bit addresses mentioned in Software Guide (Memory Map, section 4.2) are multiplied by 2.

After some trials I get the access to brick’s memory by manually implementing accessing function: I defined ABCC_CFG_MEMORY_MAPPED_ACCESS as FALSE and I implemented read/write functions to access the peripheral with “doubled” addresses. In this way, using the example code (page 36 of the “Host Application Implementation Guide”), I successfully read some fields of the “Anybus Object”.
The problem is that this approach is not convenient:
- it slows down the communication;
- to transfer a block of data, memcpy is not usable;
- accessing of Process Data must also be modified, since it uses different function calls.
TMS320F28335 works with 16-bit char, hence the corresponding #define in configuration header is set accordingly. I found that address offsets are also affected by this define and I manually modify them to access memory with the aforementioned addressing scheme (all the offsets are multiplied by 2). I didn’t understand why.

I guess that I am missing something in configuring HMS code. Is this addressing scheme directly covered by your driver? Do you have any other suggestion?

The board is only a prototype, so in the next hardware release we can modify the address bus, to connect lines A1 - A13 of Anybus to A0 - A12 of our DSP. At the moment, I have only this hardware available and I would like to develop the initial code on that.

Many thanks for your attention.
Best regards,

Alessio

Hello @AlessioCaligiuri,

I will need to take some time to reach out to some colleagues and look into this question. However, based on your reported location and the technical aspect of this question I would recommend you reach out to your local support team via mysupport.hms.se. They will be better suited to support this request.

Deryck

Hi @AlessioCaligiuri,

Discussing this with a colleague we would need to look more info about the TMS chip. We are thinking you might be missing something with the pinout as 16 bit has some particular requirements. Looking at the support case on mysuppost.hms.se it looks like Tareq is looking at the same thing. Please continue to work with him to resolve this issue.

Deryck