In a previous post (https://ez.analog.com/dsp/sharc-processors/adsp-sc5xxadsp-215xx/f/q-a/63812/twi-slave-example-who-gots?ReplySortBy=CreatedDate&ReplySortOrder=Ascending) a partial example of some TWI Slave code was posted in response to misterdsp posting a query. I have the same issue of finding a working example of TWI Slave mode.
The example which was posted didn't provide all of the code. It was missing TWI_fillTransmitBuffer() & TWI_receive() from the code. I've tried creating the equivalent routines myself, but I can't seem to make the TWI work correctly when using a RaspberryPi 3B and the i2c utils as the master. I can get some very simple interactions to work (single byte write, word read), but anything more complex (reading 5 bytes) fails. I'm suspecting there is some special handling that is going on in the receive and transmit code that I'm missing.
If anyone has a complete example of a TWI Slave that can handle read/write with multiple bytes (basically act like an i2c EEPROM) I would love to see that example!
Hi ,Apologies for delayed response.I have a simple code for TWI(TWI0 Master and TWI1 Slave) that can be directly run on ADSP-BF609 EZ-kit. Please refer the same and modify as per your requirement.
Do u have the examples of TWI on ADSP-21489? thanks!
Hi Yosen,Please find the TWI example code available in the below mentioned Ezone links. Please refer and modify as per your requirement.ez.analog.com/.../239258ez.analog.com/.../235037 Regards,Lalitha.S
hello , do you have a example code for TWI master that can be directly run on BF706 , i run the example :BF609_temperature_sensor on BF706 , It run failture, thanks!
Hello,It is a duplicated thread for ez.analog.com/.../bf706-twi-failure, hence closing to avoid duplication of effort.Regards,Anand Selvaraj