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.

Instructions from I2C_io_expander macro

Other Parts Discussed in Thread: OMAPL138

Hi there!

I was trying to configure the I2C module for a C6748 DSP.

Firstly I installed quickStartOMAPL1x_rCSL that contains a series of macros from which i have chosen the example I2C_io_expander. 

I was just debuggin I2C_io_expander: - This example initializes the I2C peripheral using the rCSL macros. Once initialized, the I2C peripheral acts as a master transmitter and writes to the IO Expander to configure the User LED1 as output. The I2C is then re-configured as a master receiver and waits until detecting user input on the DIP switch SW2-1. Once user input has been supplied, the User LED1 will blink five times before the example exits. The use of polling unique bits in the I2C status register has been implemented to identify the status of the transmit and receive buffers.

In this example there is this part of code:

static void init_OMAPL138 (void)

{

      // Open Permissions to SYSCFG Registers

      CSL_FINS(sysRegs->KICK0R, SYSCFG_KICK0R_KICK0, KICK0_KEY);

      CSL_FINS(sysRegs->KICK1R, SYSCFG_KICK1R_KICK1, KICK1_KEY);

 

      // Configure I2C0 Data & Clock Signals

      CSL_FINST(sysRegs->PINMUX4, SYSCFG_PINMUX4_PINMUX4_15_12, I2C0_SDA);

      CSL_FINST(sysRegs->PINMUX4, SYSCFG_PINMUX4_PINMUX4_11_8, I2C0_SCL);

 

      // Configure I2C0 with the DSP CPU

      CSL_FINST(sysRegs->SUSPSRC, SYSCFG_SUSPSRC_I2C0SRC, DSP);

 

      // Close Permissions to SYSCFG Registers

      CSL_FINS(sysRegs->KICK0R, SYSCFG_KICK0R_KICK0, KICK_LOCK);

}/* init_OMAPL138 */

 

Can someone explain more about these instructions?

I need more informations about the fields of registers like: 

SYSCFG_KICK0R_KICK0, 

SYSCFG_KICK1R_KICK1,      

SYSCFG_PINMUX4_PINMUX4_15_12,

SYSCFG_PINMUX4_PINMUX4_11_8,

SYSCFG_SUSPSRC_I2C0SRC.

Thanks!

Giuseppe