Tool/software: Code Composer Studio
I have a C28 program that can write to the flash memory of a device, which is placed in Sector A of the C28 flash. I used it once to write some flash in Sector B of the C28 flash bank on the F28M36. The CSM in particular was not affected. No flash programming has been done since then.
Since that time, I have been unable to reliably connect to the device. After launching the Target Configuration, when connecting to the device, the stock GEL file hangs in the "OnTargetConnect()" function. By placing debug in the GEL file, I found that it was because the following lines get stuck:
*(unsigned long *)0x4920 |= 0x00000015; /* Initialize M0, M1, CtoM MSG RAM's */ while(*(unsigned long *)0x4930 != 0x15);
Changing 0x15 to 0x10 to avoid init'ing the CtoM Msg RAMs allows the function to proceed but there are still problems.
All the flash reports as filled with zeros. This isn't true, because, following this post, I used the "Load RAM Only" option in the Target Configuration, and it did load once only. Flash contents were normal, and the CSM area at 0x13fff2 was filled with 0xFF.
Moreover, I added a GEL function to write some data to the M0 RAM (which is still init'd):
hotmenu C28x_Ram_Init_estop0()
{
GEL_MemoryFill(0x000000, 1, 0x001000, 0x7625);
}
After connecting and running this function, the memory browser shows data like this:
0x00000000 7625 7625 0000 0000 0000 0000 0000 0000 7625 7625 7625 7625 0x0000000C 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 0x00000018 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 0x00000024 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 0x00000030 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 0x0000003C 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 0x00000048 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 7625 0x00000054 7625 7625 0000 0000 0000 0000 0000 0000 7625 7625 7625 7625
The runs of zeros occur throughout the block, around every 0x48 words, but not always this number. Every time I refresh the memory browser, the positions of the zeros moves, but not by some fixed pattern that I can see. If there is a problem reading memory locations, this could explain the connection hang, but there is no explanation for why the memory reads are unreliable.
Nothing changed with the GEL files or the hardware from when it was working to when it wasn't. I also tried lowering the JTAG frequency by a factor of 10 and 100, both still showed the same thing with zeros appearing in otherwise uniform non-zero RAM.
The
I am using CCS6.2 and XDS100v3 probe. The hardware is an F28M36 controlCARD and the on-PCB XDS100v2 does the same thing. A different PCB (not a ControlCARD, but the same Concerto part can connect to the target fine).
What could cause such an effect and how can I fix it?