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.

UCD3138 - PFCEVM_026 - New code

Other Parts Discussed in Thread: UCD3138CC64EVM-030

Hello,

I have several questions about PFCEVM_026 demo board. 

  1. Fusion Digital Power: Document SLUU885b mentions that "Adding more variables in Monitoring is possible but has to be executed through the firmware code change and re-compile process."
    1. where can I find info on this? Which section of the code defines which variables are available for monitoring?
  2. Fusion Digital Power: Document SLUU885b refers to STATUS section "To activate these variables in communication, corresponding firmware codes need to be in place."
    1. where can I find info on this? Which section of the code defines which registers will be active in STATUS window?
  3. what is the recommended way of testing new code on the PFCEVM_026 demo board? 
    1. To download and test new code, should I:
      1. have AC voltage OFF, insert jumper J2 on control card board (UCD3138CC64EVM-030), download new code, remove jumper J2 and then power up the entire system applying AC voltagage
      2. or should I use the "multi-image" option while the PFC is running? (that is, without using jumper J2)
    2. If I go with the first option (AC voltage off, jumper J2 in), I believe I have to write the program checksum, right? 
      1. the sample code provided for PFC single phase has FAULT1 pin as backdoor to erase the checksum, but there is no jumper available to simply do that (this is not really a question)
    3. Is it recommended instead to download the firmware with option "PASS THRU whatever program checksum is in the firmware"?
  4. I was not able to find where the constants EMETER_EN and AC_CYCLE_SKIP are defined, I wanted to test these two functions. Most constants are in system_defines.h (I am referring to the sample code provided for the PFC), but even searching in the entire project (CTRL+H) I could not find them

Thank you

  • Hello, Marco,

    Have you downloaded the firmware from Ti.com? Have you set up Ti Code Composer Studio?

    When you have them, you can modify the code and practice your questions.

    Regards,
    Sean
  • Hi Sean,

    thank you. Yes, actually I am already trying new code on the open loop board. 

    I could not find specific info about the questions I asked

    Thanks

    Marco

  • I will post answers to all of the above if/when I find the answers

    4) EMETER_ON and AC_CYCLE_SKIP are under project properties --> Build --> arm compiler --> advanced options --> PREDEFINED SYMBOLS

    This is where also other constants are defined (ON/OFF, SINGLE_PHASE...). This is why also the lines 8-10 of system_defines.h (PFC_TYPE selection) were all commented out, since PFC_TYPE is defined also in the PREDEFINED SYMBOLS

  • Marco, to add more variables to monitoring, you have to do several things:

    1. - have a variable to monitor. There are some variables already maintained, but not monitored. If you want to monitor something new, you will have to provide hardware and firmware to monitor it, say from the ADC
    2. Define a PMBus command to provide the variable to the GUI. This has to be a standard PMBus command that the GUI supports. The GUI supports most of the commands. For most commands where there is a choice, it generally only supports the linear11 format. If you look through the code, you will see examples of how to do this.

    Next you will have to hook up the command to the firmware
    If you have an older version of the code, you will have to:

    1. Add a call to the switch statement in pmbus_read_message

    2. Set the appropriate bit in the #define CMD_PFC statement. This feeds a manufacturer specific PMBus command that tells the GUI which PMBus commands are supported.

    If you have the newer version of the code, you can look at pmbus_topology.c to see examples of PMBus commands. Here you have to put a read/write command. In pmbus_topology.h you need to set the enable bit for the specific command code to a 1, for example

    #define PMBUS_CMD_16_ENABLE (1)

    You also need to put other things in pmbus_topology.h to set the Query and the pointer to the command function. Here is an example, and there are lots more in the code:

    Uint8 pmbus_read_write_cmd_dcdc_nonpaged(Uint8 pmbus_read);
    #define PMBUS_CMD_E5_FUNCTION_POINTER pmbus_read_write_cmd_dcdc_nonpaged
    #define PMBUS_CMD_E5_QUERY (QUERY_COMMAND_SUPPORTED + QUERY_READ_SUPPORTED + QUERY_MAN_SPEC)

    Putting these commands into the topology.h file will automatically create the CMD_PFC table and other tables used by the PMBus firmware.

    Good job figuring out how to get a .x0 file. I did post that one a few days ago, but I don't think I have posted the one about the compile time options yet.



    To download the code, you can use the first option - download the code with Jumper J2 in place. I would suggest selecting " DO NOT write Program Checksum" It's always possible to install a firmware bug that prevents you from clearing the checksum, in which case you may have to install a new UCD in your control card. If you need to put the checksum in, first make sure that you can really clear it. See here:

    e2e.ti.com/.../431509

    Sometimes I actually download the code with the AC on, and powering the UCD with the bias supply. If you don't write the checksum, you have to start the program with the I2C/PMBus adapter every time you power on. The Fusion GUI will do it automatically, the Device GUI will need you to search for device in ROM mode, and then tell ROM to execute program.
  • Thank you Ian!