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.

BQ76952: BQ76952 Programming by Host

Part Number: BQ76952

Other Parts Discussed in Thread: BQSTUDIO

1. I don't have complete information. In any programming spi-protocol,example
SLUAA11A-BQ76952 Software Development Guide.

2.Request an example of spi-protojol programming, writing commands (16-bit)

3.Settings What are the steps sequence ?

  • Hi,

    Have you looked at the Code Examples in the BQ76952 product folder (https://www.ti.com/product/BQ76952#software-development )? SPI examples are included. 

    Regards,

    Matt

  • Hi Matt,

    I believe Wirote is aware of the product folder, however, he wants to have the full access to the code. 

    For example:

    Do you have the complete code (Subcommand 16bit) which you could share with us via email? 

    Thanks. 

  • Hey Ernest,

    While I am not aware of any other SPI code, Matt might have an idea of where to look. Unfortunately he is out of office today.

    As far as I'm aware, the only full example code that is available is the I2C code at the bottom of the document. SPI isn't a very widely used communications protocol on this device, so we haven't created much material for it. Subcommands should work the same way that they do on I2C, however. You could follow the I2C guide if you are having trouble using subcommands.

    Thanks,
    Caleb

  • Hi Ernest,

    This example was created using the Command Sequence window in BQStudio. It just is doing a 1 byte read from 0x9261 (first write to 0x3E the data 0x61 0x92, then read one byte from 0x40 to see the result). 

    So here is how you would do this in code:

    TX_Reg[0] = 0x61

    TX_Reg[1] = 0x92

    SPI_WriteReg(0x3E, TX_Reg, 2);

    delayUS(2000);

    SPI_ReadReg(0x40, RX_data, 1);

    Best regards,

    Matt