2008-10-06 06:39 AM
STM32 I2C ST LIB
2011-05-17 03:46 AM
Hello,
I am doing some I2C programming, and my code generates hardware fault when i use this command: RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C1, ENABLE); But do i set the bit this way the code works: RCC->APB1ENR |= RCC_APB1Periph_I2C1; What is the difference? Kasper2011-05-17 03:46 AM
Hi Kasper,
Could you please provide your project and tool-chain version, It seems a software issue in the link of the Library files. You can refer to this App note for I2C :http://www.st.com/stonline/products/literature/an/15021.pdf
and associated software :http://www.st.com/stonline/products/support/micro/files/an2824.zip
STOne-32.2011-05-17 03:46 AM
In my experience, you better not to use the library already compiled.
You better to include library source files that you need and recompile them inside your project. I did experience a bug regarding a RCC function (can't remember which one). When I was using the library there was the bug. By integrating the file stm32f10x_rcc.c in my project, there was no bug.