Can't use repeated start for write-then-read with iicps
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Start in xiicps/src/xiicps_master.c at the linked block in XIicPs_MasterSend(), then compare it with XIicPs_MasterRecv() and the AR#61665 behavior described in the issue. Reproduce a write-then-read transaction with the iicps driver and verify that the trace shows a repeated start, with expected interrupts completing both transactions.
Written by the indexing model from the issue text.
Description
I was trying to use the iicps driver to communicate with a chip that requires a write (internal address setup), repeated start, then a read transaction in order to read data.
I found that using XIicPs_MasterSend() always resulted in an explicit STOP and START condition between the write and read transactions (see protocol analyzer trace). I found AR#61665 which says there is a hardware issue in generating interrupts if you do a READ, repeated start, READ process.
It looks like the code linked below was added to XIicPs_MasterSend(), but based on comments should have been added to XIicPs_MasterRecv() in order to deal with AR#61665. Indeed, if I move that block from XIicPs_MasterSend() to the end of XIicPs_MasterRecv() I'm able to generate a repeated start condition after write transactions, and I get expected interrupts at the end of both the write and read transactions (see second protocol analyzer trace).
Original Trace (red is stop condition, green is start condition):

Fixed Trace (red is stop, green is start/re-start):

- Dominant language
- HTML
- Stars
- 24
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Status: Opened
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
zephyrproject-rtos/zephyr#120157 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
pending-approval
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
zwave-js/firmware-updates#390 · 3 comments ·