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.

UCD3138ALLCEVM150: Memory mapping in UCD3138A and writing

Part Number: UCD3138ALLCEVM150

Hi,

I am currently modifying the code for EVAL Board for UCD3138ALLEVM150 as per my requirements. I am referring to the LLCHB Firmware 1.2 available on the TI website. I have following questions regarding the memory mapping:

1. What is the use of config_b?  

2. How can I expand the size of .config and .config_b. I have additional 150 bytes of data that needs to be stored in the D-FLASH. According to memory map, the current size is:

.CONFIG 0 00018800 000002bc
00018800 000002bc constants.obj (.CONFIG)

.CONFIG_B
* 0 00018ac0 0000021c UNINITIALIZED
00018ac0 0000021c constants.obj (.CONFIG_B)

3. I also want the user to store various configurations as user defined settings into the d-flash. Upto 3 different settings and the size of each setting is 18 bytes.

I have tried to reduce the size of PMBUS_DCDC_CONFIG structure by splitting it into two parts. The first part is set values that can't be modified by the user and the other set are the common values which can be modified by the user and can be stored as user settings. It contains 5 set of default values and 3 set of values can be added by the user. Size of each set is 18 bytes each.

Please suggest a way on how this can be achieved.

Regards,

Nitish

  • Config B is used to ensure that there is always a valid set of data.  with Config and Config B there are two spots to store the data.  Normally one block holds the data, and one is erased.   When the store default all command is executed the new data is stored into the erased block.  Once the block is written, the erase cycle is started for the old block.  This way, even if the writing process is interrupted by a reset or a power down, there is valid data in the data flash.  

    You can change the length of the Config by putting changing the length of the block in the comand file.  

    If you look here:

    you will find a CCS assembly tools guide for the ARM core.  It doesn't exactly match the version you are probably using, but the .cmd files work the same.  This will explain how to change the addresses.  The total size of the data flash is in 2K bytes.  

    If there are values in the config structs that you don't need to change, you can move them into program flash.  You can make a separate struct and just define them as volatile constants, instead of using the #pragma DATA_SECTION.  This will just put them at the next spot in the program flash.  Since you won't be erasing them, you don't care where they are.  

    There is fairly complex code which translates, reads and writes the values between the data flash and the RAM and registers in the UCD.  if you start with the Store Default All and Restore Default All PMbus commands, you should be able to see most of it.  You can use this as a guide for how to add and subtract values and how to read, write and erase the data flash.  There are a couple of functions called in the software interrupt.  The number in the software interrupt wrapper is the number in the switch statement in the software interrupt function.  

  • Hi Ian,

    Thanks for the fast response. I will try the above mentioned approach and will let you know if I face any issues.

    Thanks,

    Nitish