cancel
Showing results for 
Search instead for 
Did you mean: 

I2C_Write & I2C_Read API for STM32F103

cnhx27
Associate III
Posted on October 29, 2014 at 08:06

In some examples of using the STM32F103 board, it is used the I2C_Write() & I2C_Read()

functions.

But in STM32F10x StdPeriph Library, this functions is not defined.

Thanks

Christian.

#stm32f103
3 REPLIES 3
selcukozb
Associate III
Posted on October 31, 2014 at 08:02

Hi,

These functions do not exist in the library. You must write your write/read functions according to your application using following sequences of library functions:

generate start,

send address (7 bit),

send data  (or receive data)

generate stop.

You can find proper code that fit to your peripheral by a google search, at least available for other MCU's, then you can easily port them to STM32F10x.

Best regards,

Amel NASRI
ST Employee
Posted on October 31, 2014 at 11:06

Hi Christian,

The CPAL library (

http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC961/SS1743/PF258336

) offers fucntions ''CPAL_I2C_Write'' & ''CPAL_I2C_Read''. 

-Mayla-

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.

Posted on January 12, 2017 at 13:44

is it possible to merge CPAL library with HAL library?