Skip to main content
Visitor II
January 13, 2020
Question

Hi I'm using STM32F030R8 and trying to communicate with atecc508a using I2C. The datasheet of atecc508a says that it needs a wake up command by transmitting 0x00 at its I2C address 0xC0.

  • January 13, 2020
  • 1 reply
  • 910 views

I use the HAL library function to transmit the wake up command to its I2C address.

#define I2C_ADDRESS 0xC0

HAL_I2C_Master_Transmit(&hi2c1, I2C_ADDRESS, 0x00, 4, 1000)

but my code always return HAL_ERROR and the chip never acknowledges. I'm fairly new to STM32 so Please correct me if I'm doing it wrong. Appreciate your answers!

    This topic has been closed for replies.

    1 reply

    Visitor II
    February 26, 2021

    Hi there!

    Have you fixed this issue? I get the same situation and find that I2C_FLAG_AF is always set.

    However, the chip actually works well, it can still receive 0x00 from stm32 and give 0x11 to stm32 if you don't use HAL_status to trigger HAL_I2C_Master_Receice command. I think it is related to the response time of ACK as ACK could sometimes be received under certain condition.

    Cheers

    Morris