- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am reading values via I2C from an RTC (RX8010SJ) in Master mode.
This works so far, but the I2C Stop Condition is not set. Subsequent I2cStart then returns error -2 (Timeout).
I am using the command "pstcI2c->IBCR = 0x01;" from mb9bfxxx_l3-v19.
When I configure SDA and SCL as inputs manually, the Stop Condition is set and recognized by the slave.
There are no examples for I2C master mode in Cypress' PDL 2.0.1, only for slave mode.....
Any hints?
Best regards,
Falk
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you are not using MDK-KEIL, please ignore following.
The problem I encountered at the thread
I2C read hangs with MDK (PDL 2.1.0, PSoC Creator 4.0)
was not (last) ACK/NACK problem.
It was when assigning a byte to byte struct which comprises
multiple volatile bit fields (having ~8 x 1_bit bit fields) type/struct,
GCC, IAR spit a few mnemonics since it is an assignment of a byte,
but MDK-KEIL generates dozens of mnemonics since assigning
multiple volatile fields are prohibited.
(I think it was about 40~50 mnemonics)
And this made i2c timeout.
How about trying
(1) only assigning a bit field
pstcI2c->IBCR.SCC = 0x01;
(2) follow similar workaround shown in the thread
I2C read hangs with MDK (PDL 2.1.0, PSoC Creator 4.0)
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No it is not helpful as it refers to (last) ACK/NACK.
This works for me but one clock cycle later the master does not create the Stop Condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you are not using MDK-KEIL, please ignore following.
The problem I encountered at the thread
I2C read hangs with MDK (PDL 2.1.0, PSoC Creator 4.0)
was not (last) ACK/NACK problem.
It was when assigning a byte to byte struct which comprises
multiple volatile bit fields (having ~8 x 1_bit bit fields) type/struct,
GCC, IAR spit a few mnemonics since it is an assignment of a byte,
but MDK-KEIL generates dozens of mnemonics since assigning
multiple volatile fields are prohibited.
(I think it was about 40~50 mnemonics)
And this made i2c timeout.
How about trying
(1) only assigning a bit field
pstcI2c->IBCR.SCC = 0x01;
(2) follow similar workaround shown in the thread
I2C read hangs with MDK (PDL 2.1.0, PSoC Creator 4.0)
moto