2020-12-22 01:30 AM
Developing with B-L072Z-LRWAN1 LoRa®Discovery kit with sensor board and GNSS Teseo.
I added an OLED ssd1306 and connected it on IC2 PB8 PB9. I can send commands but when I send data I very often get a display hang. How should I handle PB8 PB9? Should this be terminated? Is it a jumper to set on any of the 3 boards?
Solved! Go to Solution.
2020-12-22 10:23 AM
I'd use something more aggressive than 10K, something like 2K7 nominally, but perhaps 1K5 in a pinch. You want reasonable rise times in the presence of capacitive load.
2020-12-22 01:50 AM
Those OLEDs certainly work on that board. I2C expects pull-ups at some point on the bus pins. Seem to recall the .96" panels already have pullups, but might depend on make/model. The larger 2.4" ones need converting to I2C and the reset connected.
Have these things running continously for days/weeks.
I'd look for code level issues, or timeouts that were too tight.
Other devices on bus might not play well together.
2020-12-22 02:05 AM
Thank you Clive for your answer. Looking at the code STM32CubeFunctionPack_LORA1_V2.2.0, I am using the same bus as the sensors and the sensors still work well. I cannot understand what is going on. my code also worked well for several hours and then stops working when I used another brand of display. Replacing back the "working" display did not really help. It hangs regularly. That is why I was thinking about jumpers or terminators to add...
2020-12-22 10:03 AM
I think I found the problem. Tried PullUp resistors 10k did not help.
Tried 5VCC and not 3.3V and it worked for all display. At 3 .3V only one display was OK.
2020-12-22 10:23 AM
I'd use something more aggressive than 10K, something like 2K7 nominally, but perhaps 1K5 in a pinch. You want reasonable rise times in the presence of capacitive load.
2020-12-23 03:05 AM
Clive, Thank you good advice I will try this too, (1k5).
I have another point that looking at the code I cannot understand is how is the I2C speed sets in the code... STM32CubeFunctionPack_LORA1_V2.2.0
Any idea?
2020-12-23 04:10 AM
Not using that fork, but, on the L0 the speed is set using a cryptic timing value, which encodes edge and cycle details. I'd expect to find it in the I2C init code or MSP code. Will look when at a computer.
Use a CubeMX wizard to calculate value in a scratch project and paste the constant into your own.
2020-12-23 04:14 AM
Thank you Clive, To go back to the Pull UP resistors, You were right and "you are the best" :-D, I used the 1k8 at 3.3VDC and all is working fine... Thank you... This was the solution.