Sometimes program load into & run from flash very smoothly but after 10 to 12 attempts of load & run cycle compiler throws an error with saying "C28xx: Flash Programmer: Error encountered when writing to flash memory". Then once it start to throws an error it does continuously & at some point it again starts to successfully load & run program from flash.
I have tried different controller card(tms320f28027) & different JTAG board(xds100v1 usb) & also restart PC many times but didn't get any permanent solution.