- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I've found a bug in the i2c_transfer_message_no_dma function.
wiced 3.0.0, STM32F2, platform_i2c.c line 685.
The i2c transfert function reads one more byte than requested, making the cursor of my eeprom device I'm driving one byte ahead, making next sequencial read erroneous.
Existing code:
if ( i == ( message->rx_length - 1 ) )
{
/* setup NACK for the last byte to be received */
I2C_AcknowledgeConfig( i2c->port, DISABLE );
}
Replace with:
if(message->rx_length == 1) continue;
if ( i == ( message->rx_length - 2 ) )
{
/* setup NACK for the last byte to be received */
I2C_AcknowledgeConfig( i2c->port, DISABLE );
}
- Labels:
-
SPI