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.

TMS570LS0914: Uniflash cannot read/write flash memory beyond address 0xC0000

Part Number: TMS570LS0914
Other Parts Discussed in Thread: UNIFLASH,

Hello everyone,

I would like some assistance with a problem we are experiencing with Uniflash and the TMS570LS0914.

When we try to flash an image that is 0x10000 bytes ins size, we get the following error:

[ERROR] CortexR4: File Loader: Memory write failed: The address 0xc7e6f does not map to a valid Flash Bank

The part definitely supports the memory address the error is generated for:

We can write to it using the debugger no problem. Also our own bootloader can read and write to that section of flash.

We have also noticed we cannot read beyond address 0xC00000 in the Uniflash Memory Browser.

When I read is using our bootloader the flash is filled with 0xFF, and we use the two very last bytes to store a crc so I know the bootloader is correct.

The Uniflash project file is pointing to the correct GEL file and there the flash definitions are correct:

Could someone please help us figure out what is going wrong here?

Many thanks,

Alexander

  • Hi Alexander,

    Which package (PZ or PGE) are you using?

  • Hi Alexander,

    I found the root cause: The flash config of TMS570LS0914 device used for CCS/uniflash to erase/program flash is not defined properly. After I corrected flash config in xml file, I am able to erase/program sector 12/13.

    Workaround:

    C:\ti\ccsxxx\ccs\ccs_base\hercules\flash\configs\TMS570LS0x14.xml

    C:\ti\uniflash_x.x.x\deskdb\content\TICloudAgent\win\ccs_base\hercules\flash\configs\TMS570LS0x14.xml

    Changed end address of flash bank0, and ECC of flash bank 0:

    LINE 14:                 <ProgramFlash    StartAddress="0x00000000" EndAddress="0x000Fffff" CorrectionStartAddress="0xF0400000" CorrectionEndAddress="0xF041ffff"/>

    LINE 19:                  StartAddress="0x00000000" EndAddress="0x000Fffff"

    LINE 20:                   CorrectionStartAddress="0xF0400000" CorrectionEndAddress="0xF0420000">

     

    Add following lines to LINE 56

                            </Sector>

                            <Sector Number="12" Type="Flash" StartAddress="0x000C0000" Length="0x00020000">

                                 <Correction Type="FlashEcc" StartAddress="0xF0418000" Length="0x00004000"/>

                            </Sector>

                            <Sector Number="13" Type="Flash" StartAddress="0x000E0000" Length="0x00020000">

                                 <Correction Type="FlashEcc" StartAddress="0xF041C000" Length="0x00004000"/>

    I will attach the corrected xml file for both CCS and uniflash later.

  • The corrected xml file is:

    <?xml version="1.0" encoding="UTF-8"?>
    <Device  AsicId="0x00771899" DeviceId="0x8052AD05" Library="f021_R4_be.nfl"  CoreType="R4_BigEndian" useDAP="true" Revision="0" >
        <Revisions>
            <Revision RevisionNumber="0"> Initial Revision </Revision>
        </Revisions>
        <Part Name="TMS570LS0914">
            <MinorRevision RevisionNumber="0" Description="TMS570LS0914 Rev 0"/>
            <MinorRevision RevisionNumber="1" Description="TMS570LS0914 Rev A"/>
            <RegisterId Address="0xF008015C" Value="0x00000400" Mask="0x0000FFFF"/>            
            <Parameters>
                <PllFrequency Frequency="180" PllType="fmzpll"/>
                <MemoryMap>
                    <Flash>
                        <ProgramFlash    StartAddress="0x00000000" EndAddress="0x000Fffff" CorrectionStartAddress="0xF0400000" CorrectionEndAddress="0xF041ffff"/>
                        <ProgramFlashOtp StartAddress="0xF0000000" EndAddress="0xF0000fff" CorrectionStartAddress="0xF0040000" CorrectionEndAddress="0xF00401ff"/>
                        <DataFlash    StartAddress="0xF0200000" EndAddress="0xF020ffff" CorrectionStartAddress="0xF0100000" CorrectionEndAddress="0xF0101fff"/>
                        <DataFlashOtp StartAddress="0xF000E000" EndAddress="0xF000E7ff" CorrectionStartAddress="0xF0041C00" CorrectionEndAddress="0xF0041Cff"/>
                        <Bank Number="0" Type="Program" ControlRegister="0xfff87000"
                            StartAddress="0x00000000" EndAddress="0x000Fffff"
                            CorrectionStartAddress="0xF0400000" CorrectionEndAddress="0xF0420000">
                            <Sector Number="0" Type="Flash" StartAddress="0x00000000" Length="0x00004000">
                                <Correction Type="FlashEcc" StartAddress="0xF0400000" Length="0x00000800"/>
                            </Sector>
                            <Sector Number="1" Type="Flash" StartAddress="0x00004000" Length="0x00004000">
                                <Correction Type="FlashEcc" StartAddress="0xF0400800" Length="0x00000800"/>
                            </Sector>
                            <Sector Number="2" Type="Flash" StartAddress="0x00008000" Length="0x00004000">
                                <Correction Type="FlashEcc" StartAddress="0xF0401000" Length="0x00000800"/>
                            </Sector>
                            <Sector Number="3" Type="Flash" StartAddress="0x0000C000" Length="0x00004000">
                                <Correction Type="FlashEcc" StartAddress="0xF0401800" Length="0x00000800"/>
                            </Sector>
                            <Sector Number="4" Type="Flash" StartAddress="0x00010000" Length="0x00004000">
                                <Correction Type="FlashEcc" StartAddress="0xF0402000" Length="0x00000800"/>
                            </Sector>
                            <Sector Number="5" Type="Flash" StartAddress="0x00014000" Length="0x00004000">
                                <Correction Type="FlashEcc" StartAddress="0xF0402800" Length="0x00000800"/>
                            </Sector>
                            <Sector Number="6" Type="Flash" StartAddress="0x00018000" Length="0x00008000">
                                <Correction Type="FlashEcc" StartAddress="0xF0403000" Length="0x00001000"/>
                            </Sector>
                            <Sector Number="7" Type="Flash" StartAddress="0x00020000" Length="0x00020000">
                                <Correction Type="FlashEcc" StartAddress="0xF0404000" Length="0x00004000"/>
                            </Sector>
                            <Sector Number="8" Type="Flash" StartAddress="0x00040000" Length="0x00020000">
                                <Correction Type="FlashEcc" StartAddress="0xF0408000" Length="0x00004000"/>
                            </Sector>
                            <Sector Number="9" Type="Flash" StartAddress="0x00060000" Length="0x00020000">
                                <Correction Type="FlashEcc" StartAddress="0xF040C000" Length="0x00004000"/>
                            </Sector>
                            <Sector Number="10" Type="Flash" StartAddress="0x00080000" Length="0x00020000">
                                 <Correction Type="FlashEcc" StartAddress="0xF0410000" Length="0x00004000"/>
                            </Sector>
                            <Sector Number="11" Type="Flash" StartAddress="0x000A0000" Length="0x00020000">
                                 <Correction Type="FlashEcc" StartAddress="0xF0414000" Length="0x00004000"/>
                            </Sector>
                            <Sector Number="12" Type="Flash" StartAddress="0x000C0000" Length="0x00020000">
                                 <Correction Type="FlashEcc" StartAddress="0xF0418000" Length="0x00004000"/>
                            </Sector>
                            <Sector Number="13" Type="Flash" StartAddress="0x000E0000" Length="0x00020000">
                                 <Correction Type="FlashEcc" StartAddress="0xF041C000" Length="0x00004000"/>
                            </Sector>
                            <Otp Type="Otp" StartAddress="0xF0000000" Length="0x00001000">
                                <Correction Type="OtpEcc" StartAddress="0xF0040000" Length="0x00000200"/>
                            </Otp>
                        </Bank>
                        <Bank Number="7" Type="Data" ControlRegister="0xfff87000"
                            StartAddress="0xF0200000" EndAddress="0xF020ffff"
                            CorrectionStartAddress="0xF0100000" CorrectionEndAddress="0xF010ffff">
                            <Sector Number="0" Type="Flash" StartAddress="0xF0200000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100000" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="1" Type="Flash" StartAddress="0xF0201000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100200" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="2" Type="Flash" StartAddress="0xF0202000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100400" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="3" Type="Flash" StartAddress="0xF0203000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100600" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="4" Type="Flash" StartAddress="0xF0204000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100800" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="5" Type="Flash" StartAddress="0xF0205000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100A00" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="6" Type="Flash" StartAddress="0xF0206000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100C00" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="7" Type="Flash" StartAddress="0xF0207000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100E00" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="8" Type="Flash" StartAddress="0xF0208000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0101000" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="9" Type="Flash" StartAddress="0xF0209000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0101200" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="10" Type="Flash" StartAddress="0xF020A000" Length="0x00001000">
                                <Correction Type="FlashEcc"  StartAddress="0xF0101400" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="11" Type="Flash" StartAddress="0xF020B000" Length="0x00001000">
                                <Correction Type="FlashEcc"  StartAddress="0xF0101600" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="12" Type="Flash" StartAddress="0xF020C000" Length="0x00001000">
                                <Correction Type="FlashEcc"  StartAddress="0xF0101800" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="13" Type="Flash" StartAddress="0xF020D000" Length="0x00001000">
                                <Correction Type="FlashEcc"  StartAddress="0xF0101A00" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="14" Type="Flash" StartAddress="0xF020E000" Length="0x00001000">
                                <Correction Type="FlashEcc"  StartAddress="0xF0101C00" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="15" Type="Flash" StartAddress="0xF020F000" Length="0x00001000">
                                <Correction Type="FlashEcc"  StartAddress="0xF0101E00" Length="0x00000200"/>
                            </Sector>
                            <Otp Type="Otp" StartAddress="0xF000E000" Length="0x00000800">
                                <Correction Type="OtpEcc" StartAddress="0xF0041C00" Length="0x00000100"/>
                            </Otp>
                        </Bank>
                    </Flash>
                </MemoryMap>
            </Parameters>
        </Part>
        <DefaultPart Name="TMS570LS0714">
            <MinorRevision RevisionNumber="0" Description="TMS570LS0714 Rev 0"/>
            <MinorRevision RevisionNumber="1" Description="TMS570LS0714 Rev A"/>
            <Parameters>
                <PllFrequency Frequency="180" PllType="fmzpll"/>
                <MemoryMap>
                    <Flash>
                        <ProgramFlash    StartAddress="0x00000000" EndAddress="0x000fffff" CorrectionStartAddress="0xF0400000" CorrectionEndAddress="0xF041ffff"/>
                        <ProgramFlashOtp StartAddress="0xF0000000" EndAddress="0xF0000fff" CorrectionStartAddress="0xF0040000" CorrectionEndAddress="0xF00401ff"/>
                        <DataFlash    StartAddress="0xF0200000" EndAddress="0xF020ffff" CorrectionStartAddress="0xF0100000" CorrectionEndAddress="0xF0101fff"/>
                        <DataFlashOtp StartAddress="0xF000E000" EndAddress="0xF000E7ff" CorrectionStartAddress="0xF0041C00" CorrectionEndAddress="0xF0041Cff"/>
                        <Bank Number="0" Type="Program" ControlRegister="0xfff87000"
                            StartAddress="0x00000000" EndAddress="0x000fffff"
                            CorrectionStartAddress="0xF0400000" CorrectionEndAddress="0xF041ffff">
                            <Sector Number="0" Type="Flash" StartAddress="0x00000000" Length="0x00004000">
                                <Correction Type="FlashEcc" StartAddress="0xF0400000" Length="0x00000800"/>
                            </Sector>
                            <Sector Number="1" Type="Flash" StartAddress="0x00004000" Length="0x00004000">
                                <Correction Type="FlashEcc" StartAddress="0xF0400800" Length="0x00000800"/>
                            </Sector>
                            <Sector Number="2" Type="Flash" StartAddress="0x00008000" Length="0x00004000">
                                <Correction Type="FlashEcc" StartAddress="0xF0401000" Length="0x00000800"/>
                            </Sector>
                            <Sector Number="3" Type="Flash" StartAddress="0x0000C000" Length="0x00004000">
                                <Correction Type="FlashEcc" StartAddress="0xF0401800" Length="0x00000800"/>
                            </Sector>
                            <Sector Number="4" Type="Flash" StartAddress="0x00010000" Length="0x00004000">
                                <Correction Type="FlashEcc" StartAddress="0xF0402000" Length="0x00000800"/>
                            </Sector>
                            <Sector Number="5" Type="Flash" StartAddress="0x00014000" Length="0x00004000">
                                <Correction Type="FlashEcc" StartAddress="0xF0402800" Length="0x00000800"/>
                            </Sector>
                            <Sector Number="6" Type="Flash" StartAddress="0x00018000" Length="0x00008000">
                                <Correction Type="FlashEcc" StartAddress="0xF0403000" Length="0x00001000"/>
                            </Sector>
                            <Sector Number="7" Type="Flash" StartAddress="0x00020000" Length="0x00020000">
                                <Correction Type="FlashEcc" StartAddress="0xF0404000" Length="0x00004000"/>
                            </Sector>
                            <Sector Number="8" Type="Flash" StartAddress="0x00040000" Length="0x00020000">
                                <Correction Type="FlashEcc" StartAddress="0xF0408000" Length="0x00004000"/>
                            </Sector>
                            <Sector Number="9" Type="Flash" StartAddress="0x00060000" Length="0x00020000">
                                <Correction Type="FlashEcc" StartAddress="0xF040C000" Length="0x00004000"/>
                            </Sector>
                            <Sector Number="10" Type="Flash" StartAddress="0x00080000" Length="0x00020000">
                                 <Correction Type="FlashEcc" StartAddress="0xF0410000" Length="0x00004000"/>
                            </Sector>
                            <Sector Number="11" Type="Flash" StartAddress="0x000A0000" Length="0x00020000">
                                 <Correction Type="FlashEcc" StartAddress="0xF0414000" Length="0x00004000"/>
                            </Sector>
                            <Sector Number="12" Type="Flash" StartAddress="0x000C0000" Length="0x00020000">
                                 <Correction Type="FlashEcc" StartAddress="0xF0418000" Length="0x00004000"/>
                            </Sector>
                            <Sector Number="13" Type="Flash" StartAddress="0x000E0000" Length="0x00020000">
                                 <Correction Type="FlashEcc" StartAddress="0xF041C000" Length="0x00004000"/>
                            </Sector>
                            <Otp Type="Otp" StartAddress="0xF0000000" Length="0x00001000">
                                <Correction Type="OtpEcc" StartAddress="0xF0040000" Length="0x00000200"/>
                            </Otp>
                        </Bank>
                        <Bank Number="7" Type="Data" ControlRegister="0xfff87000"
                            StartAddress="0xF0200000" EndAddress="0xF020ffff"
                            CorrectionStartAddress="0xF0100000" CorrectionEndAddress="0xF010ffff">
                            <Sector Number="0" Type="Flash" StartAddress="0xF0200000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100000" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="1" Type="Flash" StartAddress="0xF0201000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100200" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="2" Type="Flash" StartAddress="0xF0202000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100400" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="3" Type="Flash" StartAddress="0xF0203000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100600" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="4" Type="Flash" StartAddress="0xF0204000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100800" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="5" Type="Flash" StartAddress="0xF0205000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100A00" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="6" Type="Flash" StartAddress="0xF0206000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100C00" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="7" Type="Flash" StartAddress="0xF0207000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0100E00" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="8" Type="Flash" StartAddress="0xF0208000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0101000" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="9" Type="Flash" StartAddress="0xF0209000" Length="0x00001000">
                                <Correction Type="FlashEcc" StartAddress="0xF0101200" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="10" Type="Flash" StartAddress="0xF020A000" Length="0x00001000">
                                <Correction Type="FlashEcc"  StartAddress="0xF0101400" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="11" Type="Flash" StartAddress="0xF020B000" Length="0x00001000">
                                <Correction Type="FlashEcc"  StartAddress="0xF0101600" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="12" Type="Flash" StartAddress="0xF020C000" Length="0x00001000">
                                <Correction Type="FlashEcc"  StartAddress="0xF0101800" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="13" Type="Flash" StartAddress="0xF020D000" Length="0x00001000">
                                <Correction Type="FlashEcc"  StartAddress="0xF0101A00" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="14" Type="Flash" StartAddress="0xF020E000" Length="0x00001000">
                                <Correction Type="FlashEcc"  StartAddress="0xF0101C00" Length="0x00000200"/>
                            </Sector>
                            <Sector Number="15" Type="Flash" StartAddress="0xF020F000" Length="0x00001000">
                                <Correction Type="FlashEcc"  StartAddress="0xF0101E00" Length="0x00000200"/>
                            </Sector>
                            <Otp Type="Otp" StartAddress="0xF000E000" Length="0x00000800">
                                <Correction Type="OtpEcc" StartAddress="0xF0041C00" Length="0x00000100"/>
                            </Otp>
                        </Bank>
                    </Flash>
                </MemoryMap>
            </Parameters>
        </DefaultPart>
        <CommonParameters>
            <Initialization>
                <InitRegisters Register="0xfffff538" Value="0x00000005" Comment="reset ESM"/>
                <InitRegisters Register="0xffffff50" Value="0x00000207" Comment="select clock source 7 for RTICLK (Disable DWD)"/>
                <InitRegisters Register="0xffffffd0" Value="0x01010000" Comment="Disable peripherals"/>
                <InitRegisters Register="0xffffffd0" Value="0x01010100" Comment="Enable peripherals"/>
                <InitRegisters Register="0xfffff000" Value="0x00000000" Comment="disable DMA"/>
                <InitRegisters Register="0xffffff00" Value="0x00000000" Comment="disable ECLK output"/>
                <InitRegisters Register="0xfff7A400" Value="0x00000000" Comment="disable HTU"/>
                <InitRegisters Register="0xffffffc0" Value="0x00000000" Comment="Set RAM wait states to 0"/>
                <InitRegisters Register="0xfff87000" Value="0x00000311" Comment="enable pipeline mode and RWAIT=3 and Address WS=1"/>
                <InitRegisters Register="0xfff87288" Value="0x00000005" Comment="enable write to EWAIT register"/>
                <InitRegisters Register="0xfff872B8" Value="0x00080002" Comment="EWAIT=8"/>
                <InitRegisters Register="0xfff87008" Value="0x00000005" Comment="disable error correction and detection"/>
                <InitRegisters Register="0xfff87040" Value="0x0000ffff" Comment="force active mode for all banks"/>
                <InitRegisters Register="0xffffffc4" Value="0x0000000a" Comment="MEMSW='1010' => Flash at 0x00000000, RAM at 0x08000000)"/>
                <InitCode>
                    <Code>S00600004844521B</Code>
                    <Code>S32208000300477846C0E92D0001EE110F30E3C00402E3800001EE010F30EE1F0F10E36E</Code>
                    <Code>S3220800031DC00005EE0F0F10EE110F30E3C00303E3800006EE010F30EE1F0F10E380C7</Code>
                    <Code>S31B0800033A0002E3C00008EE0F0F10E3A00000E8BD0001E12FFF1E80</Code>
                    <Code>S70500000000FA</Code>
                </InitCode>
            </Initialization>
            <MemoryMap>
                <Ram>
                    <Ram Type="Ram" StartAddress="0x08000000" Length="0x00020000">
                        <Correction Type="RamEcc" StartAddress="0x08400000" Length="0x00010000"/>
                    </Ram>
                </Ram>
            </MemoryMap>
    		<ProfilingLimits Vt_Min_Limit="24" Vt_Mean_Limit="24.0" Bcc_Min_Limit="10" Bcc_Mean_Limit="10.0"/>
        </CommonParameters>
    </Device>
    

    Please save this file to the following folder:

    C:\ti\ccsxxx\ccs\ccs_base\hercules\flash\configs\TMS570LS0x14.xml

    C:\ti\uniflash_x.x.x\deskdb\content\TICloudAgent\win\ccs_base\hercules\flash\configs\TMS570LS0x14.xml

  • Hi QJ Wang,

    This solved our problems.

    Thank you very much!

    Best Regards,

    Alexander