Hi All,
I am attempting to use the Hercules' PBIST suite to verify the RAM banks before application startup. I have implemented a very basic PBIST configuration and test using the March13N RAM verification algorithm. My problem is the following: if I step through my application in the debugger, everything works fine, but if I just run it in the debugger (or after POR) it crashes. If I pause the debugger I can see that my program counter is at 0x00000004 after everything crashes. Not really sure what is going on here. Any help would be appreciated!
Below is my PBIST code:
void main(void)
{
/* USER CODE BEGIN (3) */
/* PBIST SEQUENCE */
#define USE_PBIST
#ifdef USE_PBIST
{
int i = 0;
// wait for CPU to come out of reset
while ((systemREG1 -> CPURSTCR) > 0);
systemREG1 -> MSTGCR |= 0x00000200; // ROM Source clk GCLK / 4. PBIST will reset for 64 VBUS cycles
systemREG1 -> MSINENA = 0x1U; // global PBIST state machine enable
systemREG1 -> MSTGCR = 0x0000020AU; // memory self test enable key
for (i = 0; i < 256; i++)
{
// burn loop, wait for VBUS to reset
}
pbistREG -> PACT |= 0x3U; // enable PBIST & ROM clocks
pbistREG -> OVER |= 0x1U; // enable RAM overide
pbistREG -> ALGO = 0xCU; // run the March13n algorithm for both single & dual port RAM banks
pbistREG -> ROM = 0x3U;
pbistREG -> DLR = 0x14U; // enable editing of the PBIST config regs
while (!((systemREG1 -> MSTCGSTAT) & 0x1U))
{
// burn loop, wait for memory self test to complete
}
// fail case
if (pbistREG -> FSRF0 == 0x1U || pbistREG -> FSRF1 == 0x1U)
{
// TODO figure out how to signal a failure
}
// pass case
pbistREG -> PACT = 0; // disable PBIST & ROM clocks
systemREG1 -> MSTGCR = 0x5U; // disable the PBIST self test module
}
#endif /*USE_PBIST*/
realMain();
/* USER CODE END */
}
Thanks - Warren
CCS 6.1.1.00022
Hercules TMS570LC43xx
Tv 5.2.6