As you can see, the clock changes after a command set (4 bytes). Since changing the clock is not possible while a device is operating, the last byte might be a response from the slave (right?). This particular command set is for setting the zone.
I'm having issues to receive data like this from the slave device.
Receiving data on Arduino recquires a requestFrom(). But this function "sends more data" to the slave as you can see:
How could I possibly get the same result as the first image? Mainly how to get data without requestFrom(). (still learning more from the datasheet but stuck at this point)
(tried to be more direct and specific here, but my knowledge on Embedded Systems are not the best, nor my English.)
You need to look at all the signals shown in figure 7-2 in order to determine which mode it's starting up in.
Are you supplying it with a CLK during power-up and holding RST low?
Not sure about the RST, it should be on the NC ports but apparently they have no contact on this particular project.
I'm just assuming things by looking at the CLK.
Weird to say, but all the sample communication that "works" seems to have a few differences.. It's like looking at the wrong datasheet but it is actually the right one. Literal nonsense.
Pretty sure it is, didn't change the ports for the second read, only devices.
Even so, there is the difference in the number of clocks and both are supposed to be I2C I guess.
It is sending the Set User Zone to 1 command. The 0x5A is actually a 0xB4 when looking at all 8 bits.
0xB4 0x03 0x01 0x00
This command does not require a response, so I think that those other 8 slow clocks is a reset sequence from the Master. It may actually work OK with only 8 clocks so it's not truly I2C compliant.
I see. When I write to other address like 0x58, it actually gives a 0xB0.
The problem comes when I try to read a user zone. The only way I can do it is by sending 0xB2. Turns out that sending it only works if I directly write 0xB2 or start a transmission with the address 0x59.
Even tough, there is still a need to call a command set to read, then the device answer.
But as mentioned
And after some research, with Wire.h library it is technically impossible.
Started to use Microchip Studio.
Not sure if using the Arduino UNO will still be good, anyways I contacted Microchip to get some "example code" mentioned on application notes.
This one does not send a new data before reading, but the reading process is really odd.
Soon I will receive more orientantion and post final conclusions here.
The response of CryptoMemory will cause contention with the host on a standard TWI/I2C bus. Typically CryptoMemory cannot be used on a standard TWI bus but requires a modified TWI protocol to account for it.
After a while, I got some response and well, that explains a lot.
Basically writing data wasn't an actual problem for typical I2C bus. But that's a different story for reading/receiving data from the CryptoMemory.