2025-02-13 03:05 AM
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 ?
2025-02-13 03:15 AM
@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
2025-02-13 03:26 AM
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.
2025-02-13 04:19 AM
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 ? .
2025-02-13 04:34 AM
You can try this library.