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.
Hello,
Thank you for the replay.
1->SysCtlClockGet , is now replaced properly
2->while(!(I2CMasterBusy(I2C8_BASE))); is removed .
Two more changes i made according to data sheet
1->Open Drain Configuration for data pin (GPIOPinTypeGPIOOutputOD(GPIO_PORTD_BASE, GPIO_PIN_3);//Open drain)
2->I2C8_MTPR_R = 0x24;This register is configured as switch required i2c-slave frequency is around 2.5mhz.(yet to probe and verify)
3->I2C8_MTPR_R register configuration i have a doubt as i am using (I2CMasterInitExpClk(I2C8_BASE, ui32SysClock, false); will this configuration helps me to generate SCL Clock to 2.5 mhz.Any other configurations require..............
4->In continuous run code is going to FaultISR,But while using braekpoints its not occuring....How to achieve this stability..
Thank you in advance and for past suggestions.
Regards,
Krishnan
Hello Amit,
I have one more doubt
According to datasheet
SCL_PERIOD = 2 × (1 + TIMER_PRD) × (SCL_LP + SCL_HP) × CLK_PRD
For example: in my case 120MHZ SYSTEM CLOCK SO
CLK_PRD = 8.33 ns,systemclock is 120mhz
TIMER_PRD = 1,default value
SCL_LP=6,constant
SCL_HP=constant
SCL frequency =1/SCL_PERIOD
SCL_PERIOD =2 × (1 + 1) × (10) × 8.33 =333.2
SCL frequency =3MHZ
But while probing we are getting 77.7 khz.
My configuration is
ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);
SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C8);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);
GPIOPinConfigure(GPIO_PD2_I2C8SCL);
GPIOPinConfigure(GPIO_PD3_I2C8SDA);
// Select the I2C function for these pins. This function will also
GPIOPinTypeI2CSCL(GPIO_PORTD_BASE, GPIO_PIN_2);
GPIOPinTypeI2C(GPIO_PORTD_BASE, GPIO_PIN_3);
GPIOPinTypeGPIOOutputOD(GPIO_PORTD_BASE, GPIO_PIN_3);//Open drain
//
I2CMasterInitExpClk(I2C8_BASE, ui32SysClock, false);
ui32SysClock is correctly returning 120mhz.
Where i am going wrong.
Regards,
Krishnan