Forum Rule: Always post complete source code & details to reproduce any issue!
Page 3 of 3 FirstFirst 1 2 3
Results 51 to 58 of 58

Thread: @Kurt: USB_HOST (T4.1) Serial, hardware handshake

  1. #51
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,430
    You are welcome... Need to do some more testing and then probably wrap up into PR...

  2. #52
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,056
    Good news - works perfectly:
    Code:
    C:\Users\Frank\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0/esptool.exe  --chip esp32 --port COM19 --baud 921600 --before default_reset --after  hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size  detect 0xe000  C:\Users\Frank\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.0-alpha1/tools/partitions/boot_app0.bin  0x1000 c:\temp\arduino_build_589020/Blink.ino.bootloader.bin 0x10000  c:\temp\arduino_build_589020/Blink.ino.bin 0x8000  c:\temp\arduino_build_589020/Blink.ino.partitions.bin 
    esptool.py v3.0-dev
    Serial port COM19
    Connecting........_
    Chip is ESP32-D0WDQ6 (revision 1)
    Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
    Crystal is 26MHz
    MAC: 8c:aa:b5:83:5d:8c
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 921600
    Changed.
    Configuring flash size...
    Auto-detected Flash size: 8MB
    Compressed 8192 bytes to 47...
    Writing at 0x0000e000... (100 %)
    Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4369.0 kbit/s)...
    Hash of data verified.
    Flash params set to 0x023f
    Compressed 17152 bytes to 11576...
    Writing at 0x00001000... (100 %)
    Wrote 17152 bytes (11576 compressed) at 0x00001000 in 0.1 seconds (effective 994.3 kbit/s)...
    Hash of data verified.
    Compressed 208272 bytes to 116489...
    Writing at 0x00010000... (12 %)
    Writing at 0x00014000... (25 %)
    Writing at 0x00018000... (37 %)
    Writing at 0x0001c000... (50 %)
    Writing at 0x00020000... (62 %)
    Writing at 0x00024000... (75 %)
    Writing at 0x00028000... (87 %)
    Writing at 0x0002c000... (100 %)
    Wrote 208272 bytes (116489 compressed) at 0x00010000 in 2.5 seconds (effective 674.3 kbit/s)...
    Hash of data verified.
    Compressed 3072 bytes to 128...
    Writing at 0x00008000... (100 %)
    Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 1638.4 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...

  3. #53
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,429
    Ok - Frank got me inspired and since I had all the micromod stuff out.

    Put a ESP32 micromod on the display carrier - loaded up blink and ran the updated library and it loaded the sketch.
    Code:
    C:\Users\Merli>C:\Users\Merli\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0/esptool.exe --chip esp32 --port COM20 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 C:\Users\Merli\AppData\Local\Arduino15\packages\SparkFun\hardware\esp32\1.0.1/tools/partitions/boot_app0.bin 0x1000 C:\Users\Merli\AppData\Local\Arduino15\packages\SparkFun\hardware\esp32\1.0.1/tools/sdk/bin/bootloader_qio_80m.bin 0x10000 C:\Users\Merli\AppData\Local\Temp\arduino_build_548685/Blink.ino.bin 0x8000 C:\Users\Merli\AppData\Local\Temp\arduino_build_548685/Blink.ino.partitions.bin
    esptool.py v3.0-dev
    Serial port COM20
    Connecting........_____.....____
    Chip is ESP32-D0WDQ6-V3 (revision 3)
    Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
    Crystal is 40MHz
    MAC: 24:6f:28:8f:5f:5c
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 921600
    Changed.
    Configuring flash size...
    Auto-detected Flash size: 16MB
    Compressed 8192 bytes to 47...
    Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4369.1 kbit/s)...
    Hash of data verified.
    Flash params set to 0x024f
    Compressed 17392 bytes to 11186...
    Wrote 17392 bytes (11186 compressed) at 0x00001000 in 0.1 seconds (effective 1070.3 kbit/s)...
    Hash of data verified.
    Compressed 207840 bytes to 105398...
    Wrote 207840 bytes (105398 compressed) at 0x00010000 in 1.6 seconds (effective 1045.1 kbit/s)...
    Hash of data verified.
    Compressed 3072 bytes to 128...
    Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    But heres the caveat - as you already mentioned for the ESP32 - after the hard reset the LED doesn't start blinking. To get it running again had to unplug it and replug the power cable. But it does upload the sketch.

  4. #54
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,429
    Just because, and for no other reason, I just tried it with the Micromod Artemis processor board and it still work and blinking happily:
    Code:
    Artemis SVL Bootloader
    Script version 1.7
    
    Phase:  Setup
            Cleared startup blip
            Got SVL Bootloader Version: 5
            Sending 'enter bootloader' command
    
    Phase:  Bootload
            have 119640 bytes to send in 59 frames
            Sending frame #1, length: 2048
            Sending frame #2, length: 2048
            Sending frame #3, length: 2048
            Sending frame #4, length: 2048
            Sending frame #5, length: 2048
            Sending frame #6, length: 2048
            Sending frame #7, length: 2048
            Sending frame #8, length: 2048
            Sending frame #9, length: 2048
            Sending frame #10, length: 2048
            Sending frame #11, length: 2048
            Sending frame #12, length: 2048
                    Retrying...
            Sending frame #12, length: 2048
            Sending frame #13, length: 2048
            Sending frame #14, length: 2048
            Sending frame #15, length: 2048
            Sending frame #16, length: 2048
            Sending frame #17, length: 2048
            Sending frame #18, length: 2048
            Sending frame #19, length: 2048
            Sending frame #20, length: 2048
            Sending frame #21, length: 2048
            Sending frame #22, length: 2048
            Sending frame #23, length: 2048
            Sending frame #24, length: 2048
            Sending frame #25, length: 2048
            Sending frame #26, length: 2048
            Sending frame #27, length: 2048
            Sending frame #28, length: 2048
            Sending frame #29, length: 2048
            Sending frame #30, length: 2048
            Sending frame #31, length: 2048
            Sending frame #32, length: 2048
            Sending frame #33, length: 2048
            Sending frame #34, length: 2048
            Sending frame #35, length: 2048
            Sending frame #36, length: 2048
            Sending frame #37, length: 2048
            Sending frame #38, length: 2048
            Sending frame #39, length: 2048
            Sending frame #40, length: 2048
            Sending frame #41, length: 2048
            Sending frame #42, length: 2048
            Sending frame #43, length: 2048
            Sending frame #44, length: 2048
            Sending frame #45, length: 2048
            Sending frame #46, length: 2048
            Sending frame #47, length: 2048
            Sending frame #48, length: 2048
            Sending frame #49, length: 2048
            Sending frame #50, length: 2048
            Sending frame #51, length: 2048
            Sending frame #52, length: 2048
            Sending frame #53, length: 2048
            Sending frame #54, length: 2048
            Sending frame #55, length: 2048
            Sending frame #56, length: 2048
            Sending frame #57, length: 2048
            Sending frame #58, length: 2048
            Sending frame #59, length: 856
    
            Upload complete
    
            Nominal bootload bps: 30524.28

  5. #55
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,430
    Yep - As I mentioned I ran into that on the ESP32... Will try now with different ESP32... And See if that makes a difference... Not sure if they have LED...

  6. #56
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,056
    Didn't mention it.. have the esp32 reset issue, too.

  7. #57
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,056
    Just to mention - it is great.

    Was back to our project. We use Platformio, Teensy41, Arduino Uno.
    Teensy Usb-Mode Audio + Serial + Midi, Uno connected to the Teensy USB-Host.

    I don't know how it works, but Platformio chooses automatically the Teensy-COM port to program the UNO.

    WOW.

    Now development on both platforms it pretty easy. No Levelshifters, cables.. just USB-Host. No unplugging ...
    When Teensy detects 115200 baud, it starts the programmer code. (It stops after a timeout).

    Works perfectly.

    And both can communicate thourgh the same usb serial without any problems.
    Switching between both in platformio is pretty easy (click on the source-file, platformio switches the platform..)
    This is how development for two platforms which communicate should look like

    And you get a "free" level shifter.. can use cheap 5v boards and just plug it in.. no soldering (but USB for Teensy).. we use a cheap china LCD Keypad shield.
    Yes, Teensy can do this alone, but we wanted a project we can develop together without too much hassle.. now, the hardware is "plug&play". he does the uno part (a menusystem etc..)
    Last edited by Frank B; 07-14-2021 at 09:18 PM.

  8. #58
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,430
    Glad it is working reasonably

    I just issued PR: https://github.com/PaulStoffregen/USBHost_t36/pull/68
    It does have conflict with current code as this also included the Fix for usbSerial.read();
    As well as Peek.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •