Skip to main content
jmjobin
Associate II
Dec 22, 2020 9:30 AM UTC
Solved

B-L072Z-LRWAN1 LoRa®Discovery kit using PB8 and PB9 IC2 with a display. Does not function properly

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?

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Dec 22, 2020 6:23 PM UTC

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.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

7 replies

Tesla DeLorean
Guru
Dec 22, 2020 9:50 AM UTC

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.​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
jmjobin
jmjobinAuthor
Associate II
Dec 22, 2020 10:05 AM UTC

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...

jmjobin
jmjobinAuthor
Associate II
Dec 22, 2020 6:03 PM UTC

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.

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Dec 22, 2020 6:23 PM UTC

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.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
jmjobin
jmjobinAuthor
Associate II
Dec 23, 2020 11:05 AM UTC

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?

Tesla DeLorean
Guru
Dec 23, 2020 12:10 PM UTC

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.​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
jmjobin
jmjobinAuthor
Associate II
Dec 23, 2020 12:14 PM UTC

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.