Hello,
I am currently evaluating the TMS570LS04x by way of the Hercules Launchpad. I am using the IAR compiler, version 6.70.
I've been following the Project 0 slides for "Exercise: PWM Generation using the N2HET", found here: http://processors.wiki.ti.com/images/2/26/Hercules_LaunchPad_Proj0.pdf
I am finding that the call to hetInit() is generating a processor exception when attempting to program the HET program memory. Specifically, the call in the HALCoGen code:
/** - Fill HET RAM with opcodes and Data */
/*SAFETYMCUSW 94 S MR:11.1,11.2,11.4 <APPROVED> "HET RAM Fill from the table" */
/*SAFETYMCUSW 95 S MR:11.1,11.4 <APPROVED> "HET RAM Fill from the table" */
/*SAFETYMCUSW 95 S MR:11.1,11.4 <APPROVED> "HET RAM Fill from the table" */
memcpy((void *)hetRAM1, (const void *)het1PROGRAM, sizeof(het1PROGRAM));
Tracing through the assembly it ultimately comes down to the first store into hetRAM1. Replacing memcpy() with my own, simplified routine results in the same error.
static void my_memcpy(void *dst, const void *src, int len)
{
uint32 *dptr = (uint32 *)dst;
const uint32 *sptr = (uint32 *)src;
int i;
len >>= 2;
for (i = 0; i < len; ++i)
{
*dptr++ = *sptr++;
}
}
The exception winds up at address 0x10, which appears to be for Data Abort.
Is there something I am doing wrong? Is there something I need to do to unlock the ability to write to this memory region? I found another thread describing the need to clear PPF in HETGCR, however this is already cleared for me.
Thank you.