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.

TMS570LS0432: How to use printf( ) BQ76PL455EVM Battery cell voltages data show in CCS with TMS570LS0432?

Part Number: TMS570LS0432
Other Parts Discussed in Thread: BQ76PL455EVM

I follow the bq76pl455 EVM engineer tech.

set up read command  and some configuring for the bq76pl455EVM.

// Read sampled data from boards (section 3.3.2)
// 24 bytes - still configured for 8 AFE channels plus 2 AUX channels plus internal digital and analog die
// temperatures (see code for section 2.2.5.2)
nDev_ID = 0;
nSent = WriteReg(nDev_ID, 2, 0x20, 1, FRMWRT_SGL_R); // send read sampled values command
nSent = WaitRespFrame(bFrame, 27, 0); // 24 bytes data + packet header + CRC, 0ms timeout

// Send sample request to single board to sample and send results (section 4.2)
nDev_ID = 0;
nSent = WriteReg(nDev_ID, 2, 0x01, 1, FRMWRT_SGL_NR); // send sync sample command
nSent = WaitRespFrame(bFrame, 27, 0); // 24 bytes data + packet header + CRC, 0ms timeout

How could I see the response for  channel  data in CCS?

I probably know the Voltages data are in the bFrame

I set the bFrame in the Expressions,but it didn't found.

The engineer say that I should be including some type of print

so I try to printf() the data in the CCS consolo window.

I know that I should include #<stdio.h> in the code.

 Is any else need to set and notice in the CCS?

  • Hi,

    Here is the help for using printf in CCS:

    http://software-dl.ti.com/ccs/esd/documents/sdto_cgt_tips_for_using_printf.html

    There is no returned data from WaitRespFrame(bFrame, 27, 0); Please check if the command is correct. What is FRMWRT_SGL_NR used for? 

    I think you need to send read stored data command first, then read the data.

  • Hi QJ Wang,

    Thank for your reply!

    "FRMWRT_SGL_NR"   PACK TYPE :Single Device Write.

    "FRMWRT_SGL_R"     PACK TYPE :Single Device Read.

    I rewrote the code.

    I think (section 4.3.2) is the  read stored data command.

    // Read previously sampled data from single board (section 4.3.2)
    nDev_ID = 0;
    nSent = WriteReg(nDev_ID, 2, 0x20, 1, FRMWRT_SGL_R); // send read sampled values command
    nSent = WaitRespFrame(bFrame, 27, 0); // 24 bytes data + packet header + CRC, 0ms timeout

    and I find the channel data is stored in the Channel Select registers ( register address 3-6 ).

    How do I see the registers values in the CCS ?

    I tried select register address3(Channel Select registers)  to the watch window, but its value is not what I want.

    We know the  register address how can know the register value inside?

  • I set the bFrame in the watch window but almost value is 0.I need to watch the battery voltage in the bFrame format is sixteen bits.

    I set the read command and set the Interrupt to the bFrame