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.

TMS320F280041: Duplicating the same RAM area

Genius 5735 points
Part Number: TMS320F280041

Hi experts,

My customer is looking for a solution to prevent unintended behavior using corrupted RAM area.

First of all, let me check if it is technically possible to achieve the following.
Q1:Is it possible to have a double RAM area with the same contents and select the RAM area to be used at startup?

Currently, only one RAM area is used, but we are thinking of implementing the following.

  • Design RAM area 1 and RAM area 2 in advance by dividing the RAM area into two.
  • If RAM area 1 is corrupted, change the RAM address to use area 2.
  • If RAM area 2 is also corrupted, write the program again.
  • In the application program, use the same name for the variable (the variable name is the same whether RAM area 1 or RAM area 2 is used).

I tried looking for E2E and application notes, but could not find any, so I would appreciate it if you could share any information that would be helpful.

Best regards,
O.H

  • Hi,

    RAM is volatile memory so at startup there is no code in RAM. It all stored in flash and get copied from flash to RAM at run time. If customer get to know that RAM is corrupted then they can always copy it from flash again. Right ? Or in this case they load the code into RAM from some external device hence trying to have two copies ? 

    Regards,

    Vivek Singh

  • Hi Vivek Singh,

    Thank you for your reply. I am new to this kind of approach, so please point out if I am wrong.

    I understand that RAM is copied from Flash at startup, but I think the area (address) used for data and application code is set in advance in the linker command file (.cmd). If there is a way to dynamically change the setting and selection of this area, I think it will be possible to achieve what I want to achieve this time.

    Or in this case they load the code into RAM from some external device hence trying to have two copies ? 

    I am checking the details with the customer, but first I would like to know if this is technically possible, so I made an inquiry.

    Best regards,
    O.H

  • I'll have to refer this to our compiler team.

    Regards,

    Vivek Singh

  • Is it possible to have a double RAM area with the same contents and select the RAM area to be used at startup?

    The linker only supports a symbol corresponding to one run address.  It is not possible to have the same symbol correspond to two different run addresses, and for the run address to be somehow chosen at run time.

    Thanks and regards,

    -George

  • Hi George,

    Thank you for your answer. I understood.

    Best regards,
    O.H