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.

TMS570LS3137: HET parity errors enable sequence

Part Number: TMS570LS3137

Hello,

We have integrated TI Autosar MCAL 05.40.00 in our project.

We are enabling parity checks inN2HET module by setting HETPCR to 0x0A.

My question here is, should we need to enable this parity check before the driver initialization ( Pwm_Init() and Icu_Init() ) or after the driver initialization?

What is the impact if the parity check is enabled before the driver initialization?

  • Hello,

    The parity check of N2HET RAM is perfrmed when the N2HET execution unit makes a read access to N2HET RAM, but also when a HTU (N2HET DMA) performs a read access. If the pariy check fails, an error is signaled to the ESM module. 

    Is the PWM code or ICU code programmed to N2HET RAM in PWM_Init() and ICU_Init()? If the parity check is enabled before the code is programmed, and CPU or HTU read the N2HET RAM at this moment, a parity error will be generated. 

  • Hi,

    Yes, PWM and ICU drivers are accessing N2HET RAM location.

    But, I don't understand why parity errors are generated if the checks are enabled before the CPU or HTU reads N2HET RAM. 

    Is it because the parity bits are not programmed in N2HET RAM at that moment? If that is the case, parity errors should be generated for any read operation from N2HET RAM right?

  • Hi QJ,

    I did a test by enabling N2HET parity checks after PWM and ICU driver initialization.

    After which, when I tried to control a PWM output by calling Pwm_SetDutyCycle() function, N2HET parity errors are getting reported.

    I tested this multiple times. The value in the N2HET parity address offset register (HETPAR) is sometimes 0x364 and sometimes 0x08. I am not sure how to debug this further. 

    Another strange behavior that I observed was if I control PWM outputs with function Pwm_SetPeriodAndDuty(), the parity errors are not getting reported. 

    Please help me in finding out the root cause and solving this error.

  • Hello,

    I read the functions of Pwm_Init() and Icu_Init(). Those two functions copy the instruction onto N2HET RAM. Please enable the parity before calling those two functions, otherwise the parity of the instructions will not be calculated and programmed.

    After device power up, the N2HET RAM contents including the parity bits cannot be guaranteed. In order to avoid false parity failures due to the random state in which RAM powers up, the RAM has to be initialized. The easy way is to use the system module to initialize the N2HET RAM at startup:

    memoryInit(1<<0x3U);

  • Hi QJ,

    I am unable to initialize the N2HET RAM. Below is the code for memoryInit(). My program is stuck inside the while loop, which means the hardware initialization is not getting completed. What could be the reason for this?

    void memoryInit(uint32 ram)
    {

    systemREG1->MINITGCR = 0xAU;

    systemREG1->MSINENA = ram;

    while((systemREG1->MSTCGSTAT & 0x00000100U) != 0x00000100U)
    {


    }

    systemREG1->MINITGCR = 0x5U;

    }

     

  • Hello,

    The pbistStop() generated through HCG misses a reset for the PBIST controller. This will prevent other bus master from writing to the memory. 

    Please make changes to the pbistStop() function as below (highlighted instructions):

  • Hi QJ,

    My Project is not based on HCG. I am using EBTresos tool for MCAL generation. Also, I am not running any PBIST in my software. Hence, pbistStop() is not called at all. So, this could not be the reason for the memory initialization not getting completed right?

  • Hi QJ,

    I tried initializing the SRAM module by calling memoryInit(0x1U) function. The initialization is successful and getting completed.

    Initializing is not getting completed for N2HET peripheral RAM. Is there any precondition to initialize peripheral RAM?

    Please provide your response at the earliest. I am stuck with this issue for a long time now.

  • As mentioned before, if you did PBIST before memoryinit(), please make sure the pbist fully stopped (including pbist controller reset in updated the pbist_stop()). unstopped pbist will prevent bus masters from writing to memory. Can you please check the pbist code in your project?

  • Hi,

    The PBIST disable function is in mcu.c. Please add code to reset the pbist controller:

    1. Original code:


    2. Modified code: