Hello : i use HALCoGen to create my FlexRay project .but i find i cant recive any data ,but if i based on the project of (FlexRay_Communication_CCSv5.zip),i can recive the data what i want.
i checking the sys_startup.c i find :
pbistRun( (uint32)0x00000000U /* EMAC RAM */
| (uint32)0x00000000U /* USB RAM */
| (uint32)0x00000800U /* DMA RAM */
| (uint32)0x00000200U /* VIM RAM */
| (uint32)0x00000040U /* MIBSPI1 RAM */
| (uint32)0x00000080U /* MIBSPI3 RAM */
| (uint32)0x00000100U /* MIBSPI5 RAM */
| (uint32)0x00000004U /* CAN1 RAM */
| (uint32)0x00000008U /* CAN2 RAM */
| (uint32)0x00000010U /* CAN3 RAM */
| (uint32)0x00000400U /* ADC1 RAM */
| (uint32)0x00020000U /* ADC2 RAM */
| (uint32)0x00001000U /* HET1 RAM */
| (uint32)0x00040000U /* HET2 RAM */
| (uint32)0x00002000U /* HTU1 RAM */
| (uint32)0x00080000U /* HTU2 RAM */
| (uint32)0x00004000U /* RTP RAM */
| (uint32)0x00008000U /* FRAY RAM */
,(uint32) PBIST_March13N_DP);
the pbist Algorithm for Fray should not use PBIST_March13N_DP. we should use the algorithm of PBIST_PMOSOpen_DP for fray.
and in sys_selftest.c This function of void pbistSelfCheck(void);
{
volatile uint32 i = 0U;
uint32 PBIST_wait_done_loop = 0U;
/* USER CODE BEGIN (13) */
/* USER CODE END */
/* Run a diagnostic check on the memory self-test controller */
/* First set up the PBIST ROM clock as this clock frequency is limited to 90MHz */
/* Disable PBIST clocks and ROM clock */
pbistREG->PACT = 0x0U;
/* PBIST ROM clock frequency = HCLK frequency /2 */
/* Disable memory self controller */
systemREG1->MSTGCR = 0x00000105U;
/* Disable Memory Initialization controller */
systemREG1->MINITGCR = 0x5U;
/* Enable memory self controller */
systemREG1->MSTGCR = 0x0000010AU;
/* Clear PBIST Done */
systemREG1->MSTCGSTAT = 0x1U;
/* Enable PBIST controller */
systemREG1->MSINENA = 0x1U;
/* wait for 32 VBUS clock cycles at least, based on HCLK to VCLK ratio */
/*SAFETYMCUSW 134 S MR:12.2 <APPROVED> "Wait for few clock cycles (Value of i not used)" */
/*SAFETYMCUSW 134 S MR:12.2 <APPROVED> "Wait for few clock cycles (Value of i not used)" */
for (i=0U; i<(32U + (32U * 1U)); i++){ /* Wait */ }
............
}
it should not clear the PBIST Done flage in here .
i think we should Clear PBIST Done at the end of this function.