Hi,
One of the early selling points for the ESP32 was that pins could be remapped. However, when looking closer at this, it appears that it is not possible to remap pins such that JTAG and the SDMMC Host can function at the same time.
So, how do others debug applications that uses an SDCard?
Edit: Also, what's the reason for R157 not being populated in the Wrover-kit?
JTAG and SDCard
Re: JTAG and SDCard
One option is to connect an SD card to HS1 interface, and move SPI flash to other set of pins (e.g. VSPI). This makes JTAG pins available for use.
Another option is to connect SD card to another set of pins in SPI mode, for the duration of debugging (assuming you are not debugging sdmmc related code). Then once debugging is done, connect it back to HS2 pins using sdmmc interface.
Regarding R157, this is because Wrover-kit typically comes with a 1.8V flash module, hence GPIO12 must not be pulled up on reset.
Another option is to connect SD card to another set of pins in SPI mode, for the duration of debugging (assuming you are not debugging sdmmc related code). Then once debugging is done, connect it back to HS2 pins using sdmmc interface.
Regarding R157, this is because Wrover-kit typically comes with a 1.8V flash module, hence GPIO12 must not be pulled up on reset.
Re: JTAG and SDCard
I'll be using a Wrover modules so I can't do that.ESP_igrr wrote:One option is to connect an SD card to HS1 interface, and move SPI flash to other set of pins (e.g. VSPI). This makes JTAG pins available for use.
Naturally, its even documented. (Note to self: RTFM ) I'll try this route.ESP_igrr wrote: Another option is to connect SD card to another set of pins in SPI mode, for the duration of debugging (assuming you are not debugging sdmmc related code). Then once debugging is done, connect it back to HS2 pins using sdmmc interface.
Ah, yes ofc. A bit wierd though, since every text I've read on SDCard IFC says that they should be pulled up. Also, the Wrover kit uses 10KOhm, but the docs say 50kOhm?ESP_igrr wrote: Regarding R157, this is because Wrover-kit typically comes with a 1.8V flash module, hence GPIO12 must not be pulled up on reset.
Re: JTAG and SDCard
In practice, internal pull-up on GPIO12 is sufficient to work with most SD cards. W.r.t. the document mentioning 50kOhm, I think it should be "50kOhm or stronger" (lower resistance value).
Re: JTAG and SDCard
Ok, so I ended up sacrificing two outputs in favor of the ability to debug with SDCard support via (V)SPI. That freed enough GPIOs to allow for both SPI and MMC mode, with H/W selection via DIPs. I'm wondering if this will introduce too much interference for it to work, even if placed near the Wrover module?
I 'm thinking two MAX4948 and just a single DIP would be a much better choice, but it has on on-resistance of 4 Ohms, would that be too much? Doing this would also add H/W support to allow software detection of the current mode wich would be a really nice thing.
I 'm thinking two MAX4948 and just a single DIP would be a much better choice, but it has on on-resistance of 4 Ohms, would that be too much? Doing this would also add H/W support to allow software detection of the current mode wich would be a really nice thing.
- Attachments
-
- mcu.PNG (9.95 KiB) Viewed 7626 times
-
- sdcard.PNG (43.24 KiB) Viewed 7626 times
Who is online
Users browsing this forum: Bing [Bot] and 100 guests