BIGTREETECH-S42B-V1.0 icon indicating copy to clipboard operation
BIGTREETECH-S42B-V1.0 copied to clipboard

Update oled.c to reduce possible interference with motor PWM harmonics

Open Quas7 opened this issue 5 years ago • 3 comments

changed frequency from 0d80 (80) to 0x00 (0) to reduce speed for OLED communication in order to avoid motor PWM harmonics (EMI).

Also disccused here: https://github.com/bigtreetech/BIGTREETECH-S42B-V1.0/issues/16

Quas7 avatar Oct 05 '20 22:10 Quas7

The display issue seems to have two root-causes.

  1. 450-460kHz buck converter frequency
  2. Big Jitter on SPI-clock if SPI-data is transmitted

Regarding 1. increasing the F_OSC or internal clock of the OLED display seems to help. Regarding 2. the added NOPs to the SPI function clears the jitter issues.

Testing with a bigger sample size is now required.

Quas7 avatar Oct 27 '20 13:10 Quas7

testing by other contributers still showed issues with display glitches. A brute force re-init every 20sec is now my proposed measure of last resort.

Quas7 avatar Oct 27 '20 22:10 Quas7

changed re-init of OLED to ~60 seconds.

Quas7 avatar Nov 03 '20 20:11 Quas7