- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am implementing an I2C slave. I have used other slaves where the master would send the device address, a memory address, and then read bytes. The bytes read would be from the address sent onwards.
Is this possible with the SCB I2C slave? Looking at the manual it seems like the slave can simply be read from the memory address zero (first element in an array) and as many bytes as the master reads.
Is this correct?
Thanks
Rich
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
buffer address or position could be directly addressed by the master No, you have to wait for a master address write, then set up (or fill) the master read buffer and let the master do the read.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The slave maintains two buffers: one where the writes from master go to (ie the memory address you mention) and one where the master reads from. So a fast reaction to setup the transfer buffers accordingly is required.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Bob,
I can see how setting up the buffers fast is important. My question was whether a buffer address or position could be directly addressed by the master. It doesn't look like it. Perhaps by writing custom slave API functions?
Rich
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
buffer address or position could be directly addressed by the master No, you have to wait for a master address write, then set up (or fill) the master read buffer and let the master do the read.
Bob