Page 4 of 5
Re: New Lolin D32 Pro with 4MB PSRAM
Posted: Fri Sep 14, 2018 12:29 pm
by patvdleer
without the issue of the 1uF capacitor?
Re: New Lolin D32 Pro with 4MB PSRAM
Posted: Sat Sep 15, 2018 6:52 am
by Roberthh
That#s hard to tell without knowing the exact reason @mike teachman had. The obvious observation is, that in his set-up the timing of reset and GPIO0 do not match. GPIO0 low is too late with respect to the end of the reset pulse. But the reasons could be:
- GPIO0 is scanned too early (-> Lolin)
- the USB/UART bridge or the transistor circuit switche too slow (->Lolin)
- the controlling PC send the switch command too late (->PC)
Assuming that Wemos is testing their devices, I tend to the third explanation. But without testing it#s hard to tell.
Re: New Lolin D32 Pro with 4MB PSRAM
Posted: Sun Sep 16, 2018 8:08 am
by patvdleer
So I bought them... somehow I have a feeling that was going to happen either way
I'm currently running into compile errors (
viewtopic.php?f=18&t=5262) so I can't really test anything myself.
Is there a guide I can follow to setup Lolin with SD card support? I have only used MicroPython on boards without build-in SD card readers.
Re: New Lolin D32 Pro with 4MB PSRAM
Posted: Sun Sep 16, 2018 9:31 am
by Roberthh
I just have tried and succeeded to use the built-in SD card on my Wemos LoLin32 Pro. It uses the sdcard.py script from the drivers/sdcard section and the following statements for mounting.
Code: Select all
import machine, sdcard, os
sd = sdcard.SDCard(machine.SPI(1, sck=machine.Pin(14), mosi=machine.Pin(15),
miso=machine.Pin(2)), machine.Pin(13))
os.mount(sd, "/sd")
For the new Lolin D32 pro, the Pins for the SPI interface have to be adapted into:
Code: Select all
import machine, sdcard, os
sd = sdcard.SDCard(machine.SPI(1, sck=machine.Pin(18), mosi=machine.Pin(23),
miso=machine.Pin(19)), machine.Pin(4))
os.mount(sd, "/sd")
You can also use the software SPI. In that case, the SPI device number is -1
Re: New Lolin D32 Pro with 4MB PSRAM
Posted: Sun Sep 16, 2018 10:02 am
by patvdleer
I bought 2 of them, somehow I'm unable to flash them...
Code: Select all
root@patrick-X470-AORUS-ULTRA-GAMING:/home/patrick/Downloads# esptool.py --chip esp32 -p /dev/ttyUSB0 erase_flash
esptool.py v2.5.0
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP32: Invalid head of packet (0x08)
Re: New Lolin D32 Pro with 4MB PSRAM
Posted: Sun Sep 16, 2018 10:14 am
by patvdleer
Playing with the reset button while attempting to flash fixed it...
Re: New Lolin D32 Pro with 4MB PSRAM
Posted: Sun Sep 16, 2018 10:35 am
by Roberthh
That is the reset problem mentioned above. You can also tie GPIO0 to GND, then push reset and then start the upload. That is reproducibly.
Re: New Lolin D32 Pro with 4MB PSRAM
Posted: Sun Sep 16, 2018 8:28 pm
by OutoftheBOTS_
Well this probably indicates there is a hardware problem with the auto boot select on this board.
This is surprising as I have built over 20 boards using the Wrover module and a CP2014 USB serial convert and just a standard MMBT2222A transistor and 10k pullups on the RTS and DTR lines and every time the auto boot select worked perfectly.
Re: New Lolin D32 Pro with 4MB PSRAM
Posted: Thu Sep 20, 2018 10:53 pm
by ARTaylor
Roberthh wrote: ↑Sun Sep 16, 2018 9:31 am
I just have tried and succeeded to use the built-in SD card on my Wemos LoLin32 Pro. It uses the sdcard.py script from the drivers/sdcard section and the following statements for mounting.
Code: Select all
import machine, sdcard, os
sd = sdcard.SDCard(machine.SPI(1, sck=machine.Pin(14), mosi=machine.Pin(15),
miso=machine.Pin(2)), machine.Pin(13))
os.mount(sd, "/sd")
For the new Lolin D32 pro, the Pins for the SPI interface have to be adapted into:
Code: Select all
import machine, sdcard, os
sd = sdcard.SDCard(machine.SPI(1, sck=machine.Pin(18), mosi=machine.Pin(23),
miso=machine.Pin(19)), machine.Pin(4))
os.mount(sd, "/sd")
You can also use the software SPI. In that case, the SPI device number is -1
I came here to ask about exactly this on the D32 Pro - if I enter your code from the REPL without a micro SD card, I get an error back that says "No SD Card" - as expected. If I insert the SD card however I get a new error that says "SPI Busy" - any idea why this might be? SD is formatted to FAT32. - Am I missing something?
Using software SPI seems to work ok, I can browse the files on the sd card with os.listdir()
Re: New Lolin D32 Pro with 4MB PSRAM
Posted: Fri Sep 21, 2018 7:45 pm
by ARTaylor
Is it because opening a serial port uses SPI?