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.

TMDSECATCNCD379D: Purpose of padding in PDO mapping object

Part Number: TMDSECATCNCD379D

I am trying to generate SSC code from SSC tool. I am using TI TMDSECATCNCD379D (and its SSC tool patch) and SSC tool 5.11. The generation is fine but I found the code genreated have padding for both PDO mapping object. e.g.

OBJCONST TSDOINFOENTRYDESC    OBJMEM asEntryDesc0x1601[] = {
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READ },
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }, /* Subindex1 - map control word */
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }, /* Subindex2 - map target position */
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }}; /* Subindex3 - add 16bit padding to get an 32Bit object/process data structure */

while there is none in TI TMDSECATCNCD379D own demo application:

OBJCONST TSDOINFOENTRYDESC    OBJMEM asEntryDesc0x1601[] = {
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READ },
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }, /* Subindex1 - Reference to 0x7010.1 */
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }, /* Subindex2 - Reference to 0x7012.1 */
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }}; /* Subindex3 - Reference to 0x7014.1 */

Both seems working fine (at least communication normal) but I would like to understand more to avoid any future problem.

Thanks for reading. Any reply is appreciated.

  • Not sure why there is a difference between the SSC generated code and the demo code. In the demo, Subindex3 seem to be mapped. We will review and get back.

  • Hello

    The code (excluding comments) looks the same (unless I am misreading something). 

    This is likely due to SSC configuration that indicates this a 16-bit MCU (due to the 16-bit addressing style of C2000 MCUs)

    Best regards

    Chris

  • Thanks for the reply Christopher, sorry I forogt to reply 

    If excluding comment the code are exactly the same. But for the one on top (generate from SSC tool) , the last entry subindex3 is appended automatically. While the one at bottom (TMDSECATCNCD379D own demo), the last entry is functional, intended for reference to 0x7014.

    I tried to configure SSC tool differently but the padding persist. My question is can I remove the padding? If so how to remove them?

    My concern is the master recognize these padding and transmit them anyway. So are the padding wasting bandwidth?

  • Hello

    No, I don't believe this should be wasting bandwidth, as this is just allocating the location of the data in the object dictionary. If anything, it is using a little extra memory on the slave device.

    If you wanted to remove it, it would require editing this code as well as the ESI file, so that they are aligned. I can't provide much more insight than that and it may cause more headache than it is worth.

    Someone more familiar with SCC and ESI files (such as the ETG experts), may be able to assist there. You can ask on the ETG forums.

    Best regards

    Chris