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.

UCD3138A: ucd3138 change word to Data Flash

Part Number: UCD3138A

Dear TI;

According to the Online GUI document, I change the vout_commad  value and clicked the button “Store RAM To Flash”.

I want to know what  function are supposed by the code  UCD3138HSFBEVM  when clicked “Store RAM To Flash”?

In  PMBus_topology.c 

inline Uint8 pmbus_write_vout_cmd(void)
{
pmbus_dcdc_config[0].vout_cmd = pmbus_buffer[1] + (pmbus_buffer[2] << 8);
configure_vout_cmd();

}

then trigger the software interrupt  ( void write_data_flash_word(Uint32 address,unsigned long data) )?

I am not clear abourt it ? can you explain it in detail?

Best Wishes

SUN

  • Hello SUN,

    I've forwarded your message to the appropriate engineer and they will respond accordingly.

    Amiel

  • Hi SUN,

    PMBus does not save anything to Flash till by clicking “Store RAM To Flash”, you call the function "Uint8 pmbus_write_store_default_all(void)"

    This function does not save two bytes, but the whole configuration parameters in RAM are going to be saved in Flash.

    This is done by  Case 13 : "write_data_flash_block" inside the software interrupt and not by write_data_flash_word.

    The whole process is more complicated, but I am hoping this answers your question.

    Regards,

    Yitzhak Bolurian

  • Hi TI,

    I just change a word of Vout_command through pmbus, Why not done by write_data_flash_word ?
    when will trigger the software interrupt ? next power on ? I can not find call software interrupt function?

    I am confused about it, so I want to know the clear explanation. Thankyou!

    Best Wishes
    SUN
  • The explanation for why it works the way it does is in the PMBus spec.  The PMBus spec is designed so that when you write things like Vout, they go to volatile memory.  If you want them to be stored as the default, you have to issue a command to do that.  Our EVMs generally use the STORE_DEFAULT_ALL command.

    So when you write to VOUT_COMMAND, it will change the VOUT command for the moment, but it won't store it to the default.  STORE_DEFAULT_ALL will do the store to the data flash. 

  • Dear Lan,

    Only in Privileged mode,data flash can be write. 

    So STORE_DEFAULT_ALL function will trigger software interrupt  Case 13 : "write_data_flash_block"?

    STORE_DEFAULT_ALL will write all 64 blocks of 32 byte in Date flash? because I just change one word in the block, can I just write one block to data flash?

    The unit store in Dflash is Block not word?

    Do we have to erase the block  before writing?

     

    Best Wishes

    SUN

  • Before writing to a word in data flash, the 32 byte block it is in has to be erased.

    Yes, write to data flash needs to be in privileged mode - that is why we use the software interrupt.