Pages

Wednesday, May 10, 2017

Preparing the trap for time...

Update May 12, 2017: The HAL libraries regarding I2C peripheral are just stupid! Their unneeded "simplification" gives me headaches. I'm not a newbie, you know? Well, more likely I'll use the HAL Low Layer drivers for this one...It seems that the mixed use is allowed (Chapter 4 of "Description of STM32L1 HAL and Low-layer drivers")

Original article: Just a quick note. I'm preparing for the PCF8583 RTC library which use the I2C peripheral (is the only device I have that use the I2C). This library is well tested with PIC microcontrollers and is configurable so it can use I2C1 or I2C2 peripheral, at users choice. Now, on Nucleo board, because of the way I connected the LCD (and it will remain that way for all my examples), there is a single I2C peripheral available so, it will be much easier to simplify the things and eliminate this feature. But STM32 has a single header file for all I2C peripherals, and the use is a little different - will see, I only had a glimpse into the header file.

P.S.: Luckily, the I2C1 pins are 5V tolerant - thanks ST, your microcontrollers are great.



No comments:

Post a Comment