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.

TMS570LS1227: Using TMS570LS1227 Flash BANK7 for Dataload Software

Part Number: TMS570LS1227

Tool/software:

Hello TI Team,

We are using the TMS570LS1227 microcontroller in our aerospace program. This device includes two flash banks, BANK0 and BANK7. According to the reference manual, BANK7 is intended for EEPROM emulation and does not support code execution from its flash memory.

Our plan is to program the "Dataload software," which is non-critical and does not need to execute during flight, into BANK7. During maintenance, the system will copy the Dataload software from BANK7 flash to RAM, swap the memory (flash and RAM), and reset the CPU to execute the Dataload software from RAM.

I have the following questions regarding this implementation:

1. The Dataload software size is approximately 50 KB. Can we program the Dataload software into BANK7? Are there any differences in the programming process between BANK0 and BANK7 flash memory? Please note that we do not plan to use ECC for the Dataload software, whereas ECC will be used for the flight software. We will disable ECC before running the Dataload software.

2. While running the flight software, if control unexpectedly jumps to BANK7 flash memory where the Dataload software is stored, will the processor trigger any NMI (e.g., will the ESM pin assert)?

I look forward to hearing from you. Thanks.

Best regards,
Jagadish

  • Please note that we will use JTAG to load the Dataload software into BANK7 flash.

  • Hi Jagadish Palle,

    You can directly execute the code in bank-7, i mean no need to copy it to the RAM. Recently i came across similar requirement from other customer in below thread:

    (18) TMS570LC4357: Can the CPU jump to the FLASH OTP area to address and execute the program? - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    Please refer above comment of min in attached thread. Here i gave step by step procedure along with codes to execute the code from bank-7. You can use it as a reference. In above projects i executed LED blinky code from bank-7 without any issues.

    1. The Dataload software size is approximately 50 KB. Can we program the Dataload software into BANK7? Are there any differences in the programming process between BANK0 and BANK7 flash memory? Please note that we do not plan to use ECC for the Dataload software, whereas ECC will be used for the flight software. We will disable ECC before running the Dataload software.

    For this device we have 64KB of memory in bank-7, so there won't be any issues in storing of your program of size 50KB.

    2. While running the flight software, if control unexpectedly jumps to BANK7 flash memory where the Dataload software is stored, will the processor trigger any NMI (e.g., will the ESM pin assert)?

    No, you won't get any NMI interrupt for code execution in bank-7. Additionally, there won't be any ESM interrupt as well. 

    Code execution in RAM or any other flash banks, there won't be any difference in ESM perspective. Core will just execute the code without any interrupts or ESM triggers.

    --
    Thanks & regards,
    Jagadish.

  • Hello Jagadish,

    Thank you. It looks like your statement "You can directly execute the code in bank-7…" contradicts the reference manual (SPNS192B –OCTOBER 2012–REVISED FEBRUARY 2015). It says, "(3) Code execution is not allowed from flash bank 7." See the snapshot below.

    Both flash and RAM will be protected by ECC and will correct single-bit errors and detect more than one-bit error and generate NMI (Group 3 error) and assert the nERROR pin. So are you saying the SECDED logic does not trigger NMI if there is more than one bit error? Please clarify these two items.

  • Hi,

    Thank you. It looks like your statement "You can directly execute the code in bank-7…" contradicts the reference manual (SPNS192B –OCTOBER 2012–REVISED FEBRUARY 2015). It says, "(3) Code execution is not allowed from flash bank 7." See the snapshot below.

    Initially i thought the same (execution cannot happen from bank-7), but i gave a try and it worked for me. You can do it from RAM as well, i mean storing in flash and running from RAM this should also work without any issues.

    Both flash and RAM will be protected by ECC and will correct single-bit errors and detect more than one-bit error and generate NMI (Group 3 error) and assert the nERROR pin. So are you saying the SECDED logic does not trigger NMI if there is more than one bit error? Please clarify these two items.

    You are correct we can call ESM errors as NMI's, there is a control for Group-1 errors at ESM level that means we can configure whether they should trigger ESM interrupt or not.

    However, for Group2 there won't be any configuration to disable the interrupts, and they will always trigger the interrupts. And finally, for Group3 they will trigger aborts and there won't be any interrupt generations for group3 errors.

    Please refer my below thread for more details on this:

    (+) TMS570LC4357-EP: ESM Group 2 and 3 channels on the MCU - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    --
    Thanks & regards,
    Jagadish.