I wanted to look into what was going on "under the hood" of the esp32 IDF. I was browsing through the technical reference manual for the ESP32, and noticed that for the most part this datasheet follows a fairly standard microcontroller datasheet pattern of in depth peripheral description followed by register descriptions inside one chapter named after a peripheral. I was however confused when I was unable to find a chapter for either the Bluetooth controller and WiFi controller. In fact, the words hardly appear at all in the technical reference manual.
Looking further through the document, in chapter 1.3.5 the document says "the ESP32 has 41 peripherals" and lists 41 addresses corresponding to each of the peripherals, none of which appear to be a Bluetooth or WiFi controller. However earlier in the document in chapter 1.3.2.6, it says "13 peripherals are equipped with DMA", listing the 13 peripherals. 11 of these peripherals (UART0, UART1, UART2, SPI1, SPI2, SPI3, I2S0, I2S1, SDIO Slave, SDMMC, EMAC) appear under this exact name in the previous list of 41 peripherals. However two the these "peripherals equipped with DMA" do not (BT, WIFI). So somehow, one section seems to claim there is a WiFi peripheral, while another seems to claim there is not. Screenshots of these two sections are shown below:
Above: Section 1.3.5 table listing peripherals and memory addresses.
Above: Section 1.3.2.6 listing modules equipped with DMA.
(I couldn't help but notice, there was a lot of "reserved memory" spaces in the peripheral memory listings. Perhaps one of these reserved memory locations contain the Bluetooth and WiFi peripheral(s)?)
Frustrated by this, I decided to pull down the IDF repository as described in the getting started guide (https://docs.espressif.com/projects/esp ... et-esp-idf), and look at the library source code. I thought this would surely include exact memory addresses accessed while configuring the WiFi or Bluetooth peripherals. However, I again ran into issues where some pieces of the code seem to be missing. For example, I can find the declaration of esp_wifi_start in components/esp_wifi/include/esp_wifi.h, however the definition seems to be missing from the library repository. I searched through the installed files in the .espressif folder after running install.sh as mentioned in the getting started guide, but nothing seemed to be found there either. I know some of the submodules connected to this repo include binary files and there are some binary files elsewhere as well. Perhaps these binary files contain the missing functions pre-compiled or something? I decided I'm not familiar enough with C to be able to figure out this out on my own.
So my first questions are
1. Where can I find the definition of this missing function, esp_wifi_start? Is it's source code available?
2. esp_wifi_start is just a specific example of some function I can't seem to find in this library. I would like to be able to look at all the source code: is there some other part that is not publically available that I still won't be able to find anywhere?
3. Why does the technical reference appear to be missing some peripherals? Are they somewhere else that I forgot to look?
Missing function definitions in IDF (and information in datasheet) ?
-
- Posts: 2
- Joined: Sun Nov 03, 2019 9:48 pm
Re: Missing function definitions in IDF (and information in datasheet) ?
Hi Kevin Brant,
Thanks for the details, we will look into. Thanks.
Alvin
Best Regards
Thanks for the details, we will look into. Thanks.
Alvin
Best Regards
Re: Missing function definitions in IDF (and information in datasheet) ?
WiFi and BT are closed source and are distributed as precompiled libraries. They are also not publicly documented.
https://github.com/espressif/esp32-wifi-lib
https://github.com/espressif/esp32-bt-lib
https://github.com/espressif/esp32-wifi-lib
https://github.com/espressif/esp32-bt-lib
Re: Missing function definitions in IDF (and information in datasheet) ?
Hello, for WiFi part, see:
1. API-guides: https://docs.espressif.com/projects/esp ... /wifi.html
2. API: https://docs.espressif.com/projects/esp ... html#wi-fi
we document the public APIs which is important to IDF users.
1. API-guides: https://docs.espressif.com/projects/esp ... /wifi.html
2. API: https://docs.espressif.com/projects/esp ... html#wi-fi
we document the public APIs which is important to IDF users.
-
- Posts: 2
- Joined: Sun Nov 03, 2019 9:48 pm
Re: Missing function definitions in IDF (and information in datasheet) ?
Ah I see. This is what I was thinking but wasn't sure given that I couldn't find it specified anywhere.WiFive wrote: ↑Mon Nov 04, 2019 3:07 amWiFi and BT are closed source and are distributed as precompiled libraries. They are also not publicly documented.
https://github.com/espressif/esp32-wifi-lib
https://github.com/espressif/esp32-bt-lib
A follow up question I guess would be what's the reason for this? I can't think of any good reasons.
Re: Missing function definitions in IDF (and information in datasheet) ?
Some background information can be found in this GitHub issue:Kevin Brant wrote: ↑Thu Nov 07, 2019 1:14 amAh I see. This is what I was thinking but wasn't sure given that I couldn't find it specified anywhere.
A follow up question I guess would be what's the reason for this? I can't think of any good reasons.
https://github.com/espressif/esp32-wifi-lib/issues/2
(The GitHub users igrr & Spritetm are both Espressif employees.)
Who is online
Users browsing this forum: No registered users and 116 guests