Skip to content

ESP32-S2 Bitluni VGA Example Compilation Error: rtc_clk_apll_enable Too Few Arguments #101

@kavinduneth

Description

@kavinduneth

Hi everyone,

I'm using an ESP32-S chip (not a development board) and trying to run the VGA "Hello World" example from Bitluni’s ESP32Lib.

These are the pin connections I’m using in the code:

// Pin configuration
const int redPin = 21; 
const int greenPin = 22; 
const int bluePin = 23; 
const int hsyncPin = 18; 
const int vsyncPin = 5;

When I try to compile and upload the code, I get the following error:

Arduino: 1.8.19 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, None, Disabled"

C:\Users\Supun\Documents\Arduino\libraries\bitluni_ESP32Lib\src\I2S\I2S_ESP32.cpp: In member function 'bool I2S::initParallelOutputMode(const int*, const int*, int, long int, int, int, int)':

C:\Users\Supun\Documents\Arduino\libraries\bitluni_ESP32Lib\src\I2S\I2S_ESP32.cpp:379:27: error: too few arguments to function 'void rtc_clk_apll_enable(bool, uint32_t, uint32_t, uint32_t, uint32_t)'

   rtc_clk_apll_enable(true);

                           ^

In file included from C:\Users\Supun\Documents\Arduino\libraries\bitluni_ESP32Lib\src\I2S\I2S_ESP32.cpp:24:

C:\Users\Supun\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5/tools/sdk/esp32/include/soc/esp32/include/soc/rtc.h:268:6: note: declared here

 void rtc_clk_apll_enable(bool enable, uint32_t sdm0, uint32_t sdm1,

      ^~~~~~~~~~~~~~~~~~~

C:\Users\Supun\Documents\Arduino\libraries\bitluni_ESP32Lib\src\I2S\I2S_ESP32.cpp:380:3: error: 'rtc_clk_apll_coeff_set' was not declared in this scope

   rtc_clk_apll_coeff_set(odir, sdm & 255, (sdm >> 8) & 255, sdm >> 16);

   ^~~~~~~~~~~~~~~~~~~~~~

C:\Users\Supun\Documents\Arduino\libraries\bitluni_ESP32Lib\src\I2S\I2S_ESP32.cpp:380:3: note: suggested alternative: 'rtc_clk_apb_freq_get'

   rtc_clk_apll_coeff_set(odir, sdm & 255, (sdm >> 8) & 255, sdm >> 16);

   ^~~~~~~~~~~~~~~~~~~~~~

   rtc_clk_apb_freq_get

C:\Users\Supun\Documents\Arduino\libraries\bitluni_ESP32Lib\src\I2S\I2S_ESP32.cpp: In member function 'void I2S::setAPLLClock(long int, int)':

C:\Users\Supun\Documents\Arduino\libraries\bitluni_ESP32Lib\src\I2S\I2S_ESP32.cpp:461:26: error: too few arguments to function 'void rtc_clk_apll_enable(bool, uint32_t, uint32_t, uint32_t, uint32_t)'

  rtc_clk_apll_enable(true);

                          ^

In file included from C:\Users\Supun\Documents\Arduino\libraries\bitluni_ESP32Lib\src\I2S\I2S_ESP32.cpp:24:

C:\Users\Supun\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5/tools/sdk/esp32/include/soc/esp32/include/soc/rtc.h:268:6: note: declared here

 void rtc_clk_apll_enable(bool enable, uint32_t sdm0, uint32_t sdm1,

      ^~~~~~~~~~~~~~~~~~~

C:\Users\Supun\Documents\Arduino\libraries\bitluni_ESP32Lib\src\I2S\I2S_ESP32.cpp:462:2: error: 'rtc_clk_apll_coeff_set' was not declared in this scope

  rtc_clk_apll_coeff_set(odir, sdm & 255, (sdm >> 8) & 255, sdm >> 16);

  ^~~~~~~~~~~~~~~~~~~~~~

C:\Users\Supun\Documents\Arduino\libraries\bitluni_ESP32Lib\src\I2S\I2S_ESP32.cpp:462:2: note: suggested alternative: 'rtc_clk_apb_freq_get'

  rtc_clk_apll_coeff_set(odir, sdm & 255, (sdm >> 8) & 255, sdm >> 16);

  ^~~~~~~~~~~~~~~~~~~~~~

  rtc_clk_apb_freq_get

exit status 1

Error compiling for board ESP32 Dev Module.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


I saw in Bitluni’s video that this example should work with ESP32-S2, but I’m not sure what’s wrong. I’m using the ESP32 Arduino core version 2.0.5, and Bitluni’s library version 0.4.0.

Can someone help me fix this error or guide me to the correct setup for ESP32-S and VGA output?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions