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.

TMS320F28065: SCI upgrade issues

Part Number: TMS320F28065
Other Parts Discussed in Thread: UNIFLASH, TMS320F28035, , C2000WARE

We are trying to upgrade software via the SCI interface using the TI Serial Flash Programmer PC software.  When we tried to download software after we got the SCI mode working, we got to the point that the Programmer software succeeded to load the kernel (from what we understand, 'kernel A' as described in the flash programming notes) to the RAM and then seemed to load the application. 

1.  The program was apparently not actually loaded; when we loaded another version, the Programmer stopped at the beginning of loading the application.  When we loaded the same version that was already burned on the board, the programming finished the process.  What was missing to allow the flash to actually be programmed? 

2.  We then started over by totally erasing the board and then trying to see if programming worked.  Now the kernel does not even load; SCM locked?

I saw something about this in one of your answers but since I am only a 'user' of this board and not a developer, I need help sifting through the material to find out what we need to do to burn the software on an erased board and on an already-burned board.  Does something on the board have to be configured before the download can work? 

3.  Should we be using different software than the Serial Flash Programmer?

4.  Please confirm that once this process works, the flash should be re-programmed and the board will come up with the upgraded software on the next normal (non-SCI) reset.

Thank-you -

Sharon

  • Sharon,

    This thread might be applicable in your case, assuming Code security is enabled in your case.

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/903018/3339295#3339295

    The Flash Kernel is loaded into RAM by the ROM SCI Bootloader. However, the ROM cannot access RAM that is protected by the CSM. So, if code security is enabled in your case we need to check if the kernel is using RAM that is Secure RAM.

    Please let me know if in general the device is locked by CSM.

    Thanks,

    Sira

  • Thank-you.  We are checking into this.  In the meantime, more information for you:

    1.  The process progresses as follows since we erased the board (whereas before the process worked but did not seem to actually burn the software):

    Kernal AutoBaud Successful

    Kernal Loaded

    Done Waiting for kernel boot...attempting autobaud

    Board doesn't respond at that point and I have to abort process.

    I am using the following command line:

    serial_flash_programmer.exe -d f2806x -k f28069_flash_kernel.txt -a myapp.txt -p COM3 -b 9600 -w -v

    Our CPU is F28065. 

    2.  What flash kernel should we be using?  Where is the source code for it so we can build it, or can we just use an .out file that you may have?

    Thanks -

    Sharon

  • Sharon,

    1. What is the history on this? Are these production boards that had firmware upgrades in the past? Was the process working in the past with the upgrades on programmed boards?

    2. Which f28069_flash_kernel.txt have you been using all along?

    I would suggest building (using the latest CCS, atleast v9.3) and using the generated .txt.

    3. How are you erasing the board? Using UniFlash? Are you confirming that the Flash is indeed erased and contains only 0xFFFFs?

    4. Does the issue you describe occur across boards? Have you tried multiple boards?

    5. So you are saying if the board is Erased, the Kernel will download to RAM, but the process will stop there.

    If the board is NOT erased, and a different Firmware version is used, then the Kernel will download to RAM, but the process will stop there.

    If the board is NOT erased, and the same Firmware is used, then the Kernel will download to RAM, and the App will download to Flash.

    Correct? In the last case, have you checked if the App continues to work normally as before? Can you send Windows command screenshots of the two separate scenarios above?

    Thanks,

    Sira

  • Thanks, Sira, for your response.

    Latest run results yielded the following last line of programming application output:

    ‘Application Autobaud Successful’

    followed by data to board, then nothing…board did not respond to application data.

    The application was erased; we had to re-program via JTAG.

     

    To answer your questions:

     

    Answers:

    1.      It’s the first time we’re trying to upgrade via SCI with this specific proprietary board, incorporating a 28065 MCU.

    Several years ago, we successfully upgraded a different proprietary board with an embedded 28035 MCU.

    2.      Using TI’s given “f28069_sci_flash_kernel” example from the brand new C2000 Ware v3.02 and CCS v9.3 we built a new flash kernel after selecting 28065.

    Which CMD file should be used?

    3.      Generally speaking, we use Uniflash v5.0.0.2289 for burn and erasure.

    However, as we understand it (utilities readme: “… F2802x, F2803x, F2805x, F2806x Usage: …”), it’s essential not to erase the firmware beforehand. Hence, “first” programming should be done using JTAG.

    Are we correct?

    4.      We shall try using several similar boards. However, it seems like a memory mapping problem because the communication works fine and the kernel is successfully downloaded.

    5.      We don’t seem to have enough success/fail statistics to give a profound answer.


     

  • Sharon,

    Thanks for getting back.

    "2. Which cmd file should be used?"

    Not sure I understand the question - the SCI Flash kernel project uses F28069_RAM_lnk.cmd by default. That's what you would use.

    The memory mapping issue is a likely cause. I've seen it cause issues in my own experience and also with some other users. Can you inspect your App's .cmd file and compare it against F28069_RAM_lnk.cmd (you can also compare the generated .map files in both cases), and try to ensure separation and non-overlap between memory sections (to the extent possible). See if that helps.

    Thanks,

    Sira

  • Sorry for the delay, Sira - the developer is on sick leave and hasn't had a chance to reply with technical details.  However, he did explain that the software is running on what is configured by the CPU as SCM (?) memory because of the size of his code.  From what I understood, there is a part of the memory space that is not locked and part that can be locked.  Since his code is too big to fit in the first part, it runs over to the second part.

    He did re-build the F28069 kernel but this had no effect - the loading stopped after verifying the 'Application Auto-Baud' and trying to burn the first block.

    Note that the erase did work, but the programming did not.

    What has to happen in order for this memory to be unlocked?  Is this a change in the kernel or how the application is built?

    Thank-you -

    Sharon

  • Sharon,

    I think he was referring to CSM - the code security module. The device is probably locked by CSM. So there are two ways of programming the device - unlocking the device, or without unlocking the device. The preferred method is without unlocking the device.

    Without unlocking the device, the ROM SCI Bootloader can’t load data into L0/L1 RAM (which is used by the SCI Flash Kernel), so unsecure RAM M0/M1 will have to be used. I changed the .cmd file for the SCI Flash Kernel to do this and rebuilt it. It is attached. Can you try this?

    Earlier you mentioned that the SCI Flash Kernel was able to be downloaded to RAM. I am not sure if this was actually happening.

    f28069_sci_flash_kernel.txt
    
    AA 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6F 04 02 00 
    00 00 00 00 40 00 AE 03 
    B6 00 00 00 B9 03 0C FE 40 76 55 01 22 76 BC 9A A8 28 20 01 1F 76 34 00 
    04 1E 1F 76 34 00 00 02 02 1E 1A 76 69 FF 0F 9A 00 8F 04 E4 7F 76 BD FE 
    4A 96 00 52 E0 FF 99 00 40 76 FA 02 1F 76 90 03 02 C5 67 3E 48 96 EF FF 
    8D 00 A9 1B 00 04 5E 69 40 76 D8 02 46 1E 4C 2B 2E 6F 00 8F 00 E0 44 A8 
    BF 56 4B 01 4B 1B 00 04 10 66 1F 76 90 03 02 C5 67 3E 49 96 44 C5 A7 06 
    01 09 44 1E 49 92 C7 96 4B 0A 4B 1B 00 04 F2 69 00 8F 04 E4 80 76 00 04 
    42 A8 40 8F 00 E0 A6 06 46 8A 7F 76 BB FE 4A 96 00 52 62 60 00 8F 00 04 
    A9 A8 46 07 46 1E 40 76 FA 02 4C 0A 48 92 C9 FF 4C 54 D0 66 00 8F 00 E0 
    44 A8 BF 56 4B 01 0D 6F 1F 76 90 03 02 C5 67 3E 49 96 44 C5 A7 06 01 09 
    44 1E 49 92 C7 96 4B 0A 48 CC FF 03 4B 54 F1 67 00 8F 04 E4 42 A8 40 8F 
    00 E0 48 CC FF 03 46 8A A9 0E 7F 76 BB FE 4A 96 00 52 32 60 40 76 FA 02 
    27 6F 40 76 D8 02 46 1E 00 8F 00 E0 44 A8 BF 56 4B 01 0D 6F 1F 76 90 03 
    02 C5 67 3E 49 96 44 C5 A7 06 01 09 44 1E 49 92 C7 96 4B 0A 48 92 4B 54 
    F2 67 00 8F 04 E4 42 A8 40 8F 00 E0 48 0E 46 8A 7F 76 BB FE 4A 96 00 52 
    0B 60 40 76 FA 02 1F 76 90 03 02 C5 67 3E 48 96 00 52 E0 FF 74 FF 8C FE 
    06 00 01 19 C3 56 FF FF 06 00 
    69 03 00 00 50 00 40 76 74 00 22 76 1F 76 C0 01 1C 1A 08 00 FD 76 80 7C 
    69 FF 67 3E 1F 76 C0 01 1C 18 F7 FF 1A 76 69 FF 40 76 86 01 12 9A 02 9B 
    40 76 7C 00 40 76 FF 00 06 00 22 76 1F 76 C0 01 BF 56 25 55 BF 56 25 AA 
    1A 76 69 FF 06 00 22 76 1F 76 C0 01 BF 56 29 68 1A 76 69 FF 06 00 02 FE 
    42 97 41 96 1F 76 C0 01 11 43 06 6C 22 76 11 1A 10 00 1A 76 25 76 11 CC 
    80 01 C6 FF 05 61 22 76 11 18 7F FE 1A 76 41 0E A6 1E 21 92 1F 90 A9 80 
    A6 06 A7 0F 16 61 22 76 11 1A 40 00 41 92 21 CD E0 FF 1F 90 A8 CA 21 96 
    1A 76 69 FF 40 76 74 00 11 92 01 90 01 52 FD 60 22 76 11 18 BF FF 1A 76 
    42 92 01 52 03 61 02 52 09 60 22 76 03 90 11 CD 7F FE 86 FF A8 CA 11 96 
    1A 76 42 92 03 52 12 60 22 76 11 CC 7F FE A9 1A 00 01 11 96 00 8F 82 03 
    69 FF A9 A8 40 76 6B 04 1F 76 C0 01 11 1A 80 01 1A 76 82 FE 69 FF 06 00 
    04 FE 43 7C 42 97 41 96 22 76 1F 76 22 00 01 4E 03 6C 01 18 FF BF 1F 76 
    C0 01 30 1A 04 00 03 90 30 CD FC FF A8 CA 30 96 42 92 0F 90 32 CD F0 FF 
    A8 CA 32 96 69 FF 40 76 74 00 34 92 01 90 01 52 FD 60 1F 76 22 00 43 92 
    01 CD FF BF 01 90 8D FF A8 CA 01 96 1A 76 69 FF 84 FE 06 00 22 76 1F 76 
    C0 01 BF 56 1B 02 10 CC FC FF 02 50 10 96 1D 1A 01 00 1D 1A 02 00 1D 1A 
    04 00 1D 1A 08 00 1D 1A 10 00 1D 1A 20 00 1D 1A 40 00 1D 1A 80 00 1C 1A 
    01 00 1C 1A 04 00 1D 1A 00 40 1D 1A 00 80 1D 1A 00 01 1D 1A 00 02 1D 1A 
    00 04 19 1A 00 01 19 1A 00 02 19 1A 00 04 19 1A 00 08 1C 1A 08 00 20 1A 
    01 00 20 1A 02 00 20 1A 04 00 20 1A 00 01 20 1A 00 02 20 1A 00 04 20 1A 
    00 08 20 1A 00 40 20 1A 00 80 1C 1A 10 00 1C 1A 00 01 1C 1A 00 02 1C 1A 
    00 04 1C 1A 00 08 1C 1A 00 10 1C 1A 00 40 1C 1A 04 00 1A 76 69 FF 06 00 
    02 FE 22 76 1F 76 2B 00 20 28 FF FF 21 28 FF FF 22 28 FF FF 23 28 FF FF 
    24 28 FF FF 25 28 FF FF 26 28 FF FF 27 28 FF FF 1A 76 1F 76 FF FD 38 92 
    41 96 39 92 41 96 3A 92 41 96 3B 92 41 96 3C 92 41 96 3D 92 41 96 3E 92 
    41 96 3F 92 41 96 1F 76 2B 00 2F 40 03 6D 01 9A 02 6F 00 9A 82 FE 69 FF 
    06 00 22 76 1F 76 C0 01 12 18 FF FE 12 18 FE FF 12 1A 00 20 12 1A 00 40 
    12 1A 00 04 1A 76 69 FF 06 00 22 76 1F 76 C0 01 12 1A 00 60 12 18 FF 9F 
    12 1A 00 60 12 18 FF 9F 12 1A 00 60 12 18 FF FB 12 1A 02 00 12 1A 01 00 
    12 18 FB FF 12 18 FF FE 1A 76 69 FF 06 00 22 76 1F 76 C0 01 12 18 FF BF 
    00 8F 4E 46 69 FF A9 A8 40 76 6B 04 1F 76 C0 01 12 1A 00 20 12 18 FD FF 
    12 1A 01 00 12 18 FB FF 12 1A 00 04 12 18 FF FE 1A 76 69 FF 06 00 22 76 
    1F 76 C0 01 10 1A 40 00 12 1A 00 40 12 18 FF DF 12 18 FD FF 12 1A 01 00 
    12 18 FB FF 12 1A 00 04 12 18 FF FE 1A 76 69 FF 06 00 22 76 1F 76 C0 01 
    1C 1A 00 04 BF 56 1B 02 1F 76 C1 01 1A 28 00 80 BF 56 10 07 BF 56 11 03 
    14 2B BF 56 11 23 1F 76 BE 01 0C 06 A8 18 FF CF 0C 1E 08 06 A8 1A 00 05 
    08 1E 05 1A 00 03 1A 76 69 FF 06 00 02 FE 1F 76 C1 01 BF 56 13 01 1C 1A 
    00 20 1C 1A 00 40 1C CC 00 80 CE FF 01 52 FC 60 1C 1A 00 40 1C 18 FF DF 
    15 CC 40 00 C5 FF 01 52 FC 60 17 C6 41 96 19 96 82 FE 06 00 02 FE 00 8F 
    63 02 1F 76 90 03 02 A8 40 76 E2 01 40 76 03 02 1F 76 90 03 00 2B 40 76 
    63 02 A9 88 00 8F AA 08 A9 A8 A6 0F 04 61 3F 8F F6 7F 09 6F 40 76 EA 02 
    40 76 D8 02 42 1E 40 76 B9 03 42 8A 82 FE A9 A8 06 00 02 FE 41 2B 42 2B 
    1F 76 C1 01 15 CC 40 00 C5 FF 01 52 FA 60 17 C6 41 96 19 96 15 CC 40 00 
    C5 FF 01 52 FC 60 17 C6 42 96 19 96 1F 76 90 03 41 92 00 94 42 94 00 96 
    03 56 42 08 41 98 41 92 82 FE 06 00 02 FE 41 2B 42 2B 1F 76 C1 01 15 CC 
    40 00 C5 FF 01 52 FA 60 17 C6 41 96 15 CC 40 00 C5 FF 01 52 FC 60 17 C6 
    42 96 1F 76 90 03 41 92 00 94 42 94 00 96 03 56 42 08 41 98 41 92 82 FE 
    06 00 AD 28 B0 04 69 FF 1F 56 16 56 1A 56 10 E6 00 02 40 29 1F 76 00 00 
    02 29 1B 76 40 76 B6 03 00 52 42 61 22 76 A9 28 95 04 A8 28 00 00 01 09 
    1B 61 C0 76 95 04 04 29 0F 6F 00 9B A9 24 01 DF 04 6C 04 29 A8 24 01 DF 
    A6 1E A1 F7 86 24 A7 06 A1 81 01 09 A7 1E A9 24 03 63 5C FF 04 3B A9 59 
    01 DF 09 00 EC FF A9 28 FF FF A8 28 FF FF 01 09 05 61 3F 8F FF FF 40 76 
    3B 03 1A 76 40 76 B8 03 A9 28 FF FF A8 28 FF FF 01 09 0E 61 FF 76 FF FF 
    06 6F 01 DF BD C3 A7 1E 67 3E BE C5 A9 24 01 DF A8 24 58 FF F7 60 40 76 
    7C 03 40 76 14 03 02 FE 1F 76 90 03 02 C5 67 3E 01 29 A9 25 42 1E 1F 76 
    90 03 02 C5 67 3E A9 0E 42 98 41 99 42 06 82 FE 06 00 02 FE BF 56 41 01 
    41 92 08 52 09 66 1F 76 90 03 02 C5 67 3E 41 0A 41 92 08 52 F9 69 82 FE 
    06 00 1F 76 C1 01 14 47 FD 6C 1F 76 90 03 00 C6 1F 76 C1 01 19 96 14 47 
    FF 6C 1F 76 90 03 00 CC 00 FF 1F 76 C1 01 C7 FF 19 96 1F 76 90 03 00 2B 
    06 00 00 77 00 6F BD B2 1F 76 90 03 A9 59 08 92 0D 61 AB 28 FF FF AA 28 
    FF FF A9 28 FF FF A8 28 FF FF AB 0F 03 61 7F 76 FF FF 1F 76 90 03 0E C5 
    67 3E 1F 76 90 03 0C 06 04 61 A7 1E A1 92 67 3E 1F 76 90 03 0A 06 03 61 
    A7 1E 67 3E 40 76 12 03 BE 8B 06 00 BD B2 BD AA BD A2 08 FE A4 82 00 D1 
    CB 5A 15 6F AD 5C 01 29 03 56 A1 03 A3 07 88 DC 02 09 A4 5C A9 83 08 02 
    40 76 5F 03 42 06 06 61 44 8A 46 83 40 76 5F 03 CB 5A 01 D9 A2 92 A1 54 
    EA 66 88 FE BE 82 BE 86 BE 8B 06 00 00 52 AB A8 A4 C5 07 61 A9 88 81 DE 
    85 5C 87 7C 0E 00 FE FF A9 88 A6 0F 0F 61 00 53 0D 61 FF 9D A8 5C BF 76 
    FE FF 85 92 87 96 0E 00 FE FF 85 92 87 96 0C 00 F8 FF A4 A9 06 00 AB 28 
    FF FF AA 28 FF FF A9 28 FF FF A8 28 FF FF AB 0F 04 60 00 BE 00 D4 09 6F 
    AB 28 FF FF AA 28 FF FF A4 A9 C4 88 02 09 A9 8A A6 92 40 76 95 03 06 00 
    40 76 74 00 40 76 86 01 12 9A 02 9B 40 76 7C 00 00 8F 06 07 A9 A8 40 76 
    6B 04 40 76 1F 02 06 00 1F 76 90 03 10 A8 06 00 1F 76 90 03 0E A8 06 00 
    06 00 1F 56 22 76 C0 B9 29 28 68 00 1A 76 40 00 82 02 01 9A 06 00 06 00 
    26 00 00 00 6F 04 AD 28 B0 04 1F 56 16 56 1A 56 40 29 1F 76 00 00 02 29 
    69 FF 40 76 95 03 CF 56 02 00 AD 28 B0 04 BD 2B BD 2B BD 1E 07 00 33 56 
    AC 1E A9 58 A9 59 A9 5A A9 5B A9 5C A9 5D A9 88 A9 80 1F 76 00 00 BD 2B 
    BD 28 0B 0A 00 76 13 76 06 00 
    1A 00 00 00 95 04 FF FF 08 E4 00 00 01 00 FE FF 0A E4 00 00 00 00 00 00 
    FE FF 0C E4 00 00 00 00 00 00 FE FF 0E E4 00 00 AD 03 00 00 FE FF 10 E4 
    00 00 AD 03 00 00 00 00 00 00 
    00 00 
    

  • Sharon,

    It appears CSM is enabled. In order to upgrade firmware:

    -SCI Flash Kernel needs to be loaded to Unsecure RAM (RAMM0, RAMM1). So .cmd of the Flash kernel project to be modified accordingly.
    -CsmUnlock(), present in F2806x_SysCtrl.c to be modified to include the correct CSM passwords. Rebuild the SCI Flash Kernel. This will unlock the device to allow erase and programming of Flash. What I said in my previous post will not work i.e. you will need to unlock the device to erase/program Flash. There are alternate ways of erase/programming Flash without unlocking the device, but those will require Flash APIs to be in Flash (not ROM), and copied to Secure RAM. So it will be convoluted for your case. I suggest trying to unlock the CSM and see if that approach works. You will need to find the CSM passwords from the developer.

    Thus, the .txt file I sent with my previous message will not work, because of step 2 above, where you will need to enter the CSM passwords, and rebuild the .txt.

    However, I am sending you the .cmd file corresponding to Step 1 above, for your convenience. In order for it to go through, I am renaming it to .txt. Please rename it to .cmd and include it in the SCI Flash Kernel project.

    Thanks,

    Sira

    28069_RAM_lnk.txt
    /*
    //###########################################################################
    //
    // FILE:    28069_RAM_lnk.cmd
    //
    // TITLE:   Linker Command File For F28069 examples that run out of RAM
    //
    //          This ONLY includes all SARAM blocks on the F28069 device.
    //          This does not include flash or OTP.
    //
    //          Keep in mind that L0,L1,L2,L3 and L4 are protected by the code
    //          security module.
    //
    //          What this means is in most cases you will want to move to
    //          another memory map file which has more memory defined.
    //
    //###########################################################################
    // $TI Release: F2806x Support Library v2.05.00.00 $ 
    // $Release Date: Thu Mar 19 07:33:23 IST 2020 $ 
    // $Copyright:
    // Copyright (C) 2009-2020 Texas Instruments Incorporated - http://www.ti.com/
    //
    // Redistribution and use in source and binary forms, with or without 
    // modification, are permitted provided that the following conditions 
    // are met:
    // 
    //   Redistributions of source code must retain the above copyright 
    //   notice, this list of conditions and the following disclaimer.
    // 
    //   Redistributions in binary form must reproduce the above copyright
    //   notice, this list of conditions and the following disclaimer in the 
    //   documentation and/or other materials provided with the   
    //   distribution.
    // 
    //   Neither the name of Texas Instruments Incorporated nor the names of
    //   its contributors may be used to endorse or promote products derived
    //   from this software without specific prior written permission.
    // 
    // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
    // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
    // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
    // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
    // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    // $
    //###########################################################################
    */
    
    /* ======================================================
    // For Code Composer Studio V2.2 and later
    // ---------------------------------------
    // In addition to this memory linker command file,
    // add the header linker command file directly to the project.
    // The header linker command file is required to link the
    // peripheral structures to the proper locations within
    // the memory map.
    //
    // The header linker files are found in <base>\headers\cmd
    //
    // For BIOS applications add:      F2806x_Headers_BIOS.cmd
    // For nonBIOS applications add:   F2806x_Headers_nonBIOS.cmd
    ========================================================= */
    
    /* ======================================================
    // For Code Composer Studio prior to V2.2
    // --------------------------------------
    // 1) Use one of the following -l statements to include the
    // header linker command file in the project. The header linker
    // file is required to link the peripheral structures to the proper
    // locations within the memory map                                    */
    
    /* Uncomment this line to include file only for non-BIOS applications */
    /* -l F2806x_Headers_nonBIOS.cmd */
    
    /* Uncomment this line to include file only for BIOS applications */
    /* -l F2806x_Headers_BIOS.cmd */
    
    /* 2) In your project add the path to <base>\headers\cmd to the
       library search path under project->build options, linker tab,
       library search path (-i).
    /*========================================================= */
    
    /* Define the memory block start/length for the F2806x
       PAGE 0 will be used to organize program sections
       PAGE 1 will be used to organize data sections
    
       Notes:
             Memory blocks on F28069 are uniform (ie same
             physical memory) in both PAGE 0 and PAGE 1.
             That is the same memory region should not be
             defined for both PAGE 0 and PAGE 1.
             Doing so will result in corruption of program
             and/or data.
    
             Contiguous SARAM memory blocks can be combined
             if required to create a larger memory block.
    */
    
    MEMORY
    {
    PAGE 0 :
       /* BEGIN is used for the "boot to SARAM" bootloader mode   */
    
       BEGIN       : origin = 0x000000, length = 0x000002
       RAMM0M1P    : origin = 0x000050, length = 0x000460
       RAML0_L5    : origin = 0x008000, length = 0x006000	 /* RAML0-5 combined  */
       RESET       : origin = 0x3FFFC0, length = 0x000002
       FPUTABLES   : origin = 0x3FD860, length = 0x0006A0	 /* FPU Tables in Boot ROM */
       IQTABLES    : origin = 0x3FDF00, length = 0x000B50    /* IQ Math Tables in Boot ROM */
       IQTABLES2   : origin = 0x3FEA50, length = 0x00008C    /* IQ Math Tables in Boot ROM */
       IQTABLES3   : origin = 0x3FEADC, length = 0x0000AA	 /* IQ Math Tables in Boot ROM */
    
       BOOTROM    : origin = 0x3FF3B0, length = 0x000C10
    
    
    PAGE 1 :
    
       BOOT_RSVD   : origin = 0x000002, length = 0x00004E     /* Part of M0, BOOT rom will use this for stack */
       RAMM1       : origin = 0x0004B0, length = 0x000300     /* on-chip RAM block M1 */
       RAML6       : origin = 0x00E000, length = 0x002000     /* on-chip RAM block L6 */
       RAML7       : origin = 0x010000, length = 0x002000     /* on-chip RAM block L7 */
       RAML8       : origin = 0x012000, length = 0x002000     /* on-chip RAM block L8 */
       USB_RAM     : origin = 0x040000, length = 0x000800     /* USB RAM		  */
    }
    
    
    SECTIONS
    {
       /* Setup for "boot to SARAM" mode:
          The codestart section (found in DSP28_CodeStartBranch.asm)
          re-directs execution to the start of user code.  */
       codestart        : > BEGIN,      PAGE = 0
       ramfuncs         : > RAMM0M1P,      PAGE = 0
       .text            : > RAMM0M1P,   PAGE = 0
       .InitBoot        : > RAMM0M1P,   PAGE = 0
       .cinit           : > RAMM0M1P,      PAGE = 0
       .pinit           : > RAMM0M1P,      PAGE = 0
       .switch          : > RAMM0M1P,      PAGE = 0
       .reset           : > RESET,      PAGE = 0, TYPE = DSECT /* not used, */
    
       .stack           : > RAMM1,      PAGE = 1
       .ebss            : > RAML6,      PAGE = 1
       .econst          : > RAML6,      PAGE = 1
       .esysmem         : > RAML6,      PAGE = 1
    
       IQmath           : > RAML0_L5,   PAGE = 0
       IQmathTables     : > IQTABLES,   PAGE = 0, TYPE = NOLOAD
       
       /* Allocate FPU math areas: */
       FPUmathTables    : > FPUTABLES,  PAGE = 0, TYPE = NOLOAD
     
    
      /* Uncomment the section below if calling the IQNexp() or IQexp()
          functions from the IQMath.lib library in order to utilize the
          relevant IQ Math table in Boot ROM (This saves space and Boot ROM
          is 1 wait-state). If this section is not uncommented, IQmathTables2
          will be loaded into other memory (SARAM, Flash, etc.) and will take
          up space, but 0 wait-state is possible.
       */
       /*
       IQmathTables2    : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
       {
    
                  IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)
    
       }
       */
       /* Uncomment the section below if calling the IQNasin() or IQasin()
          functions from the IQMath.lib library in order to utilize the
          relevant IQ Math table in Boot ROM (This saves space and Boot ROM
          is 1 wait-state). If this section is not uncommented, IQmathTables2
          will be loaded into other memory (SARAM, Flash, etc.) and will take
          up space, but 0 wait-state is possible.
       */
       /*
       IQmathTables3    : > IQTABLES3, PAGE = 0, TYPE = NOLOAD
       {
    
                  IQmath.lib<IQNasinTable.obj> (IQmathTablesRam)
    
       }
       */
    
    }
    
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */
    

  • Sharon,

    This thread has remained open too long, and we haven't been getting feedback quickly enough to close it. We have a 30-day target on threads that ends tomorrow. I would appreciate your quick feedback, or we can close the issue and you can post a new issue when you have updated information.

    Thanks,

    Sira

  • Yes, sorry; the developer has been out on sick leave. We are optimistic about your latest response.   I will get back to you as soon as I have a response from him.

    sharon

  • Sounds good. Waiting for updates then...

  • Hi, Sira -

    1.  We built the kernel using the .cmd file you sent.

    2.  We tried loading with it with the same result - the erase worked but the programming did not.  We saw the CPU respond up until the first programming block.

    3.  We had to re-burn the software using the JTAG interface.

    4.  The memory appears to be unlocked - the developer does not reach that area of memory and so shouldn't the values there be the default (unlocked)?

    5.  Are there any other things to check that could be preventing the programming?  Do you need to see a map file of the software to see where the memory is?  Is there any data from here that can help you help us?

    Thanks -

    Sharon

  • Sharon,

    Sorry for the delayed reply on this. I will get back to you on this by tomorrow.

    Thanks,

    Sira

  •  Hi, Sira!

    The developer managed to run some experiments with various versions of the TI tools.  Here are the results.

    Thanks for any help you can give.  We are stumped...

    Sharon

    1.      We do not use CSM – the password is left as is (all ‘F’s);

    2.      A proprietary board, utilizing a TMS320F28035 MCU was used.

    2.1.   Serial programming was perfectly successful (upgrade, downgrade etc.).

    2.2.   It takes about a minute for the program to load after “Application Autobaud Successful” message is printed.

    2.3.   The program memory mapping (*.cmd) file is taken from a support package given by The MathWorks (MATLAB).

    2.4.   The Flash kernel memory mapping file is used as is (given by TI).

    3.      A proprietary board, utilizing a TMS320F28065 MCU was used.

    3.1.   Serial programming only works when the exact (previously burnt by JTAG) same program is loaded.

    3.2.   On other occasions (upgrade/downgrade), the process fails about thirty seconds after “Application Autobaud Successful” message is printed and the MCU loads with the previous program.

    3.3.   In other words, the process fails but the Flash is somehow not erased.

    3.4.   The memory mapping (*.cmd) file is taken from a support package given by The MathWorks (MATLAB).

    3.5.   The Flash kernel memory mapping file is used as is (given by TI, both 28065 and 28069 RAM links were tested).

    4.      It’s almost certainly a memory mapping issue as I’ve seen different outcomes when manually altering specific regions in the memory mapping (using different RAM or Flash sectors).

    5. The *.cmd file Sira sent was also used and it didn’t change the outcome.

  • Hi Sira, Sharon,

    The fault was identified in the "Flash Kernel": one of the files given by TI's "C2000Ware" (version 3.02 – the latest) contains a major bug.

    In file "Shared_Boot.c", line 131:

    status = Flash_Erase((SECTORA | SECTORB | SECTORC | SECTORD), &FlashStatus);

    The 2806x family and specifically device 28065 incorporate eight flash sectors.

    Thus, the erasure isn't complete.

    Considering the addresses are configured correctly under "Flash2806x_API_Library.h" I've changed line 131 to:

    status = Flash_Erase((SECTORA | SECTORB | SECTORC | SECTORD | SECTORE | SECTORF | SECTORG | SECTORH), &FlashStatus);

    I then rebuilt the project and the SCI flash programming now works perfectly fine (as in 2803x).

     

    Another note

    Comparing projects between the examples of 28035 and 28069 I noticed a call to CsmUnlock() just after SendCheckSum() (line 81).

    Just to be on the safe side, I added it to "Shared_Boot.c" file of 2806x as well.

    However, I'm pretty sure it wasn't necessary on my specific occasion as the CSM wasn't locked so I can't be sure it's necessary at all.

     

    Sira, I hope you can forward this solution in order for the bug to be fixed before the next release of "C2000Ware".

    Moreover, I suggest TI reviews "Shared_Boot.c" files of the entire portfolio.

    Though it took an effort, Sharon and I are happy with the consequences.

     

    Thank you for the help – it guided us along the way,

    Roy

  • Roy,

    Thanks for the update on this. I will be sure to review and follow up on this.

    Thanks,

    Sira

  • I found that a similar bug exists for our F28335 Flash Kernel as well. I will make sure both are addressed. For the newer devices, the approach is cleaner.

    Thanks,

    Sira