For the heck of it, I pulled out one of the QWIIC displays I purchased.
It is an SSD1327 sold by Sparkfun:
Zio Qwiic OLED Display (1.5inch, 128x128) - SparkFun Electronics
I thought I would use the Aeafruit _SSD1327 library, with their one
Example sketch: SSD1327_test.ino.
I needed to edit the example sketch to use Wire1 instead of Wire:
Adafruit_SSD1327 display(128, 128, &Wire1, OLED_RESET, 1000000);
the begin method from: 0x3d to 0x3c
if ( ! display.begin(0x3C) ) {
Uploaded it using Arduino IDE, and the display is crawling along:
I have KiTTY window opened connected to Serial1 (through USB To Serial adapter).
And I was getting endless Error messages:
[00:10:04.703,000] <err> i2c_ll_stm32_v2: i2c: speed above "fast" requires manual timing configuration, see "timings" property of st,stm32-i2c-v2 devicetree binding
[00:10:05.407,000] <err> i2c_ll_stm32_v2: i2c: speed above "fast" requires manual timing configuration, see "timings" property of st,stm32-i2c-v2 devicetree binding
[00:10:06.087,000] <err> i2c_ll_stm32_v2: i2c: speed above "fast" requires manual timing configuration, see "timings" property of st,stm32-i2c-v2 devicetree binding
[00:10:06.742,000] <err> i2c_ll_stm32_v2: i2c: speed above "fast" requires manual timing configuration, see "timings" property of st,stm32-i2c-v2 devicetree binding
[00:10:07.392,000] <err> i2c_ll_stm32_v2: i2c: speed above "fast" requires manual timing configuration, see "timings" property of st,stm32-i2c-v2 devicetree binding
[00:10:08.037,000] <err> i2c_ll_stm32_v2: i2c: speed above "fast" requires manual timing configuration, see "timings" property of st,stm32-i2c-v2 devicetree binding
[00:10:08.890,000] <err> i2c_ll_stm32_v2: i2c: speed above "fast" requires manual timing configuration, see "timings" property of st,stm32-i2c-v2 devicetree binding
[00:10:09.743,000] <err> i2c_ll_stm32_v2: i2c: speed above "fast" requires manual timing configuration, see "timings" property of st,stm32-i2c-v2 devicetree binding
[00:10:10.595,000] <err> i2c_ll_stm32_v2: i2c: speed above "fast" requires manual timing configuration, see "timings" property of st,stm32-i2c-v2 devicetree binding
[00:10:11.448,000] <err> i2c_ll_stm32_v2: i2c: speed above "fast" requires manual timing configuration, see "timings" property of st,stm32-i2c-v2 devicetree binding
[00:10:12.276,000] <err> i2c_ll_stm32_v2: i2c: speed above "fast" requires manual timing configuration, see "timings" property of st,stm32-i2c-v2 devicetree binding
[00:10:13.080,000] <err> i2c_ll_stm32_v2: i2c: speed above "fast" requires manual timing configuration, see "timings" property of st,stm32-i2c-v2 devicetree binding
Which I know that is being output from Zephyr:
In the function:
int i2c_stm32_configure_timing(const struct device *dev, uint32_t clock)
default:
LOG_ERR("i2c: speed above \"fast\" requires manual timing configuration, "
"see \"timings\" property of st,stm32-i2c-v2 devicetree binding");
return -EINVAL;
I updated the example to comment out the 1mhz speed and the library
defaults to 400k, which runs and I no longer see those error messages.
Question, is what is the fastest speed it supports?
I am guessing 400k
However it looks like the hardware maybe supports up to 1Mhz:
65.2 I2C main features
β’ IΒ²C-bus specification rev03 compatibility:
β Target and controller modes
β Multicontroller capability
β Standard-mode (up to 100 kHz)
β Fast-mode (up to 400 kHz)
β Fast-mode Plus (up to 1 MHz)
β 7-bit and 10-bit addressing mode
I will look through the device tree to see if there are any timing properties.
Side note: I wonder if the function i2c_stm32_configure_timing in
zephyr\drivers\i2c\i2c_ll_stm32_v2.c should bail out with an error if one
asks for a higher speed than it can support, maybe it should instead
do LOG_WRN and maybe setup to the highest speed supported.
But that is probably beyond the scope of this question.
Thanks