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.

Concerto M3 core load fail

Other Parts Discussed in Thread: UNIFLASH, CODECOMPOSER

Hi,

I have a problem while debugging M3 core of F28M35H52 device.

I have a custom board and I use XDS100v2 to connect the device. My program is very simple: it is a modified Blinky example with minor modifications, primarily - more pins are assigned to C28x core.

So, I could load th program several times and the debugging worked allright. At some piont the load failed with the following message:

Cortex_M3_0: Flash operation timed out waiting for the algorithm to complete. Operation cancelled.
Cortex_M3_0: Error during Flash verification (Flash algorithm returned error condition). Operation cancelled.
Cortex_M3_0: Flash verification returned error condition. Operation cancelled.
Cortex_M3_0: Please make sure the memory location you are programming have not already been programmed.
Cortex_M3_0: Error during Flash verification (Flash algorithm returned error condition). Operation cancelled.
Cortex_M3_0: Flash verification returned error condition. Operation cancelled.
Cortex_M3_0: Please make sure the memory location you are programming have not already been programmed.

Also, when I connected to the core (after the problem appeared, but before I closed the debugging session), I could check the contents of core and ADC_result registers, but not of GPIO, CAN etc.

I tried to use Uniflash and it helped: I can erase the device and load a program to it (LED blinks), but I cannot access it from CCS. I use CodeComposer v. 5.5.0.00077 and I did not update or modify any CCS components between the successful and unsuccessful device loads.

  • Sergey,

    So to clarify, are you saying that you are able to load your program with UniFlash but not with CCS?

    If this is the case, I'm wondering if you can try downloading the latest CCSv6 version and see if the behaviour is better with the latest version. UniFlash 3.1 is closer to CCS6.0 than it is with CCS5.5, so it might be worth a try. Although if you have all the updates in CCS5.5, the support should be similar.

    Please let me know if you are able to try this.

    Thanks,

    Ricky

  • Hi, Ricky

    Yes, Uniflash does the job while CCS does not. I tried to update my current CCS, but it did not help. I'll try complete reinstallation in a couple of days.

    Just one last notion: C28x core can be debugged from CCS without any problems.

  • Sergey,

    If you are reinstalling CCS, I do recommend installing CCSv6 (latest version is 6.0.1) instead. You should be able to keep both CCS5.5 and CCS6.0 installed at the same time without problems. And since you are using the XDS100v2 emulator, you should be able to use the free license for CCSv6.0, which is automatically generated for you when start CCS.

    Thanks,

    Ricky

  • Finally, I installed CCS 6. However, when I load the program from CCS6 I get the following problem:

    Cortex_M3_0: Writing buffered data @ Address 0x0027FF08 of Length 0x00000008
    Cortex_M3_0: Perform Blank Check at address 0x0027FF08 of length 0x00000008
    Cortex_M3_0: Verifying Flash @ Address 0x0027FF08 of Length 0x00000008
    Cortex_M3_0: Error during Flash verification (Flash algorithm returned error condition). Operation cancelled.
    Cortex_M3_0: Flash verification returned error condition. Operation cancelled.
    Cortex_M3_0: Please make sure the memory location you are programming have not already been programmed.

    If I load the program from Uniflash, I can then debug it from CCS.

    Currently we don't use any OTP features, all values both for CCS and Uniflash for OTP are set to 0xFFFFFFFFF and have not ever been modified.

  • Calling for help again. The problem still remains and I cannot load a program to M3 core from CCS.

    The problem lines are as follows:

    Cortex_M3_0: Writing buffered data @ Address 0x00200030 of Length 0x00000008
    Cortex_M3_0: Perform Blank Check at address 0x00200030 of length 0x00000008
    Cortex_M3_0: Verifying Flash @ Address 0x00200030 of Length 0x00000008
    Cortex_M3_0: Error during Flash verification (Flash algorithm returned error condition). Operation cancelled.
    Cortex_M3_0: Flash verification returned error condition. Operation cancelled.
    Cortex_M3_0: Please make sure the memory location you are programming have not already been programmed.
    Cortex_M3_0: Writing buffered data @ Address 0x0027FF08 of Length 0x00000008
    Cortex_M3_0: Perform Blank Check at address 0x0027FF08 of length 0x00000008
    Cortex_M3_0: Verifying Flash @ Address 0x0027FF08 of Length 0x00000008
    Cortex_M3_0: Error during Flash verification (Flash algorithm returned error condition). Operation cancelled.
    Cortex_M3_0: Flash verification returned error condition. Operation cancelled.
    Cortex_M3_0: Please make sure the memory location you are programming have not already been programmed.
    Cortex_M3_0: Writing buffered data @ Address 0x0027FFD8 of Length 0x00000008
    Cortex_M3_0: Perform Blank Check at address 0x0027FFD8 of length 0x00000008
    Cortex_M3_0: Verifying Flash @ Address 0x0027FFD8 of Length 0x00000008

    I managed to get rid of  0x0027FF08 problem when I commented out the following lines in the linker file.

    //--retain=dcsm_z2_secvalues.obj(.z2secvalues,.z2_csm_rsvd)

    // .z2secvalues : > CSM_ECSL_Z2
    // .z2_csm_rsvd : > CSM_RSVD_Z2

     

    But I don't know, what the problem with the RESET_ISR ( @ Address 0x00200030 of Length 0x00000008) could be and how could it be solved.

    I stil can load program from Uniflash and debug it from CCS.

    There is no difference in CCS and Uniflash outputs.

    I enclose the load program output and the linker cmd file, just in case.

    4544.load_program_output.txt
    Cortex_M3_0: GEL Output: Watchdog Timers Enabled
    Cortex_M3_0: GEL Output: UARTs Enabled
    Cortex_M3_0: Writing Flash @ Address 0x00200030 of Length 0x00000006
    Cortex_M3_0: Backed up values: 0x00000003, 0x0000000A, 0x00000000, 0x00000000
    Cortex_M3_0: Erasing Flash Bank 0, Sector N
    Cortex_M3_0: Erasing Flash Bank 0, Sector M
    Cortex_M3_0: Erasing Flash Bank 0, Sector L
    Cortex_M3_0: Erasing Flash Bank 0, Sector K
    Cortex_M3_0: Erasing Flash Bank 0, Sector J
    Cortex_M3_0: Erasing Flash Bank 0, Sector I
    Cortex_M3_0: Erasing Flash Bank 0, Sector H
    Cortex_M3_0: Erasing Flash Bank 0, Sector G
    Cortex_M3_0: Erasing Flash Bank 0, Sector F
    Cortex_M3_0: Erasing Flash Bank 0, Sector E
    Cortex_M3_0: Erasing Flash Bank 0, Sector D
    Cortex_M3_0: Erasing Flash Bank 0, Sector C
    Cortex_M3_0: Erasing Flash Bank 0, Sector B
    Cortex_M3_0: Erasing Flash Bank 0, Sector A
    Cortex_M3_0: Data has been buffered at the end of the current data block for 64-bit aligned writes.
    Cortex_M3_0: Finish Writing Flash @ Address 0x00200030 of Length 0x00000006
    Cortex_M3_0: Writing Flash @ Address 0x00201000 of Length 0x000001B0
    Cortex_M3_0: Verifying Flash @ Address 0x00201000 of Length 0x000001B0
    Cortex_M3_0: Finish Writing Flash @ Address 0x00201000 of Length 0x000001B0
    Cortex_M3_0: Writing Flash @ Address 0x00201200 of Length 0x000001E0
    Cortex_M3_0: Verifying Flash @ Address 0x00201200 of Length 0x000001E0
    Cortex_M3_0: Finish Writing Flash @ Address 0x00201200 of Length 0x000001E0
    Cortex_M3_0: Writing Flash @ Address 0x00204000 of Length 0x00004E88
    Cortex_M3_0: Verifying Flash @ Address 0x00204000 of Length 0x00002800
    Cortex_M3_0: Verifying Flash @ Address 0x00206800 of Length 0x00002688
    Cortex_M3_0: Finish Writing Flash @ Address 0x00204000 of Length 0x00004E88
    Cortex_M3_0: Writing buffered data @ Address 0x00200030 of Length 0x00000008
    Cortex_M3_0: Verifying Flash @ Address 0x00200030 of Length 0x00000008
    Cortex_M3_0: Error during Flash verification (Flash algorithm returned error condition). Operation cancelled.
    Cortex_M3_0: Flash verification returned error condition. Operation cancelled.
    Cortex_M3_0: Please make sure the memory location you are programming have not already been programmed.
    
     

  • Sergey,

    May be you did not unlock before trying to erase/program.  Check the password locations in Flash and unlock the Flash before trying to erase/program.

    Thanks and regards,

    Vamsi 

  • Hi, Vamsi

    The software for the controller is still in design process, so we don't use passwords yet. All fields for both Security Settings Zone 1 and 2 equal to 0xFFFF FFFF both in CCS and Uniflash. And I checked that I have Unlock functions in GEL file in the function that is called before program load.

    Also, I can easily debug from CCS, so it is not locked.

  • Sergey,

    I have a few suggestions:

    1. Can you check to make sure that the Flash options are the same between CCS and UniFlash? You can bring up the Flash options in CCS by going to Tools -> On-Chip Flash after launching the debug session. You can then compare it with the values in UniFlash GUI.

    2. The error mentions that verification fails. Can you try turning off the verification option in the On-Chip Flash settings and see what happens.

    3. Is Auto ECC Generation option on? Maybe this is preventing verification from passing.

    4. Are you able to share the program you are loading? You mentioned it is a modified blinky example, so hopefully, there isn't too much problems with sharing it. I want to see if I can reproduce the problem on my end.

    Thanks,

    Ricky

  • Hi, Ricky

    1. I checked the flash options. they are the same

    2. If I turn the verification off, the error disappears, but I can't debug the program.

    3. Auto ECC generation was on. When I turned it off, the verification warning disappeared. However, if i load the program from CCS, the processor hangs short after start (I can step functions, but if press run, it hangs before all init routines get finished)

    4. Well, I made some progress theough design, so it's a bit far blinky now, but I'll prepare a cut version of the project and post it here tomorrow.

  • Ricky, 

    your ECC suggestion inspired me to investigate flash and ECC features a bit more and I got one result, thet might be helpful: 

    When I turned ECC off (I commented out the line    

    HWREG(FLASH_ERROR_BASE + FLASHERR_O_ECC_ENABLE) = 0xA; 

    from the FlashInit function) I was able to load and debug the program with auto ECC generation option off. However, it seems that it runs only with a debugger connected. If I disconnect and repower the board, the LED does not blink. If I enable Auto ECC generation, the load fails.

    Here is the blinky version of the project. I still cannot loar it ot the cotroller

    0143.RobyHeadS_CoreARM_rev.1.0.rar

  • Sergey,

    The results from your investigation seems to confirm that the issue is related to ECC generation, although it's still perplexing that the same program would load properly in UniFlash, since the implementation should mostly be the same.

    If you are able to provide a small sample program that illustrates the problem, I can see if I can reproduce it on my end.

    Thanks,
    Ricky

  • Ricky,

    I attached a small version of my project to my previous message. It behaves at load process as I described before. 

  • Sergey,

    The attached program you provided loads fine on my F28M35x device.

    This is the output I got with verbose mode on, can you compare it to the output you are getting?

    Cortex_M3_0: Writing Flash @ Address 0x00200030 of Length 0x00000006
    Cortex_M3_0: Backed up values: 0x00000003, 0x0000000A, 0x00000000, 0x00000000
    Cortex_M3_0: Erasing Flash Bank 0, Sector N
    Cortex_M3_0: Erasing Flash Bank 0, Sector M
    Cortex_M3_0: Erasing Flash Bank 0, Sector L
    Cortex_M3_0: Erasing Flash Bank 0, Sector K
    Cortex_M3_0: Erasing Flash Bank 0, Sector J
    Cortex_M3_0: Erasing Flash Bank 0, Sector I
    Cortex_M3_0: Erasing Flash Bank 0, Sector H
    Cortex_M3_0: Erasing Flash Bank 0, Sector G
    Cortex_M3_0: Erasing Flash Bank 0, Sector F
    Cortex_M3_0: Erasing Flash Bank 0, Sector E
    Cortex_M3_0: Erasing Flash Bank 0, Sector D
    Cortex_M3_0: Erasing Flash Bank 0, Sector C
    Cortex_M3_0: Erasing Flash Bank 0, Sector B
    Cortex_M3_0: Erasing Flash Bank 0, Sector A
    Cortex_M3_0: Data has been buffered at the end of the current data block for 64-bit aligned writes.
    Cortex_M3_0: Finish Writing Flash @ Address 0x00200030 of Length 0x00000006
    Cortex_M3_0: Writing Flash @ Address 0x00201000 of Length 0x000001B0
    Cortex_M3_0: Verifying Flash @ Address 0x00201000 of Length 0x000001B0
    Cortex_M3_0: Finish Writing Flash @ Address 0x00201000 of Length 0x000001B0
    Cortex_M3_0: Writing Flash @ Address 0x00201200 of Length 0x000005D8
    Cortex_M3_0: Verifying Flash @ Address 0x00201200 of Length 0x000005D8
    Cortex_M3_0: Finish Writing Flash @ Address 0x00201200 of Length 0x000005D8
    Cortex_M3_0: Writing Flash @ Address 0x00204000 of Length 0x00006AB8
    Cortex_M3_0: Verifying Flash @ Address 0x00204000 of Length 0x00002800
    Cortex_M3_0: Verifying Flash @ Address 0x00206800 of Length 0x00002800
    Cortex_M3_0: Verifying Flash @ Address 0x00209000 of Length 0x00001AB8
    Cortex_M3_0: Finish Writing Flash @ Address 0x00204000 of Length 0x00006AB8
    Cortex_M3_0: Writing buffered data @ Address 0x00200030 of Length 0x00000008
    Cortex_M3_0: Verifying Flash @ Address 0x00200030 of Length 0x00000008

    Thanks,

    Ricky

  • I get the same output, as I provided a couple replies before:

    Cortex_M3_0: Writing Flash @ Address 0x00200030 of Length 0x00000006
    Cortex_M3_0: Backed up values: 0x00000003, 0x0000000A, 0x00000000, 0x00000000
    Cortex_M3_0: Erasing Flash Bank 0, Sector N
    Cortex_M3_0: Erasing Flash Bank 0, Sector M
    Cortex_M3_0: Erasing Flash Bank 0, Sector L
    Cortex_M3_0: Erasing Flash Bank 0, Sector K
    Cortex_M3_0: Erasing Flash Bank 0, Sector J
    Cortex_M3_0: Erasing Flash Bank 0, Sector I
    Cortex_M3_0: Erasing Flash Bank 0, Sector H
    Cortex_M3_0: Erasing Flash Bank 0, Sector G
    Cortex_M3_0: Erasing Flash Bank 0, Sector F
    Cortex_M3_0: Erasing Flash Bank 0, Sector E
    Cortex_M3_0: Erasing Flash Bank 0, Sector D
    Cortex_M3_0: Erasing Flash Bank 0, Sector C
    Cortex_M3_0: Erasing Flash Bank 0, Sector B
    Cortex_M3_0: Erasing Flash Bank 0, Sector A
    Cortex_M3_0: Data has been buffered at the end of the current data block for 64-bit aligned writes.
    Cortex_M3_0: Finish Writing Flash @ Address 0x00200030 of Length 0x00000006
    Cortex_M3_0: Writing Flash @ Address 0x00201000 of Length 0x000001B0
    Cortex_M3_0: Perform Blank Check at address 0x00201000 of length 0x000001B0
    Cortex_M3_0: Verifying Flash @ Address 0x00201000 of Length 0x000001B0
    Cortex_M3_0: Finish Writing Flash @ Address 0x00201000 of Length 0x000001B0
    Cortex_M3_0: Writing Flash @ Address 0x00201200 of Length 0x000005E0
    Cortex_M3_0: Perform Blank Check at address 0x00201200 of length 0x000005E0
    Cortex_M3_0: Verifying Flash @ Address 0x00201200 of Length 0x000005E0
    Cortex_M3_0: Finish Writing Flash @ Address 0x00201200 of Length 0x000005E0
    Cortex_M3_0: Writing Flash @ Address 0x00204000 of Length 0x00007038
    Cortex_M3_0: Perform Blank Check at address 0x00204000 of length 0x00007038
    Cortex_M3_0: Verifying Flash @ Address 0x00204000 of Length 0x00002800
    Cortex_M3_0: Verifying Flash @ Address 0x00206800 of Length 0x00002800
    Cortex_M3_0: Verifying Flash @ Address 0x00209000 of Length 0x00002038
    Cortex_M3_0: Finish Writing Flash @ Address 0x00204000 of Length 0x00007038
    Cortex_M3_0: Writing buffered data @ Address 0x00200030 of Length 0x00000008
    Cortex_M3_0: Perform Blank Check at address 0x00200030 of length 0x00000008
    Cortex_M3_0: Verifying Flash @ Address 0x00200030 of Length 0x00000008
    Cortex_M3_0: Error during Flash verification (Flash algorithm returned error condition). Operation cancelled.
    Cortex_M3_0: Flash verification returned error condition. Operation cancelled.
    Cortex_M3_0: Please make sure the memory location you are programming have not already been programmed.

    I suspect, this is not a problem in the program code, but either in program loading software or in the PCB (which is less likely in my opinion) or in the debugger hardware (I use XDS100v2). Could you recommend what else to inspect? Maybe there some differences in ECC generation algorithms?

  • Sergey,

    Is the output you posted for your original program, or the program you attached for me? The sections being written to is a little different between the two outputs. I would be great if you can provide the output for loading the program you provided. To confirm, I was loading RobyHeadS_CoreARM_rev.1.0.out in the Debug folder.

    As for your questions, the loader program so be the same between the version of CCS you are using to the one I am using, as well as what UniFlash is using, including the ECC generation code. Also, I was using XDS100v2 as well.

    Thanks,

    Ricky