2011-02-24 02:05 AM
I2c with Nack peripherical
2011-05-17 05:25 AM
Not sure if it ''ll work but you can try it out.
/* I2C1 configuration*/ I2C_InitStructure.I2C_Mode = I2C_Mode_I2C; I2C_InitStructure.I2C_DutyCycle = I2C_DutyCycle_2; I2C_InitStructure.I2C_OwnAddress1 = 0x28; I2C_InitStructure.I2C_Ack = I2C_Ack_Disable; I2C_InitStructure.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit; I2C_InitStructure.I2C_ClockSpeed = I2C_CLOCK_SPEED; I2C_Init(I2C1, &I2C_InitStructure);2011-05-17 05:25 AM
It do not works, because 'I2C_Ack_Disable' disable the ACK from STM32 to peripheral.
I need to send data to peripheral , although the peripheral send me Nack.
Thanks!
2011-05-17 05:25 AM
''I have a i2c peripherical that can't send ACK''
Surerly the ACK is an essential part of the I2C protocol? Therefore, if the peripheral can't send ACK, then it is not an I2C peripheral?!2011-05-17 05:25 AM
Surely the ACK is an essential part of the I2C protocol?
Therefore, if the peripheral can't send ACK, then it is not an I2C peripheral?!
Or a cunning trick to avoid licencing the real protocol?
2011-05-17 05:25 AM
''Or a cunning trick to avoid licencing the real protocol?''
In that case, it must not be called ''I2C''; it would have to be called ''TWI'' or ''I2C-like'' or somesuch - but the name ''I2C'' may only be used for fully-conforming implementations.2011-05-17 05:25 AM
Hi,
can you post your code source. thx.2011-05-17 05:25 AM
Try this:
1. Issue START, 2. Wait for SB, 3. Send ADDRESS, you'll receive NACK. 4. WAIT for AF, it will be set because of NACK. It ''replaces'' for your case the ADDR and TXE bits. 5. do reset AF, send your next byte, WAIT for AF set,until all bytes sent 6. Issue STOP.