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.

CCS/TMS320F28027: BOOSTXL-C2KLED Booster pack tutorial.

Part Number: TMS320F28027
Other Parts Discussed in Thread: CONTROLSUITE, BOOSTXL-C2KLED

Tool/software: Code Composer Studio

Hello I got me the LED booster pack for C2000 LaunchPad.

I am using the PC software to change the color of the LEDS.

Can you give an overview of the software being used? Can be found in C:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_examples\LED_Boost_PC

How was the registers changed when the UART data was received?

Sorry, I am very new to C++ programming.

  • Victor,

    Please see the documentation "LAUNCHXL-F28027-FRM-EX-UG.pdf" located at:

    C:\ti\controlSUITE\development_kits\C2000_LaunchPad\doc

    This document explains the details of the software files being used in the project.

    I hope this helps. If this answers your question, please click the green "Verified Answer" button. Thanks.

    - Ken
  • In..
    C:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_examples\LED_Boost_PC\SciCommsGui.c
    after getting all the UART packet from PC, what function sets the feedback voltage?
  • Hi Victor,

    Please see the following pdf file, within controlSUITE, for some information on the project structure for this example:
    \controlSUITE\development_kits\TemplateProjects\~Docs\SystemFrameworkOverview.pdf

    For information on the SciCommsGui file, you might want to reference the following E2E thread:
    https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/323334/1127678#1127678

    Hopefully this helps!


    Thank you,
    Brett

  • Hello I was trying to step through the codes and would loop in LED_Boost_PC_Main.c A0, B0 and C0 (state machine functions).
    I am interested on how the registers are changed in the code to change the duty cycle, reference voltage, etc. which is done during the communication and using the software LED_BOOST_PC_GUI.exe.
    During debug and stepping thru the code (comm/uart is connected), the software LED_BOOST_PC_GUI.exe will not connect (obviously due to the debug being connected).
    I tried using separate Serial port using FTDI and connect it to J1 of the lauchpad (Rx/Tx + GND on J5) while also turning off S4 to the downward position but still cannot communicate. I guest there might be some protocol to use XDS100V2.
    To run step thru the come and be able to communicate to the launch pad using the LED_BOOST_PC_GUI.exe, would I be needing separate launchpad with XDS100V2?

  • Hi Victor,

    What I would recommend doing then is to run the LED_Boost_PC example, but run it without the GUI. 

    Please note that the GUI is really just a dashboard which edits variables that are already in the example.  This means that the GUI isn't doing much. 

    (the one thing it does do is that it turns presses of the Color Presets buttons into three writes of a specific value, one to each of GUI_Iset[n])

    ===

    You can put some of the variables found in the 'INITIALISATION - GUI connections' section into the CCS watch window. 

    You can then run the program from CCS in real-time mode, making sure to run CCS in real-time mode (ie not setting breakpoints).

    This will allow you to get closer to the software running on the C2000 device.


    Note the Q-number specified in parenthesis.

    Specifically:
    GUI_Iout1 (Q15)
    GUI_Iout2 (Q15)
    GUI_Iout3 (Q15)

    GUI_Iset1 (Q15)
    GUI_Iset2 (Q15)
    GUI_Iset3 (Q15)
    SlewStepAll (Q0)

    ===

    Finally, please note that the LED boosterpack hardware & software was based on the slightly older RGB LED Kit (TMDSRGBLEDKIT).  It contains a bit more documentation, and much of it is relevant to your BoosterPack - maybe 95% the same.
    \controlSUITE\development_kits\Multi-DCDC-Color-LED-Kit_v1.0\

    Thank you,
    Brett

  • Hello
    I was able to play with open loop by changing the duty cycle and closed loop by changing the current.
    Maybe I will try next to do transient load and play about different setting of the 2p2z config.
    I would like to know how the Gui_Iset is translated to Iref.
    In case I will make my own hardware, how to set the Ref properly.
  • Hi Victor,

    The CCS project does this translation.

    Iset1 = Gui_Iset1 * iK_Iset  
    (Q14*Q15 => Q29.  Shift right 5 to make it Q24, which is the default Q that the various digital power libraries were written to assume.
    (Note that the .xls file that goes with the RGB LED kit helps to explain why iK_Iset is defined as it is:
    \controlSUITE\development_kits\Multi-DCDC-Color-LED-Kit_v1.0\~LED-ColorMix-HWdevPkg[R1]\LED-ColorMix-Calculations.xls)

    Itarget1 = Iset1, when the channel is enabled

    IrefNetBus1 is a slewed version of Itarget1, to make sure that any changes to the reference are done in a ramp (rather than suddenly)

    IrefNetBus then gets connected into the 2P2Z controller.


    Thank you,
    Brett

  • I was trying to use the firmware of TMDSRGBLEDKIT

    C:\ti\controlSUITE\development_kits\Multi-DCDC-Color-LED-Kit_v1.0\LED-ColorMix_v1_0

    on my BOOSTXL-C2KLED.

    Open loop is working and can light the GREEN or RED LED but when I close the loop, I cannot seem to lit GREEN led. BTW, the BLUE LED seems to be spoilt already.

    BOOSTXL-C2KLED is using these ADC channels (/LED_Boost_PC/LED_Boost_PC_Main.c):

    // ADC Channel Selection
    ChSel[0] = 2; // Dummy read for first sample bug
    ChSel[1] = 2; // A2 - Iout1 - blue
    ChSel[2] = 1; // A1 - Iout2 - green
    ChSel[3] = 6; // A6 - Iout3 - red
    ChSel[9] = 9; // B1 - Vout1
    ChSel[10] = 10; // B2 - Vout2
    ChSel[11] = 12; // B3 - Vout3
    ChSel[12] = 14; // B6 - Vin / Vout8

    while TMDSRGBLEDKIT are using these (/TMDSRGBLEDKIT-LED-ColorMix/LED-ColorMix-Main.c):

    // ADC Channel Selection
    ChSel[0] = 2; // Dummy read for first sample bug
    ChSel[1] = 2; // A2 - Iout1
    ChSel[2] = 0; // A0 - Iout2
    ChSel[3] = 4; // A4 - Iout3
    ChSel[4] = 1; // A1 - Iout4
    ChSel[5] = 6; // A6 - Iout5
    ChSel[6] = 3; // A3 - Iout6
    ChSel[7] = 14; // B6 - Iout7
    ChSel[8] = 7; // A7 - Iout8
    ChSel[9] = 9; // B1 - Vout1
    ChSel[10] = 10; // B2 - Vout2
    ChSel[11] = 11; // B3 - Vout3
    ChSel[12] = 12; // B4 - Vin / Vout8

    few questions:
    1. why is B3 on both firmware different? 11 vs 12
    2. can I swap ADC channels? since the GREEN on BOOSTXL-C2KLED is using A1 while in TMDSRGBLEDKIT A1 is used for Iout4. It seems to work on RED LED but not on GREEN.

    Here are the modifications I did:

    // ADC Channel Selection
    ChSel[0] = 2; // Dummy read for first sample bug
    ChSel[1] = 2; // A2 - Iout1
    ChSel[2] = 1; // A0 - Iout2 , orig "0".
    ChSel[3] = 6; // A4 - Iout3, orig "4".
    ChSel[4] = 1; // A1 - Iout4, can double?
    ChSel[5] = 6; // A6 - Iout5, can double?
    ChSel[6] = 3; // A3 - Iout6
    ChSel[7] = 14; // B6 - Iout7
    ChSel[8] = 7; // A7 - Iout8
    ChSel[9] = 9; // B1 - Vout1
    ChSel[10] = 10; // B2 - Vout2
    ChSel[11] = 11; // B3 - Vout3
    ChSel[12] = 12; // B4 - Vin / Vout8

    I am modifying Gui_Iset2 & Gui_Iset3 during debug to change the light intensity. Only RED LED can be controlled (Gui_Iset3) but not GREEN (Gui_Iset2).

    Then I finally set like this:

    // ADC Channel Selection
    ChSel[0] = 2; // Dummy read for first sample bug
    ChSel[1] = 2; // A2 - Iout1
    ChSel[2] = 1; // A0 - Iout2, orig "0".
    ChSel[3] = 6; // A4 - Iout3, orig "4".
    ChSel[4] = 0; // A1 - Iout4, orig "1".
    ChSel[5] = 4; // A6 - Iout5, orig "6".
    ChSel[6] = 3; // A3 - Iout6
    ChSel[7] = 14; // B6 - Iout7
    ChSel[8] = 7; // A7 - Iout8
    ChSel[9] = 9; // B1 - Vout1
    ChSel[10] = 10; // B2 - Vout2
    ChSel[11] = 12; // B3 - Vout3, orig "11".
    ChSel[12] = 14; // B6 - Vin / Vout8, orig "12".

    still same effect. Also I cannot set to off the RED LED once I have already set it. Meaning it cannot turn off anymore if I set Gui_Iset3 = 0.

  • Hi Victor,

    As you've noticed, due to hardware differences you'll need to make changes to the TMDSRGBLEDKIT software in order to make it work with the LED BoosterPack.

    The values put into the ChSel array are intended to align with the CHSEL register bits within the ADC peripheral (see the F2802x ADC User's Guide).  The TrigSel arrays' values are intended to line up with the TRIGSEL registers. The indexes into these array are intended to align with the Start Of Conversion (SOC) #s. 

    B3 should be 11.  A0-A7 is 0-7. B0-B7 is 8-15.

    The AdcNetBus, PWMDRV, and CNTL controllers then interact via pointers.  Everything is flexible.  There will likely be a number of things you'll need to edit & debug as you work through the project.  If you wish to continue porting, you'll need to work through these intricacies. 

    In general, I don't think it'd be functionally worthwhile to port the LED BoosterPack into the TMDSRGBLEDKIT software.  However, I suppose it could be a good way to investigate and get acquainted with the software - and this could help you in your own design.


    Thank you,
    Brett

  • Hi,

    As I thought that software should be flexible, changing ADC channels should be relatively easy.
    Also, if we need more boost converters which is not yet developed like TMDSRGBLEDKIT and BOOSTXL-C2KLED we need to modify the code.
    SO I thought this would be place to start by changing and redirecting ADC channels.

    I still have the same problems and I have modified as follows:

    #define Iout1R AdcResult.ADCRESULT1 //Q12
    #define Iout2R AdcResult.ADCRESULT2 //Q12
    #define Iout3R AdcResult.ADCRESULT3 //Q12
    /*
    #define Iout4R AdcResult.ADCRESULT4 //Q12
    #define Iout5R AdcResult.ADCRESULT5 //Q12
    #define Iout6R AdcResult.ADCRESULT6 //Q12
    #define Iout7R AdcResult.ADCRESULT7 //Q12
    #define Iout8R AdcResult.ADCRESULT8 //Q12
    */
    #define Vout1R AdcResult.ADCRESULT9 //Q12
    #define Vout2R AdcResult.ADCRESULT10 //Q12
    #define Vout3R AdcResult.ADCRESULT11 //Q12
    #define Vout8R AdcResult.ADCRESULT12 //Q12
    #define VinR AdcResult.ADCRESULT12 //Q12

    // ADC Channel Selection
    ChSel[0] = 2; // Dummy read for first sample bug
    ChSel[1] = 2; // A2 - Iout1
    ChSel[2] = 1; // A1 - Iout2
    ChSel[3] = 6; // A6 - Iout3
    /*
    ChSel[4] = 1; // A1 - Iout4
    ChSel[5] = 6; // A6 - Iout5
    ChSel[6] = 3; // A3 - Iout6
    ChSel[7] = 14; // B6 - Iout7
    ChSel[8] = 7; // A7 - Iout8
    */
    ChSel[9] = 9; // B1 - Vout1
    ChSel[10] = 10; // B2 - Vout2
    ChSel[11] = 12; // B4 - Vout3
    ChSel[12] = 14; // B6 - Vin / Vout8

    // ADC Trigger Selection
    TrigSel[0] = 5; // ePWM1, ADCSOCA
    TrigSel[1] = 5; // ePWM1, ADCSOCA
    TrigSel[2] = 5; // ePWM1, ADCSOCA
    TrigSel[3] = 5; // ePWM1, ADCSOCA
    /*
    TrigSel[4] = 0; // ePWM1, ADCSOCA
    TrigSel[5] = 0; // ePWM1, ADCSOCA
    TrigSel[6] = 0; // ePWM1, ADCSOCA
    TrigSel[7] = 0; // ePWM1, ADCSOCA
    TrigSel[8] = 0; // ePWM1, ADCSOCA
    */
    TrigSel[9] = 5; // ePWM1, ADCSOCA
    TrigSel[10] = 5; // ePWM1, ADCSOCA
    TrigSel[11] = 5; // ePWM1, ADCSOCA
    TrigSel[12] = 5; // ePWM1, ADCSOCA

    Anywhere else I need to check?
  • Hi Victor,

    Let's close this post and continue activity on your newer post:
    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/674715


    Thank you,
    Brett