This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28P659DK-Q1: TMS320F28P659DK-Q1 Flash Programmer: Error erasing Bank 4 FMSTAT (STATCMD on some devices) value = 65 (decimal). Operation Cancelled (0).

Part Number: TMS320F28P659DK-Q1

Tool/software:

Hello,

I see the question was asked before but no solution was provided.  When I try to load program on 659D, I get the following error:

C28xx_CPU1: GEL Output:
Memory Map Initialization Complete
C28xx_CPU1: GEL Output: ... DCSM Initialization Start ...
C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...
C28xx_CPU1: GEL Output:
CPU2 is out of reset and configured to wait boot.
(If you connected previously, may have to resume CPU2 to reach wait boot loop.)
C28xx_CPU1: If erase/program (E/P) operation is being done on one core, the other core should not execute from shared-RAM (SR) as they are used for the E/P code. User code execution from SR could commence after the selected flash banks are programmed.
C28xx_CPU1: Only CPU1 on-chip Flash Plugin can configure clock for CPU1, and CPU2 Flash operations. Plugin automatically configures PLL when CPU1 Flash operations are invoked. However, if users want to do only CPU2 Flash operations without doing a prior CPU1 operation in the current session, they should click on 'Configure Clock' button in CPU1's on-chip Flash Plugin before invoking CPU2 Flash operations. When this button is used, Flash Plugin will configure the clock for CPU1/CPU2 at 200MHz using INTOSC as the clock source. Plugin will leave PLL config like this and user application should configure the PLL as required by application.
C28xx_CPU1: Before doing any flash operations using the flash plugin, (a) Please select which flash banks should be mapped to which CPU (CPU1 vs CPU2) - This selection should be done in CPU1 flash plugin GUI. (b) Please select the flash banks that the user would like the flash plugin to erase (in the CPU1 flash plugin GUI and the CPU2 flash plugin GUI)
C28xx_CPU1: GEL Output: ... DCSM Initialization Start ...
C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...
C28xx_CPU1: GEL Output:
CPU2 is out of reset and configured to wait boot.
(If you connected previously, may have to resume CPU2 to reach wait boot loop.)
C28xx_CPU1: GEL Output: ... DCSM Initialization Start ...
C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...
C28xx_CPU1: GEL Output:
CPU2 is out of reset and configured to wait boot.
(If you connected previously, may have to resume CPU2 to reach wait boot loop.)
C28xx_CPU1: GSxMSEL register configured correctly
C28xx_CPU1: BankMuxSel register configured correctly
C28xx_CPU1: Flash Programmer: Error erasing Bank 4 FMSTAT (STATCMD on some devices) value = 65 (decimal). Operation Cancelled (0).
C28xx_CPU1: File Loader: Memory write failed: Unknown error
C28xx_CPU1: GEL: File: D:\Dropbox\Projects\CODINGs\tiproj\f28p65x\MITRA\MITRA65_cpu1\CPU1_FLASH\MITRA65_cpu1.out: Load failed.

I don't have debug mode.  It will all be flash.  Banks 1, 2, and 3 are to CPU1, Banks 4 and 5 are to CPU2.

What should I do? Thanks

  • OK, I fixed it but this was not mentioned in any TI's responses or tools.

    So for anyone who has the same questions:

    1. Both CPUs need to be programmed by CPU1.  So in CPU1 project, add the code location for CPU2's out file.

    2. Of course you are aware about setting the flash programming registers in the debug window, flash settings.  But go lower. You need to remove the default bullet on erase all and only choose "erase necessary".  That was the issue.  CPU1 was trying to erase the range dedicated to CPU2, hence the bank 4 error I was getting.

    3. You'll find that CPU2's code keep enabling bank 0 tick mark in the flash tool.  The only way I got to disable that weird behavior was by eliminating access to flash protection registers from CPU2 since the address required access to bank 0!!