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.

BQ76PL455A-Q1: UART communication with GUI

Part Number: BQ76PL455A-Q1
Other Parts Discussed in Thread: BQ76PL455A

Greetings,

I am using BQ76PL455A-Q1 for my project. I checked my hardware and tested it according to specifications provided in design guide. Right now I am connecting single board to bq76PL455A_GUI using a USB to TTL module(CP2102). When I open the GUI, it shows me the port number for my USB-TO-TTL module but on clicking OK a message stating "unable to open COM port " pops up. When I probed UART lines using DSO I found that GUI is transmitting data packets on RX(of BQ76PL) but TX line always remain high. I have already made hardware changes like - pulling down COMML- to ground using 100K, COMML+ connected to V5VA0. My questions are:-

(1) What voltage I will get on TX pin of BQ76PL455A ? Right now I am getting 5V on TX pin(no pull-ups are there)

(2)Is it necessary to use FTDI converters (as I am using CP2102 module)?

Thanks

Best Regards

Bhushan 

  • HI Bhushan,

    GUI is developed with FDTI converter. I think you have to use the FDTI converter with PL455A GUI.

    Roger

  • Greetings Roger Hwang,

    Thanks for your guidance. I am going to buy FTDI converter cable. However can you kindly tell me that is it normal to get 5V on TX line of BQ76PL455A-Q1 (even if I don't pull-up tx line)?

    Thanks

    Best Regards

    Bhushan

  • Greetings,

    I am still not able to connect my BQ76PL ic to GUI, however able to get response from BQ76PL using a microcontroller.

    Thanks 2 all especially Roger Hwang for guidance.

    Thanks

    Best Regards

    Bhushan 

  • Bhushan 

    TX has to pull up by either PL455A or MCU.

    TX is usually pull up from MCU side.

    Have you check the PL455A evm schematic from TI product folder?

    Please check it out.

    thanks,

    Roger

  • Hi Bhushan,

    Do you still need help with this issue?

    Best regards,

    Leslie

  • Greetings Leslie,

    I need guidance on following data bytes received from BQ76PL455A. Right now I have interfaced a microcontroller with single BQ76PL455A. Here is the main() running on microcontroller:-

    void main()
    {
       
       Uart5_initilize();              //UART5 initialize to communicate with BQ76pl455a
       Uart2_initilize();              //UART2 initialize to communicate with PC
        delay_ms(5000);
      // BQ76pl455A initialization
       wakePL455();         //Wake_up signal for BQ76pl455a
       commclear();         //Communiction clear
       CommReset();         //Communiction reset
       for(nDev_ID = 0; nDev_ID <= Daisy_chain; nDev_ID++)
       {
        nSent = WriteReg(nDev_ID,12, 0x40, 1, FRMWRT_ALL_NR);        // send out broadcast pwrdown command
        delay_ms(5); //~5ms
        wakePL455();
        delay_ms(5); //~5ms
       }
      // Mask Customer Checksum Fault bit
         nSent = WriteReg(0, 107, 0x8000, 2, FRMWRT_ALL_NR); // clear all fault summary flags
      // Clear all faults
         nSent = WriteReg(0, 82, 0xFFC0, 2, FRMWRT_ALL_NR);                // clear all fault summary flags
         nSent = WriteReg(0, 81, 0x38, 1, FRMWRT_ALL_NR); // clear fault flags in the system status register
      // Auto-address all boards
         nSent = WriteReg(0, 14, 0x19, 1, FRMWRT_ALL_NR); // set auto-address mode on all boards
         nSent = WriteReg(0, 12, 0x08, 1, FRMWRT_ALL_NR); // enter auto address mode on all boards, the next write to this ID will be its address
      // Set addresses for all boards in daisy-chain
         for (nDev_ID = 0; nDev_ID <=Daisy_chain; nDev_ID++)
         {
          nSent = WriteReg(nDev_ID, 10,4, 1, FRMWRT_ALL_NR); // send address to each board,for single board address is 4
         }
         nDev_ID = 4;
      // Mask Customer Checksum Fault bit
         nSent = WriteReg(nDev_ID, 107, 0x8000, 2, FRMWRT_ALL_NR); // clear all fault summary flags
      // Clear all faults
         nSent = WriteReg(nDev_ID, 82, 0xFFC0, 2, FRMWRT_ALL_NR); // clear all fault summary flags
         nSent = WriteReg(nDev_ID, 81, 0x38, 1, FRMWRT_ALL_NR); // clear fault flags in the system status register
      // Auto-address all boards
         nSent = WriteReg(nDev_ID, 14, 0x19, 1, FRMWRT_ALL_NR); // set auto-address mode on all boards
         nSent = WriteReg(nDev_ID, 12, 0x08, 1, FRMWRT_ALL_NR); // enter auto address mode on all boards, the next write to this ID will be its address
      // Enable all communication interfaces on all boards in the stack
         nSent = WriteReg(nDev_ID, 16, 0x10F8, 2, FRMWRT_ALL_NR); // set communications baud rate and enable all interfaces on all boards in stack
      // Configure AFE
         nSent = WriteReg(nDev_ID, 60, 0x00, 1, FRMWRT_ALL_NR); // set 0 mux delay
         nSent = WriteReg(nDev_ID, 61, 0x00, 1, FRMWRT_ALL_NR); // set 0 initial delay
      // Configure voltage and internal sample period
         nSent = WriteReg(nDev_ID, 62, 0xCC, 1, FRMWRT_ALL_NR); // set 99.92us ADC sampling period
      // Configure the oversampling rate
         nSent = WriteReg(nDev_ID, 7, 0x7B, 1, FRMWRT_ALL_NR); // set samples=8, sampling period for aux and voltage channels=12.6us
      // Clear and check faults
         nSent = WriteReg(nDev_ID, 81, 0x08, 1, FRMWRT_ALL_NR); // clear fault flags in the system status register
         nSent = WriteReg(nDev_ID, 82, 0xFFC0, 2, FRMWRT_ALL_NR); // clear all fault summary flags
      // Select number of cells and channels to sample
            nSent = WriteReg(nDev_ID, 13, 0x10, 1, FRMWRT_ALL_NR); // set number of cells to 16
            nSent = WriteReg(nDev_ID, 3, 0xFFFFFFE7, 4, FRMWRT_ALL_NR); // select all cell, all AUX channels,  internal digital die temperature, internal analog die temperature, VDD18 internal digital supply, 4.5V Analog die reference, Sum of cells, -ve charge pump
                                      
            nDev_ID = 4;
        
            nSent = WriteReg(nDev_ID, 144, 0xD1EC, 2, FRMWRT_ALL_NR); // set OV threshold = 4.1000V
            nSent = WriteReg(nDev_ID, 142, 0x6148, 2, FRMWRT_ALL_NR); // set UV threshold = 1.9000V
             nRead = ReadReg(4, 10, &wTemp, 1, 0);
            uart2_write(wTemp);  //received 0x04 (sigle board device id fixed by me) on terminal, 
             delay_ms(500); 
            nSent = WriteReg(4, 2, 0x02, 1, FRMWRT_ALL_NR); // send sync sample command
            nSent = WaitRespFrame(bFrame, 27, 0);
        
         
             while(1)
             {
             
         nDev_ID = 4;
          nSent = WriteReg(nDev_ID, 2, 0x00FFFFFFE700, 6 , FRMWRT_SGL_NR); //sample and store all values with no over-sampling
          memset(myFrame, 0, sizeof(myFrame));
             delay_ms(1000);
           nSent = WriteReg(nDev_ID, 2, 0x20, 1, FRMWRT_SGL_R); // send sync sample command
            nSent = WaitRespFrame(bFrame, 75, 0); // UART5 RX interrupt is initialized so don't care for 75 
             delay_ms(400);
            for(i=0;i<75;i++)   // again 75 done deliberately to analyse how many bytes are being received
          {
            uart2_write(myFrame[i]); //transmit received data to terminal
            delay_ms(7);
          }
           
           delay_ms(5000);   //repeat the loop
            }
    }   //end of main()

     Following is the data byte I am getting on terminal:-

    0x3D 0x9D 0xB6 0xA1 0x64 0xA1 0x0D 0xA0 0xE1 0xA0 0xFF 0xA0 0x80 0xA0 0xA4 0xA0 0xDB 0xA0 0x71 0xA0 0x67 0xAA 0xB3 0x89 0x13 0xA1 0x00 0xA0 0x87 0xA0 0xB6 0xA0 0x5E 0x00 0x33 0x00 0x0B 0x00 0x07 0x00 0x07 0x00 0x07 0x00 0x07 0x00 0x07 0x00 0x13 0x7A 0xB0 0x66 0x4B 0x5B 0x98 0xEA 0x45 0x00 0x13 0x00 0x07 0x00 0x07 0x4D 0x96 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

    If I am not wrong then 0x3D(first byte)(decimal-61) is response byte  from BQ76P ic telling number of data bytes transmitted-1(excluding 2 bytes of CRC and response byte).

    After response byte, 16*2 bytes for 16 cell voltage. Then 8*2 bytes of AUX0-AUX7 values.

    0x7A 0xB0 - Internal Digital die temperature           0x66 0x4B -Analog Die Temp

    0x5B 0x98- VDD_18 internal digital supply        0xEA 0x45- 4.5 Analog Die refernce               0x4D 0x96- CRC

    So what are      0x00 0x13 0x00 0x07 0x00 0x07 (are they sum of cells and -ve supply charge pump?)

    Thanks

    Best regards

    Bhushan

  • Hi Bhushan, 

    This command from your code is what defines what channels are sampled:

    nSent = WriteReg(nDev_ID, 3, 0xFFFFFFE7, 4, FRMWRT_ALL_NR); 

    If you see section 7.6.3.3 "Channels 0x03-06 (3-6) Channel Select" of the datasheet, you are enabling the last 3 bits too which is what you are seeing (CMD_REFSEL, CMD_MODULESEL, CMD_VMMONSEL).

    Regards,

    Leslie

  • Greetings Leslie Marquez,

    Sorry for my late response. Thanks for your guidance. I got your point. 

    Thanks again.

    Best Regards

    Bhushan