ESP32-S3 SoC questions: integrated USB, SPI Flash, crystal (& schematic review)
Posted: Wed Dec 14, 2022 9:20 am
Hi all!
I'm working on a project that involves an ESP32-S3 SoC. I'm trying to read and understand the datasheet myself as much as possible and have come up with the following schematic:
* MCU section schematic PDF: https://drive.google.com/file/d/1dbvD-F ... sp=sharing
I've tried to add relevant comments everywhere why I did X or Y. If you see a P7 for example, it means Page 7 from the datasheet (https://www.espressif.com/sites/default ... nes_en.pdf) (except for the JTAG part). If you spot any mistakes or have any additional questions about my schematic, please let me know!
Now I have some questions that I can't really figure out and sometimes read contrasting (questions 1 and 2) things about. I hope someone can help me out here.
1. Since the ESP32-S3 comes with a USB (driver/peripheral?) I can directly connect the USB lines to GPIO19 (D-) and GPIO20 (D+), the datasheet mentions stuff about strapping pin GPIO3 which at 0: JTAG signal from on-chip JTAG, and 1: JTAG signal from USB Serial/JTAG controller. I am unsure whether I should pull this LOW/HIGH, thus for now I added a switch. But I would still like to hear what is the right approach.
2. Does anyone happen to know whether I can program the ESP32-S3 with Platform IO if my USB is directly connected to the ESP32-S3 (instead of an USB driver like CP2102)? I've seen people saying that it's not possible, and people saying that it's perfectly fine..
3. Which one is recommended to use: USB Serial/JTAG controller or the integrated USB OTG? Both can be used directly by USB, what are the advantages of using which?
4. The ESP32-S3 can run at 240MHz, but the crystal (that is mandatory) runs only at 40MHz? Does this mean the ESP32-S3 has an internal clock at 240MHz, if so then why is the 40MHz clock mandatory?
5. First time using the bare ESP32-S3 SoC, instead of a module. I have added 8M-bit SPI flash (W25Q80DVSSIG), is it as simple as connecting it to the ESP32 and it will work? Or is there something in the software I have to do to before it works as well? What is recommended, DUAL SPI or QUAD SPI?
6. Could I also swap the SPI Flash for a larger 16M-bit one like this: ZD25WQ16BTIGR https://datasheet.lcsc.com/lcsc/2109141 ... 896790.pdf? What specs should I look at when I want to take another SPI flash chip?
7. I struggled quite a bit with the antenna part, it must be impedance matched at 50 ohm, and I use a pi network for better efficiency. I think I can only start calculating these values of C11, C12 and L3 once I start routing the PCB and need to check the actual traces impedance to the antenna? Furthermore the antenna should have some spacing around it on the top layer without any copper next to it, and a ground plane below it on the bottom layer, no signals running below it either. The traces to the antenna should be straight with the pi matched network components 'laying' on top of these traces going into the antenna. How do I exactly calculate those pi matched network values? Anything I'm wrong about/missing?
Thanks for any help!
I'm working on a project that involves an ESP32-S3 SoC. I'm trying to read and understand the datasheet myself as much as possible and have come up with the following schematic:
* MCU section schematic PDF: https://drive.google.com/file/d/1dbvD-F ... sp=sharing
I've tried to add relevant comments everywhere why I did X or Y. If you see a P7 for example, it means Page 7 from the datasheet (https://www.espressif.com/sites/default ... nes_en.pdf) (except for the JTAG part). If you spot any mistakes or have any additional questions about my schematic, please let me know!
Now I have some questions that I can't really figure out and sometimes read contrasting (questions 1 and 2) things about. I hope someone can help me out here.
1. Since the ESP32-S3 comes with a USB (driver/peripheral?) I can directly connect the USB lines to GPIO19 (D-) and GPIO20 (D+), the datasheet mentions stuff about strapping pin GPIO3 which at 0: JTAG signal from on-chip JTAG, and 1: JTAG signal from USB Serial/JTAG controller. I am unsure whether I should pull this LOW/HIGH, thus for now I added a switch. But I would still like to hear what is the right approach.
2. Does anyone happen to know whether I can program the ESP32-S3 with Platform IO if my USB is directly connected to the ESP32-S3 (instead of an USB driver like CP2102)? I've seen people saying that it's not possible, and people saying that it's perfectly fine..
3. Which one is recommended to use: USB Serial/JTAG controller or the integrated USB OTG? Both can be used directly by USB, what are the advantages of using which?
4. The ESP32-S3 can run at 240MHz, but the crystal (that is mandatory) runs only at 40MHz? Does this mean the ESP32-S3 has an internal clock at 240MHz, if so then why is the 40MHz clock mandatory?
5. First time using the bare ESP32-S3 SoC, instead of a module. I have added 8M-bit SPI flash (W25Q80DVSSIG), is it as simple as connecting it to the ESP32 and it will work? Or is there something in the software I have to do to before it works as well? What is recommended, DUAL SPI or QUAD SPI?
6. Could I also swap the SPI Flash for a larger 16M-bit one like this: ZD25WQ16BTIGR https://datasheet.lcsc.com/lcsc/2109141 ... 896790.pdf? What specs should I look at when I want to take another SPI flash chip?
7. I struggled quite a bit with the antenna part, it must be impedance matched at 50 ohm, and I use a pi network for better efficiency. I think I can only start calculating these values of C11, C12 and L3 once I start routing the PCB and need to check the actual traces impedance to the antenna? Furthermore the antenna should have some spacing around it on the top layer without any copper next to it, and a ground plane below it on the bottom layer, no signals running below it either. The traces to the antenna should be straight with the pi matched network components 'laying' on top of these traces going into the antenna. How do I exactly calculate those pi matched network values? Anything I'm wrong about/missing?
Thanks for any help!