Programming or erasing (running any flash API functions) of flash on CPU2 is not possible on TMS320F28377D MCU if the flash of CPU1 is not programmed with the proper application. If the flash of CPU1 is blank, then the device is trying to boot from flash which does not contain any valid code and hence ends up hitting an illegal opcode resulting in the flag C1_BOOTROM_IN_AN_ITRAP being set. This can be read from the location 0x2C (TRM Page 541). If I program customer application file, I am able to call flash API functions for CPU2. Otherwise, the Program Counter does not move when I am trying to execute code on CPU2.
In the Technical Reference Manual, it is described that it is possible to avoid booting from flash by writing into the address 0xD00 either EMU_KEY value to other than 0x5A or to change the EMU_BMODE = 0x02 (WAIT BOOT) but it does not seem to help. I am trying to modify EMU_KEY or EMU_BMODE immediately after entering debug mode through CPU1 by writing 0x000000AA into DC_STRBS.