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.

TMS320F28052F: How much RAM is available for the user program?

Part Number: TMS320F28052F
Other Parts Discussed in Thread: TMS320F28064,

From the part description, TMS320F28052F has 16kB RAM, but one of our engineers who is working on a project with this MCU says that only 8kB RAM is available for him (the rest is automatically used by the system code when the InstaSPIN-FOC is dumped from the ROM) and it's not enough for him to do any serious coding. His point is that TMS320F28052F is too low-end and is not good for any product development. He suggests to use another MCU, like TMS320F28064. But this means that we need to re-design the hardware and this takes time.

The questions are:

1. How much of the 16kB RAM is available for the user to code with? Is it true that TMS320F28052F is too low-end, not suitable to be used in a product? Our application is speed sensorless control of BLDC motor, speed control of induction motor. Other than the motor control part, the system should provide CAN communication, serial communication, and/or Ethernet communication.

2. If it's true that we can't use TMS320F28052F, which one is better suited to be used in applications like ours?

Your help is highly appreciated.

Thanks.

  • More details from the engineer:

    ************************************************************************************************************************************************************

    TMS320F28052F has 8 kwords of RAM (M0 - 1 kwords, M1 - 1 kwords, L1 - 1 kwords, L2 - 1 kwords, L3 - 4 kwords)

    M0 and M1 are dedicated for heap and stack, heap takes about 1280 words, rest of 720 words are for stack.

    Part of L3(2816 words) is dedicated for data of special features as vibration compensation, high frequency injection and etc.

    L1, L2 and part of L3(1280 words) are dedicated for time sensitive functions.

    To be confident that we will have enough RAM memory space for our code I think we need to double stack size at least.

    But the question is how we can do that. I really don't want to cut anything what if we will need that in future. But if we will have to we need to know what most unnecessary functions we can throw out.

    By the way we don't have any code for CAN bootloader yet and I don't know how much memory it will require.

    ************************************************************************************************************************************************************

    Thanks.

  • You might take a look at the TMS320F2805xF InstaSPIN-FOC Software Technical Reference Manual, L0 (0x8000~0x88000)  RAM is reserved for InstaSPIN, You can use the other RAMs as the memory for your application variables or code.

    http://www.ti.com/lit/pdf/spruhw0

    Both 052F and 054F have 16kB RAM, and should be enough for most applications, not only for low-end applications. Most program code should be executed in Flash, only some ISRs code needs to be executed in RAM since it is time-sensitive as you mentioned.

  • Thanks for answering my questions. We know that L0 (2k words) is reserved for InstaSPIN, but Table8-4 on page 328 of 'InstaSPIN-FOC and InstaSPIN-MOTION User's Guide' shows that for full implementation with RAM of InstaSPIN-FOC, the total memory usage of InstaSPIN-FOC is 0x1870 RAM, which is about 6k words. Apparently L0 is not enough for this. Is my understanding of this Table 8-4 wrong?

    If InstaSPIN-FOC doesn't use RAM other than L0, according to our engineer, since 4 k words are dedicated to different functions (such as vibration compensation, high frequency injection, etc.), totally 4 k words are left for the user to use for his code. Also he mentions that each variable will use at least a word, not a byte, so the RAM is very tight for user's code.

    Do you agree?

    Thanks.

  • That means all user code includes the background loop code is in RAM.  You only need to copy the time-critical code (such as the code in ISR) from flash to RAM for execution. L0 is reserved as data memory for the variables used by InstaSPIN estimator, it is not program memory for the InstaSPIN algorithm code which is in ROM code and is not necessary to copy it to the RAM even though the user code is in FLASH.

    You may use almost all the RAM except L0 for your program and data.

  • Thank you for your clarification. I totally agree with you and don't think the RAM is not enough for user's code. Your help is highly appreciated.