cancel
Showing results for 
Search instead for 
Did you mean: 

SSD1306 I2C with STM32F030C8T6TR - slowing down the controller

Sbag
Associate III

I am using the above library to display simple text msg on the OLED display. It works. 

However the controller slows down - while(1) loop works as if delay(5000) is implemented. At first the internal HSI clock running at 8Mhz was being used. Thinking that increasing the clock speed might help , activated the PLL so as to increase the clock to 48MHZ. But still the SSD1306 somehow pulls down the speed. 

If the code for SSD1306 are commented out , rest of the operation runs faster. The controller is used to read only 2 ADC channels with DMA, which is not much of a task. Nothing else. 

 

Has anyone encountered such an issue ? What could be the likely issue ? 

4 REPLIES 4

@Sbag wrote:

I am using the above library  


What library? You haven't mentioned a library.

 


@Sbag wrote:

the OLED display. 


What OLED display?

Please review: How to write your question to maximize your chances to find a solution

With the SSD1306 probably 1" diagonal white ones via I2C

You shouldn't need to continuously paint the screen. The display has it's own frame buffer. Check how much you need to change.

Check I2C comms speed, hard delays you might have in that. That you don't repeatedly reinitalize or resend entire screen. 

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

Yes it is 128X64 white OLED display. 

There is nothing to set. The height and width is already defined in the header file 

 

In the main() 

it only need to initialized  ssd1306.init(&I2c-handle)

 

in the while(1) loop

 

it only requires setCursor() , .writeString () and .after sending all the data ( only three lines )  finally updateScreen()

what I found is with each use of ssd1306 setcursor or writestring, the controller goes on slowing even before sending the updatescreen command. 

Could be it be due to controller not having enough memory ? . 

 

 

ahsrabrifat
Associate

You can try this library.

https://github.com/afiskon/stm32-ssd1306