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.

I2C problem with my clock (c6713)

Hi,

    I'm new using the DSP and i'm trying to transfer data from temp. sensor. So, first of all, i started to configure my SCL0 (I2C0 clock) to 100kHz right now, but i got nothing on this pinout. Can anybody help me to configure the right register to get a clock.

Here's the code i have right now. 

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

#include <csl.h>
#include <csl_i2c.h>
#include <csl_pll.h>

I2C_Handle hI2c;
I2C_Config i2c_config;

main(){

CSL_init();

DSK6713_init(); // Initialize the board support library

CSL_init(); // Initialize the chip support library


// Open I2c device 0 and reset I2C module:

hI2c=I2C_open(I2C_DEV0,I2C_OPEN_RESET);


// Configure I2C module for a clock of 100kHz:

i2c_config.i2cclkh = 35; // Clock high

i2c_config.i2cclkl = 35; // Clock low

i2c_config.i2ccnt = 1; // Transfer 1 data word at a time

i2c_config.i2coar = 0; // not needed

i2c_config.i2cier = 0; // Interrupts are disabled

i2c_config.i2csar = 0xa1; // Slave address register

i2c_config.i2cmdr = 0x0620; // Mode register

i2c_config.i2cpsc = 13; // for a clock frequency of 8MHz


I2C_reset(hI2c); // Reset I2C module to configure

I2C_config(hI2c,&i2c_config); // Configure I2C module using config structure

I2C_outOfReset(hI2c); // Take module out of reset mode


while(1);

}

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thx.