cancel
Showing results for 
Search instead for 
Did you mean: 

I2C ACK Question

giwonKIM
Associate III

Hi, I bought the Nucleo-411RE board a few days ago, and try to test i2c protocol.

In this MCU's reference manual(RM0383) page 492,493, about I2C register CR1, Bit 10 ACK, It explains me that acknowledge returned after a byte is received(matched address or data). 

Is it automatic? If my mcu received correct address, the mcu automatically returned ack by hardware?

I saw that HAL_I2C_Receive function but there is only bit setting about ack. No ack output instruction.

How return the mcu ack ? by hardware or software?

Thank you.

If you have any questions, please ask me.

2 REPLIES 2
Karl Yamashita
Principal

The slave returns the ACK. The HAL driver will return a status. If it returns HAL_ERROR, you'll have to get the error to figure what caused the error as it could be one of several things..

I was told that if a devices starts to smoke, put the smoke back in. I guess I never got all the smoke because the device never worked afterwards.
Don't worry, I won't byte.
TimerCallback tutorial! | UART and DMA Idle tutorial!

If you find my solution useful, please click the Accept as Solution so others see the solution.
Saket_Om
ST Employee

Hello @giwonKIM 


@giwonKIM wrote:

How return the mcu ack ? by hardware or software?


The ACK is sent by the hardware when a byte is received or an address match occurs.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om