Tool/software: Code Composer Studio
I use TMS570LC4357 chip and Safe Ti Library. I have some questions about using CRC module and Safe Ti Library.
1. I want to use crc module. But, HL_crc.c file is not generated. I want to know How i can generate HL_crc.c file.
2. CRC module is act before Self-Diagnosis. I test CRC module run in 2 location.
(1) before init about self-diagnosis (The Green line) - there is no problem
(2) after init about self-diagnosis (The Red line) - Self diagnosis fail
-> I want to know the reason why self-test fail after CRC module run when self-diagnosis init is finisied.
- Using code -
crcInit();
SL_flash_test_in_boot(); /*crc module run code*/
/* Enable IRQ offset via Vic controller */
_coreEnableIrqVicOffset_();
/* Initialize VIM table */
vimInit();
/* Configure system response to error conditions signaled to the ESM group1 */
/* This function can be configured from the ESM tab of HALCoGen */
esmInit();
/* USER CODE END */
_mpuInit_();
/* USER CODE BEGIN (23) */
/* USER CODE END */
_cacheEnable_();
/* USER CODE BEGIN (24) */
/* USER CODE END */
/* USER CODE BEGIN (25) */
if (resetReason == RESET_ERROR){
systemREG1->SYSECR |= ((uint32)0x03u<<14);
}
/* USER CODE END */
/* initialize global variable and constructors */
__TI_auto_init();
/* USER CODE BEGIN (26) */
/* Initialize EPC */
epcInit();
/* enable DMA ECC */
sl_dmaREG->DMAPCR |= (uint32)0xAU;
/* initialise DMA RAM */
SL_Init_Memory(RAMTYPE_DMA_RAM);
/* Initialise ADC */
adcInit();
debug_printf( "adc init\n\r");
/* Initialise ADC SRAM */
SL_Init_Memory(RAMTYPE_MIBADC1_RAM);
SL_Init_Memory(RAMTYPE_MIBADC2_RAM);
/* Initialise MIBSPI */
mibspiInit();
/* Initialise MIBSPI SRAM */
SL_Init_Memory(RAMTYPE_MIBSPI1_RAM);
/* Initialise SCI */
sciInit();
gioInit(); /* thchung add */
dmmInit();
gioSetBit(gioPORTB, 1U, 0); /* To do: move to HL.gio.h */
/* Initialise CAN */
canInit();
/* Initialise CAN SRAM */
SL_Init_Memory(RAMTYPE_DCAN1_RAM);
SL_Init_Memory(RAMTYPE_DCAN2_RAM);
gioInit();
rtpInit();
SL_ESM_Init(ESM_ApplicationCallback);
_enable_interrupt_();
uint32 i;
uint32 size=(uint32)&ulHighHandlerSize;
for(i=0;i<size;i++)
{
((char *)&ulHighHandlerStartAddr)[i] =((char *)&ulHighHandlerLoadStart)[i];
}
crcInit();
SL_flash_test_in_boot(); /*crc module run code*/
SafetyBootMachine(); /*Self- Diagnosis funciton - in Safe Ti Library*/
Regards,
MInwoo