From 58757c1975a6bd7db17d44d104fcd94a99681561 Mon Sep 17 00:00:00 2001 From: mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> Date: Wed, 25 Jan 2023 22:37:52 +0000 Subject: [PATCH] Use PLL_F160M_CLK as clock source on S3 --- src/platforms/esp32/RGB_HUB75_PINS.png | Bin 0 -> 10405 bytes src/platforms/esp32s3/gdma_lcd_parallel16.cpp | 36 ++++++++++++++---- src/platforms/esp32s3/gdma_lcd_parallel16.hpp | 5 ++- 3 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 src/platforms/esp32/RGB_HUB75_PINS.png diff --git a/src/platforms/esp32/RGB_HUB75_PINS.png b/src/platforms/esp32/RGB_HUB75_PINS.png new file mode 100644 index 0000000000000000000000000000000000000000..2dc609ec9f58da23c461bc1f73a6bde995ee3ae0 GIT binary patch literal 10405 zcmdUV2UL?=*Jc0}v4B88=_nu|O*%*kN|oNE7X?A8NKtwMR|G}e?1D7Z*F1fK^#lY0 zIelGA%@_iqfP-Jv*VV3?2H36S#J-xp zNUJV6m3nYcuiM1Pf0y;+Ly^Z7IWHM!D9#w_!&8W51IF$ z|F3E06#EqOs!)O-m{(wQ_z|tJBU<^)6ftPC)tRQF8S{yK84wDf#*{~eVBRN()uH4y%!Od=TaO$+ z6wC?)TXi+sfqCm--a4NO1ZW;TZb%xH7}!dN(4_LK5HiFlD1qW<8e#aVbnnUxFi#Q8 z3!ym!cAz2+RM*A%wt#u_G=`*koiGSk^9%ZXVwqF+G9LwlfI%2u%%1WHShQh0Q2oDM zayZ}GJ1ztX1H0YE+J=SP%kp`~bwmJulf{ND_wY^Kq`7B*E6}cR&{U;F*pOS7R-N+T z%yese1|^2>b}!}8_Blgd6++Y~1Vg8$L!i3lBfyYP>~IUiQ$H;xhF_M4f@R*4Rv}Og z8k1Bq*<--QU$W*C!(9a7+`7|-2=eZtJvMI?@x!}$HgInX&skBLLsk9b#@(|0#ws%! z@?;*KTB7BoY0cYUHd90m^%>3)Nl9 zcqv8%+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}x60gb0oom_N#amPUNop0ufazqJmdSjJ zTfZt={8V?8o*;bB>%w)qdun!yjsd<)Ps;v`W|;^LJJZjG9Sle<3OnN=>C}&T$+kQD zV2?gyLg!CP>d{znPOnH$c!UVrqsE?21o*OWV6)zVdd2vLc1O^G8%<;U^*5-@>mDQK z!NzJz@1>S^dfT%)WJ);jdGj3-2j8}GFLDWaHaFTl*;oce>YI_~MS~Na(I1O4rT%!S zC|pE%&@%=2N`?$S1NDlWf72j;gV7g@g;HY0cmN_8m{;}BDvN1X<^}8oW3f|fdGo6- zr(4UO)`2T_&c?79`wO>;fxj|56wjNUALegsPhO`%D`IAOUt8LUg~W;FvA$X*K2N+GBABc1u6pdwep%KD^Rq? zw4|%nez;slB=AaE9YSMT;`QFw17E`@$%TQEFEmLljp@l)zwHGEmJVzepr9-(Owasl z3fhCZcrg-tjSIEWF)ZQ<=FHvf+RY-%YIB2o&u^v&&#`JMHaFI;ReS=4Yv+(!c|KQd zm_1GP*V%f(;plRF}_IV<% zTThKJ!H_K;r9_x8+wxzoudJmD&{J~51vo4qr*u3g!B8LDB#k|B_PV5xcrMI%uIMlS zVt{1v)gqXfRO($`QhTcMRA}hyqwvQtjF--uHm#<)P;}JOi-|)sSAE;Dwa6EvMkUR3 z-qs85b>QIbZfiNpglZ6|ydTldA6{SztsMnK)xP4-htzkT(-ma?k0?gI5Fn=)E$E|L z_7;(_63&`5<_#e`Pa*M5%kaA1Wv07)nE zJQ=K^sch(LsC)yf9Z1qO_y{{ZZq>4h53WO-Gqd=P1wVFOm%E}HHN%`_B9bU_;@gFO!Ou}`t7(v@HDn~=mKKpF=7|EM6NdaRrx 20000000L) + { + _div_num = 6; // 26Mhz --- likely to have noise without a good connection + } + //LCD_CAM.lcd_clock.lcd_clkm_div_num = lcd_clkm_div_num; - LCD_CAM.lcd_clock.lcd_clkm_div_num = 3; + LCD_CAM.lcd_clock.lcd_clkm_div_num = _div_num; //3; + } - ESP_LOGI("S3", "Clock divider is %d", LCD_CAM.lcd_clock.lcd_clkm_div_num); + ESP_LOGI("S3", "Clock divider is %d", LCD_CAM.lcd_clock.lcd_clkm_div_num); + + ESP_LOGD("S3", "Resulting output clock frequency: %d Mhz", (160000000L/LCD_CAM.lcd_clock.lcd_clkm_div_num)); LCD_CAM.lcd_clock.lcd_clkm_div_a = 1; // 0/1 fractional divide diff --git a/src/platforms/esp32s3/gdma_lcd_parallel16.hpp b/src/platforms/esp32s3/gdma_lcd_parallel16.hpp index 3cb94e8..3d47c22 100644 --- a/src/platforms/esp32s3/gdma_lcd_parallel16.hpp +++ b/src/platforms/esp32s3/gdma_lcd_parallel16.hpp @@ -157,8 +157,9 @@ gdma_channel_handle_t dma_chan; uint32_t _dmadesc_count = 0; // number of dma decriptors - // uint32_t _dmadesc_a_idx = 0; - //uint32_t _dmadesc_b_idx = 0; + + uint32_t _dmadesc_a_idx = 0; + uint32_t _dmadesc_b_idx = 0; HUB75_DMA_DESCRIPTOR_T* _dmadesc_a = nullptr; HUB75_DMA_DESCRIPTOR_T* _dmadesc_b = nullptr;