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.

TMS570LC4357, CAN Interface, ESM Errors

Other Parts Discussed in Thread: TMS570LC4357, HALCOGEN

Hi all,
I using two a CAN interfaces (CAN1 / CAN2) from TMS570LC4357 controller and I am using two of the TMS570LC4357 controller. That means I have a double controller system.
So , on each controller CAN1 is configured as a send channel and CAN2 is configured as a receive channel.
So I get a full duplex CAN interface between two TMS570LC4357 controller.
This is working fine, the two controllers are sending and receiving CAN data.

I use the following CAN1 / 2 settings in HalCoGen:
CAN1 General Configuration
Disable Automatic Retransmission     --> off
Enable Identifier Extension                    --> off
Enable Ram ECC                                    --> on
CAN1 Message 1 Configuration        --> used as TX, Id = 1, "Enable RTR" off, "Set EOB" off

CAN2 General Configuration
Disable Automatic Retransmission     --> off
Enable Identifier Extension                    --> off
Enable Ram ECC                                    --> on
CAN2 Message 1 Configuration           --> used as RX, Id = 1, "Enable RTR" off, "Set EOB" off

****************************************************************************************************************

Now I want to activate the ESM supervsion for the CAN1 / CAN2 interfaces so I have to activate ESM Group1 channel 21 / 23 (ECC uncorrectable error)
and 73 / 74 (ECC single bit errors).
So far so clear. Than I found in the documentation "spna131.pdf" that I have to include some configuration stuff in "void canInit(void)".

So I included the following code lines:
void canInit(void)
{
/* USER CODE BEGIN (4) */
    /*
     * see spna131.pdf
     */
    canREG1->CTL = (uint32)((uint32)0x0000000AU  << 10U);
    canREG2->CTL = (uint32)((uint32)0x0000000AU  << 10U);

    systemREG1->MINITGCR    = 0xA;

    systemREG1->MSINENA     = 0x00000420u;

    do{

    }while((systemREG1->MSTCGSTAT & 0x100u) == 0u);

    canREG1->ECCDIAG = 0x5U;
    canREG2->ECCDIAG = 0x5U;
/* USER CODE END */


But now I always get the ESM Error Group1 channel 23. I guess the additional code in canInit is not the correct one. So may be you can help me.

Thanks in advanced
Lars