Nope, there isn't a stop condition before the repeated start. But when i read the normal address space, there is a ACK from the FRAM after the address bytes. When i read the manufacturer and product id, there is a NACK. I think this is the cause of the problem, because the TWI hardware itself sends a stop condition if a NACK is received. I have read the discription of the TWI Interface from Atmel, but i can't find any configuration that prevents this behavior.
I don't know exactly which TWI interface behaves in the correct way, the SAM or the FRAM.
Fram I2C on Due
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67391
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Fram I2C on Due
For comparison, try bit-banging the I2C signals.
That will give you complete control over the high/low transitions for both SDA and SCL, so you can make sure those do what they're supposed to. If those are right and the chip doesn't respond, we can call it a hardware error.
That will give you complete control over the high/low transitions for both SDA and SCL, so you can make sure those do what they're supposed to. If those are right and the chip doesn't respond, we can call it a hardware error.
- c0rsa1r
- Posts: 1
- Joined: Wed Dec 02, 2015 5:46 am
Re: Fram I2C on Due
Hi, sorry for necroing this thread. I received a FRAM i2c module and it's working fine on my uno and mega, but it doesn't work on my DUE, even using the new libraries.
Is it supposed to work?
I tryied both i2c connectors (sdascl and sda1scl1) and the error I get all the time with the provided sketch is:
Unexpected Manufacturer ID: 0xFFF
No I2C FRAM found ... check your connections
But, if I run Gammon's i2c scanner sketch, it does find the fram, at address 80 (0x50) which I suppose is the default setting.
I2C scanner. Scanning ...
Found address: 80 (0x50)
Done.
Found 1 device(s).
What should I do?
Is it supposed to work?
I tryied both i2c connectors (sdascl and sda1scl1) and the error I get all the time with the provided sketch is:
Unexpected Manufacturer ID: 0xFFF
No I2C FRAM found ... check your connections
But, if I run Gammon's i2c scanner sketch, it does find the fram, at address 80 (0x50) which I suppose is the default setting.
I2C scanner. Scanning ...
Found address: 80 (0x50)
Done.
Found 1 device(s).
What should I do?
- mccrashman
- Posts: 8
- Joined: Sat Jan 31, 2015 12:07 pm
Re: Fram I2C on Due
Sorry, but i have never found any solution but the identification bytes can't be read out. The Library always mentions that the device wasn't found but it works for the rest.
So you can simply ignore this error message. You can check the fram itself by writing and reading known pattern to it.
So you can simply ignore this error message. You can check the fram itself by writing and reading known pattern to it.
- Neuromod
- Posts: 2
- Joined: Thu Sep 13, 2018 10:44 pm
Re: Fram I2C on Due
Still no solution? I haven't found any other reference to this issue...
- Neuromod
- Posts: 2
- Joined: Thu Sep 13, 2018 10:44 pm
Re: Fram I2C on Due
This may be related!mccrashman wrote:Nope, there isn't a stop condition before the repeated start. But when i read the normal address space, there is a ACK from the FRAM after the address bytes. When i read the manufacturer and product id, there is a NACK. I think this is the cause of the problem, because the TWI hardware itself sends a stop condition if a NACK is received. I have read the discription of the TWI Interface from Atmel, but i can't find any configuration that prevents this behavior.
I don't know exactly which TWI interface behaves in the correct way, the SAM or the FRAM.
TWI_CR (TWI control register)
If STOP (bit 1) == 1:
"– In master read mode, if a NACK bit is received, the STOP is automatically performed."
http://ww1.microchip.com/downloads/en/D ... asheet.pdf
p 736
Please be positive and constructive with your questions and comments.