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.

MSP430F2252: PMP8740 - Embedded Software.

Part Number: MSP430F2252
Other Parts Discussed in Thread: PMP8740, LMT87

Dear Britta,

Good Afternoon. Questions regarding PMP8740 - Parallelable Power Supply Module software code (Developed by Roberto Scibilia)

Q1) Software code file - main.h

Regarding test bit --> In main.h file defined test bit as 1. In project many c & h files have used test==0. But when test bit is make to 0? I searched but not find in project. Please help. 

Q2)  Software code file - main.c

Reagarding Status_charger (state) - I read firmware flowchart, understand states from 0 to 5 ( as per counter_status --> State 0 to 1 (510ms), State 1 to 2 (40ms), State 2 to 3 (510ms)

State 3 to 4 (510ms) & State 4 to 5 (20ms), correct? Not understand change State 5 to 6, please some guide.

Have a good day!!!

Thanks & Regards,

Vijay 

  • Hi Vijay,

    let me check with our experts on this topic. Will come back to you asap.

    Best regards,
    Andre
  • Vijay, Andre,
    Here are the two answers to the questions from Vijay:
    A1) I used "test" bit to put the converter into "test" mode, therefore several alarms and undervoltage & overvoltage protections are blanked and not taken into account. I make it by defining the "test" bit as zero or one directly into the definition main.h file and then compile it and download into uC. There are several ways to do that, for example by providing a menu on the display and enter a password, but this takes more code.
    A2) You are right, the states of the converter are 6. When status 5 is active, the output current is ramped up; when the converter reaches the programmed output current, status 6 is reached. In main.c the "switch(status_charge) cases stop to case 5, therefore this state is not showed in the display since actually nothing happens here. To recap, state 6 is the same of state 5 but at the time the converter delivers its programmed output current.
    Best regards,
    Roberto
  • Dear Roberto,

    Thanks for information. I am working as a Software Developer in Ador Digatron Pvt Ltd, Pune with Mrs. Anjana Salgaonkar.

    A1) I got it.

    A2) Ok. When voltage_output > 1000, again counter_status reached to counter_max(300)
    and status_charger++(means status_charger=6), correct?

    Q1) Software code file - main.c (PMP8740)
    Reagarding Status_charger (state) - states from 6 to 0. speed_state_down[6] = {30,15,60,60,150,3};
    When charge_enabled=0 (suppose I press key) and at that time status_charger=6 then following loop execution.

    Flag_PFC_Fail = 0;
    if(status_charger > 0)
    {
    counter_status = counter_status - speed_state_down[status_charger];
    if(counter_status < 0) counter_status =0;
    if(counter_status == 0)
    {
    status_charger--;
    counter_status = counter_max;
    }
    }

    Now status_charger==6 means speed_state_down[6],correct? But not present this value. I think put If statement
    if(status_charger>5) status_charger-- before this statement counter_status = counter_status - speed_state_down[status_charger];
    Or define speed_state_down[7] = {0,30,15,60,60,150,3}, am I correct? Please help.

    Q2) Software code file - main.c (PMP8740)
    Regarding FAIL_PRECHARGE (Reverse polarity) input - In charge_enabled == 1 case, following loop present.

    if(status_charger == 3)
    {
    if(((FAIL_PRECHARGE&BIT3)==BIT3)&&(test==0)) // check on precharge voltage fail pin
    {
    alarm = alarm | BIT6; // Set alarm DC/DC failure
    charge_enabled = 0; // Switch OFF the charger
    }
    }

    In hardware (PMP8740 Rev_C PCB) --> Normally Reverse polarity P3.3 = high and when Reverse polarity P3.3 = low then
    connected output is reverse, correct? If yes, upper if statement like if((~FAIL_PRECHARGE)&BIT3)==BIT3) check FAIL_PRECHARGE as low, correct?

    Q3) Software code file - timerA.c (PMP8740)

    TACCR0 = 16000; means 1KHz PWM as defined, correct?
    TACCR1 = 0; for Current PWM, means TACCR1 = 0 to TACCR1 = 16000 max. count as per TACCR0 definded, correct?
    TACCR2 = 0; for Voltage PWM, means TACCR2 = 0 to TACCR2 = 16000 max. count as per TACCR0 definded, correct?

    Q4) Software code file - timerB.c (PMP8740)

    TBCCR0 = 416; means 38KHz as defined & 38KHz(26 us) used for Timer B interrupt routine (26us x 39 = 1.014 ms generation), correct?
    TBCCR1 = 0 to TBCCR1 = 416 max.count as per TBCCR0 defined, am I correct? or another mode? Please help.

    Q5) Regarding Temperature Sensor - There is a LMT87 temperature sensor on the board(PMP8740 hardware). What makes the temperature read/sense?

    Q6) Regarding LCD Display - There is a LCD Display on the board(PMP8740 hardware). This is used as a Alphanumeric Display only, correct?

    Thanks & Regards,

    Vijay Shinde

  • Dear Vijay,
    Below you can find the answers to your questions:
    A2)--> correct
    Q1)--> You know, I developed this software 4 years ago, so I don't remember exactly all states and time assignment. I believe you are right and you can add another number to the vector to reach state 6 or put the instruction before, like you suggested. Please let me know if that makes sense.
    Q2)--> The whole story with Reverse Polarity and Fail-Precharge section, at that time, has been initiated but not implemented, so please discard it.
    Q3)--> That's correct.
    Q4)--> Correct: I suggest though to change 416 to 640: this will generate 25KHz PWM signal for the fan (in this moment, with 416, PWM frequency is 38.46KHz). Please modify also 39 to 25: this makes the timer again 1msec.
    Q5)--> The sensor LMT87 reads the PCB temperature of the DC/DC stage. If it is higher than programmed value, it will set an alarm and shut down the converter.
    Q6)--> Correct, this is an Alphanumeric Display only.
    Best regards,
    Roberto
  • Dear Roberto,

             Thanks for information.

    Thanks & Regards,

    Vijay Shinde

**Attention** This is a public forum