cancel
Showing results for 
Search instead for 
Did you mean: 

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.

BNara.1
Associate

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!

1 REPLY 1
MT.2
Associate II

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