Due to rules that project must contain 4 logs I have to transfer a few logs from my blog to hackaday.io. This one will be useful for all hackers trying to implement STM32Cube HAL software on their chips.
Half year ago STM published new set of tools and software examples that implement HAL (wikipedia: Hardware abstraction layer) on the many of theirs µC. They are calling this set of tools STM32CubeF4. I2C addressing (not the 10bit, i am talking about 7bit) has only 7 bits because one bit of 8 bit addressing space is reserved for flag denoting if operation will be reading or writing. That one bit is LSB (Least significant bit). If you are into details, you can more here.
Till now i worked with libraries that input a 7bit address and they automatically shift it for one bit to left. After that libs set LSB to the right value depending on the operation.
STM32CubeF4’s way is you have to shift the 7 bit address yourself.
Code examples are on my blog: http://jure.tuta.si/?p=7
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.