Hello,
I am developing a JTAG system for flashing the TMS320F28022 FLASH memory. I am not using any external debug probes, all hardware and software is developed in-house by my company.
Following your documentation I was able to develop a flashing software that I was able to download and execute to RAM memory of the device.
The device was already programmed and is placed inside a board of a customer (I am not using an evaluation board of yours) so I dumped the memory content and verified the flash content with my flashing software it with success. Then I erased the device and verified the content of the memory behing all 0xFFFF. I was able to access the device until I repowered it.
From that point on I get an error after some words written to RAM memory, I get a C_FAIL from MSR status register (value 0x5). After this error I read the SSR and the value is 0x00573E89.
The steps I am taking are:
- Reset the device with XRES while holding TRST HIGH;
- Reset JTAG state machine;
- Check IDCODE of device (always correct);
- Write DCSTRBS with 0xAA for connecting debug probe;
- Halt CPU writing MF_REG0 with EXE_HALT, CND_MASK = 0x3, QUAL_LD;
- I verify with SSR reading that the EXE_HALT has been set;
- I write MF_REG0 with just SYNC_LD value set (for clearing of SSR sticky bit);
- I write DC_STRBS with CRDY_ACT and CRES_ACT (for clearing of SSR sticky bits);
- I read SSR value being: 0x00572E89;
- At this point I start writing to RAM with SYS_ACC_W_ADDR16 and SYS_ACC_W_DATA for the two EXSR to be used and the GPSR value associated with EXSR SYS_ACC_W_ADDR16 is address, MU_MUCYC_DATA (0x1), MU_NO_ID, MU_MUHP, MU_MUHPI, MU_MUDBG.
After some words written with this method (remember that I am downloading a flashing software to RAM, starting from 0x8000 address) I get C_FAIL from MSR register as above.
Is there something that I am missing or something that I need to perform in order to avoid this behavior?
If I ignore the C_FAIL error I end up with the device RAM memory (apparently) written with many uncorrect words.
Thank you.
EDIT: I wold like to specify the fact that after IDCODE read, every time that I end up in run-test-idle state I send 16 CLK cycles to the MCU as I read in other threads that this should be done.