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,
I am trying to read data from a slave processor which will send 2 byte of data whenever it receives clock from the master.
This 28379D processor gets data in the buffer but it does not send stop command after I2caRegs.I2CCNT = 2; becomes 0. here is the scope image of transaction but clock remains low as the stop condition is not sent.
here is my initialization code:
I2caRegs.I2CPSC.all = 19; // Prescaler - need 7-12 Mhz on module clk
I2caRegs.I2CCLKL = 495/2; // NOTE: must be non zero
I2caRegs.I2CCLKH = 495/2; // NOTE: must be non zero
I2caRegs.I2CIER.all = 0x24; // Enable SCD & ARDY __interrupts
I2caRegs.I2CSAR.all = 0x0044; //
I2caRegs.I2CFFRX.all = 0x6000;
routine:
I2caRegs.I2CMDR.all = 0x6C20; //0x2E20;
while(I2caRegs.I2CFFRX.bit.RXFFST <2) {}
for(j =0 ;j < 2; j++){
data[j] = I2caRegs.I2CDRR.all;
Kindly let me know what should I do ? the slave will always sends two byte of data.
I have one more question!
if I want to have a read transaction from slave in this way:
Send Address 0x00
write Command Register 0x3D
send 8 clock pulses !
How can this be done?
Currently in my code
I write address
I Write 0x3D
I send stop command(which I dont want)
I Send Address(again which I dont want)
Then send 8 pulses to read data?
How can this achieved using RM mode I am a bit confused on how to solve this?
Thanks
I have posted it here again:
TMS320F28379D: i2c Problem - C2000 microcontrollers forum - C2000™︎ microcontrollers - TI E2E support...