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.

MSPM0G3507-Q1: Application Programming Interface (API) documentation for hardware blocks

Part Number: MSPM0G3507-Q1

Tool/software:

Hi,

Although I'm using code taken from project examples, I'm stuggling with programing the I2C interface to the LTC2495 ADC.

Is there a programming technical reference document? The Technical Reference Manual for the MSPM0 G-Series parts is very nice for the hardware understanding, but it does not include a API.

I hope you can point me in a good direction.

Thanks,

Dave

p.s. Please note the Infineon I2C datasheet I'm attaching. I've used the PSOC for about 10 years and I'm spoiled :-). 

Infineon-Component_I2C_V2.10-Software Module Datasheets-v03_05-EN.pdf

  • Hi, David

    We don't have a API user's guide.

    But you can refer to API's source code.

    Such as I2C's API: DL_I2C_fillControllerTXFIFO

    In dl_i2c.h:

    /**
     *  @brief      Fills the controller TX FIFO with data
     *
     *  @param[in]  i2c     Pointer to the register overlay for the peripheral
     *  @param[in]  buffer  Pointer to buffer of bytes
     *  @param[in]  count   Number of bytes to fill controller TX FIFO from buffer
     *
     *  @return     Number of bytes that were successfully written
     */
    uint16_t DL_I2C_fillControllerTXFIFO(
        I2C_Regs *i2c, uint8_t *buffer, uint16_t count);

    In dl_i2c.c:

    uint16_t DL_I2C_fillControllerTXFIFO(
        I2C_Regs *i2c, uint8_t *buffer, uint16_t count)
    {
        uint16_t i;
        for (i = (uint16_t) 0; i < count; i++) {
            if (DL_I2C_isControllerTXFIFOFull(i2c) == false) {
                DL_I2C_transmitControllerData(i2c, buffer[i]);
            } else {  // Controller TX FIFO is full
                break;
            }
        }
        return i;
    }

    Regards,

    Lucy