cancel
Showing results for 
Search instead for 
Did you mean: 

STR712 I2C 0 serial debug

terrance
Associate II
Posted on August 30, 2006 at 22:07

STR712 I2C 0 serial debug

1 REPLY 1
terrance
Associate II
Posted on August 18, 2006 at 18:04

can not get the I2C 0 Serial Port on the STR712F to work properly. I'm trying to use the I2C 0 in Master Transmit Mode using the C code below => exactly as described on pages 213 through 216 of the STR712F Reference Manual. I have also attached copies of the STR712F I2C driver written in C (i2c.c) and the include file (i2c.h) both written by RAISONANCE.

Symptoms:

1) The Start bit of I2C 0 becomes active and the Setting of the SB bit Flag is recognized properly (SCL and SDA pins change state).

The debugger shows the correct change of state of I2C 0 CR and SR1 registers.

2) The I2C 0 address of the slave (PCM3052A) is written to the DR register. But the data never makes it there!

The debugger shows that DR never changes (always zero) and the I2C_ENDAD bit never RESETs, because there is no data to transmit!

I have double checked the STR712F Memory Map (see 71x_map.h) by Raisonance and it's correct, so it appears that the data from the ARM7 never makes it to the I2C0 DR register. (I have tried the Raisonance ''I2C_AddressSend'' function and writing the DR register directly using I2C0->DR (see code one is commented in and the other is commented out). Also I have halted the program and directly written the I2C0 DR register but, it will not take the data! And, I have had the STR712F uC replaced on the target hardware, with no affect.

I have included both the I2C0 Initialization and the I2C0 Write PCM3052A functions in the file labeled I2C0.c.

Note, the I2C1 works with the same code on the Raisonance REVA development system => The STR712 clocks and APB Peripherals are all enabled on both systems

________________

Attachments :

71x_map.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtQF&d=%2Fa%2F0X0000000aPm%2FALKkbW672MBf_VYJBLR.v8gq4JCB9oocZHM0m6pTZSM&asPdf=false

i2c.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtQK&d=%2Fa%2F0X0000000aPn%2FZszizqUslkHE3hcZnPWxDUWaK1aJ4UJ4MteVtHyLAdU&asPdf=false

I2C0.C : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtQP&d=%2Fa%2F0X0000000aPp%2FWg5SPAd3xZHzKGj_bAvAU32WFzMIECy3W4qeK6R0ckg&asPdf=false