Teensy 4.0 First Beta Test

Status
Not open for further replies.
The lps_test.exe finished its 10 million 4 K buffer testing with T4B2. 142 broken buffers - many I saw from Windows actions - where stalled PC input somehow causes a blip ...
Code:
#99998330[4K] : __>> count=2660894156, lines/sec=194717 << >142> Good lines=113____
#99999209[4K] : __>> count=2660994166, lines/sec=190145 << >142> Good lines=____114
 ------  elapsed time 71866.233 secs for 400000000 KBytes

The SurfaceBook has the same number (#143) at 4.76 million - but it was on RemoteDesktop for much of that and on battery power and other odd events - even though it is not being actively used.
 
That is posted here : USB-Mass-Storage-Driver-Experiments

Updated OP on that thread to add pointer as well.

with new MSC SW this is what I get
Code:
Test uSDFS
2:/

Change drive

Create a new subdirectories.

Create a new file /Ascii/HELLO13.TXT.
Write some text lines. (Hello world!)
Close the file.

Open same file /Ascii/HELLO13.TXT.
Get the file content.
Hello world!
Second Line
Third Line
Fourth Line
Habe keine Phantasie
Close the file.

open binary file
write file
close file
Binary test done

Open root directory.
Directory listing...
   <dir>  System Volume Information
      69  HELLO12.TXT
    4096  test01.bin
   <dir>  Ascii
   <dir>  Binary
131072000  X_00001.dat
131072000  X_00002.dat
131072000  X_00003.dat
131072000  X_00004.dat
131072000  X_00005.dat
131072000  X_00006.dat
131072000  X_00007.dat
131072000  X_00008.dat
131072000  X_00009.dat
131072000  X_00010.dat
131072000  X_00011.dat
131072000  X_00012.dat
131072000  X_00013.dat
131072000  X_00014.dat
131072000  X_00015.dat
131072000  X_00016.dat
131072000  X_00017.dat
131072000  X_00018.dat
131072000  X_00019.dat
131072000  X_00020.dat
131072000  X_00021.dat
131072000  X_00022.dat
131072000  X_00023.dat
131072000  X_00024.dat
131072000  X_00025.dat
131072000  X_00026.dat
131072000  X_00027.dat
131072000  X_00028.dat
131072000  X_00029.dat
131072000  X_00030.dat
131072000  X_00031.dat
131072000  X_00032.dat
131072000  X_00033.dat
131072000  X_00034.dat
131072000  X_00035.dat
131072000  X_00036.dat
131072000  X_00037.dat
131072000  X_00038.dat
131072000  X_00039.dat
131072000  X_00040.dat
131072000  X_00041.dat
131072000  X_00042.dat
131072000  X_00043.dat
131072000  X_00044.dat
131072000  X_00045.dat
131072000  X_00046.dat
131072000  X_00047.dat
131072000  X_00048.dat
131072000  X_00049.dat
131072000  X_00050.dat
131072000  X_00051.dat
131072000  X_00052.dat
131072000  X_00053.dat
131072000  X_00054.dat
131072000  X_00055.dat
131072000  X_00056.dat
131072000  X_00057.dat
131072000  X_00058.dat
131072000  X_00059.dat
131072000  X_00060.dat
131072000  X_00061.dat
131072000  X_00062.dat
131072000  X_00063.dat
131072000  X_00064.dat
131072000  X_00065.dat
131072000  X_00066.dat
131072000  X_00067.dat
131072000  X_00068.dat
131072000  X_00069.dat
131072000  X_00070.dat
131072000  X_00071.dat
131072000  X_00072.dat
131072000  X_00073.dat
131072000  X_00074.dat
131072000  X_00075.dat
131072000  X_00076.dat
131072000  X_00077.dat
131072000  X_00078.dat
131072000  X_00079.dat
131072000  X_00080.dat
131072000  X_00081.dat
131072000  X_00082.dat
131072000  X_00083.dat
131072000  X_00084.dat
131072000  X_00085.dat
131072000  X_00086.dat
131072000  X_00087.dat
131072000  X_00088.dat
131072000  X_00089.dat
131072000  X_00090.dat
131072000  X_00091.dat
131072000  X_00092.dat
131072000  X_00093.dat
131072000  X_00094.dat
131072000  X_00095.dat
131072000  X_00096.dat
131072000  X_00097.dat
131072000  X_00098.dat
131072000  X_00099.dat
131072000  X_00100.dat

Test completed.

It seems to work now also with latest uSDFS

Again, to be clear, with the new uSDFS, the fines in MSC directory "uSDFS_Files_Copied_To_uSDFS" are NOT to be copied to latest uSDFS version.
 
@WMXZ, @defragster and @KurtE

I put in a microCard reader to the USBHost port on the T4B2 and it seems to work. What doesn't seem to work yet is if you put in a USB stick. This is what I get from the microCard reader:
Code:
Test uSDFS
2:/

Change drive

Create a new subdirectories.

Create a new file /Ascii/HELLO12.TXT.
Write some text lines. (Hello world!)
Close the file.

Open same file /Ascii/HELLO12.TXT.
Get the file content.
Hello world!
Second Line
Third Line
Fourth Line
Habe keine Phantasie
Close the file.

open binary file
write file
close file
Binary test done

Open root directory.
Directory listing...
   69623  ldlinux.sys
   <dir>  .disk
   <dir>  boot
   <dir>  casper
   <dir>  dists
   <dir>  EFI
   <dir>  install
   <dir>  isolinux
   23863  md5sum.txt
   <dir>  pics
   <dir>  pool
   <dir>  preseed
     233  README.diskdefines
       0  ubuntu
      94  syslinux.cfg
     234  autorun.inf
   34494  autorun.ico
   <dir>  System Volume Information
   <dir>  Ascii
   <dir>  Binary
   <dir>  evkmimxrt1060_canfd_interrupt_transfer

Test completed.
 
MSC and uSDFS:
Put recent copies of both in sketchbook libraries - it seems uSDFS wants to be in hardware\teensy\avr\libraries - and then MSC doesn't find files if it isn't there too?

Then I get :
T:\Ard186t4b2\hardware\teensy\avr\libraries\MSC/MassStorage.h:132:1: error: 'boolean' does not name a type
boolean deviceAvailable(void);

WOW - the USB FAST TEST on original SerMon REALLY wiped IDE Preferences ... Verbose was off and it was checking web 'libraries' on each start ... set that and restarted IDE and said show ALL warnings ... lots of them - many left below between "..."

Code:
…
C:\Users\Tim\AppData\Local\Arduino15\packages -built-in-libraries T:\Ard186t4b2\libraries -libraries C:\Users\Tim\Documents\Arduino\libraries -fqbn=teensy:avr:teensy4b2:usb=serial,opt=o2std,keys=en-us -ide-version=10809 -build-path T:\TEMP\arduino_build_970393 -warnings=more -build-cache T:\TEMP\arduino_cache_415348 -verbose T:\tCode\libraries\uSDFS\examples\uSDFS_test\uSDFS_test.ino
Using board 'teensy4b2' from platform in folder: T:\Ard186t4b2\hardware\teensy\avr
Using core 'teensy4' from platform in folder: T:\Ard186t4b2\hardware\teensy\avr
Detecting libraries used...
"T:\\Ard186t4b2\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=396000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\cores\\teensy4" "T:\\TEMP\\arduino_build_970393\\sketch\\uSDFS_test.ino.cpp" -o nul
…

Compiling libraries...
Compiling library "uSDFS"
"T:\\Ard186t4b2\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=396000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\cores\\teensy4" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\MSC" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\USBHost_t36" "T:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src\\diskio.c" -o "T:\\TEMP\\arduino_build_970393\\libraries\\uSDFS\\diskio.c.o"
"T:\\Ard186t4b2\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=396000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\cores\\teensy4" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\MSC" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\USBHost_t36" "T:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src\\ffsystem.c" -o "T:\\TEMP\\arduino_build_970393\\libraries\\uSDFS\\ffsystem.c.o"
"T:\\Ard186t4b2\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=396000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\cores\\teensy4" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\MSC" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\USBHost_t36" "T:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src\\ff.c" -o "T:\\TEMP\\arduino_build_970393\\libraries\\uSDFS\\ff.c.o"
"T:\\Ard186t4b2\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=396000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\cores\\teensy4" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\MSC" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\USBHost_t36" "T:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src\\ffunicode.c" -o "T:\\TEMP\\arduino_build_970393\\libraries\\uSDFS\\ffunicode.c.o"
T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\diskio.c: In function 'disk_status':

T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\diskio.c:26:6: warning: variable 'result' set but not used [-Wunused-but-set-variable]
  int result;
      ^

T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\diskio.c: In function 'disk_ioctl':
T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\diskio.c:205:6: warning: unused variable 'result' [-Wunused-variable]
  int result;
      ^

"T:\\Ard186t4b2\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=396000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\cores\\teensy4" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\MSC" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\USBHost_t36" "T:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src\\utility\\ff_utils.c" -o "T:\\TEMP\\arduino_build_970393\\libraries\\uSDFS\\utility\\ff_utils.c.o"
"T:\\Ard186t4b2\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=396000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\cores\\teensy4" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\MSC" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\USBHost_t36" "T:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src\\utility\\sd_spi.c" -o "T:\\TEMP\\arduino_build_970393\\libraries\\uSDFS\\utility\\sd_spi.c.o"
"T:\\Ard186t4b2\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=396000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\cores\\teensy4" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\MSC" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\USBHost_t36" "T:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src\\utility\\sd_sdhc.c" -o "T:\\TEMP\\arduino_build_970393\\libraries\\uSDFS\\utility\\sd_sdhc.c.o"
T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:71:0: warning: "SNVS_LPSR_PGD_MASK" redefined
     #define SNVS_LPSR_PGD_MASK                       (0x8U)
 ^

In file included from T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:5:0:
T:\Ard186t4b2\hardware\teensy\avr\cores\teensy4/imxrt.h:7532:0: note: this is the location of the previous definition
 #define SNVS_LPSR_PGD_MASK              (0x8)
 ^

T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:77:0: warning: "SNVS_LPCR_SRTC_ENV_MASK" redefined
     #define SNVS_LPCR_SRTC_ENV_MASK         (0x1U)
 ^

In file included from T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:5:0:

T:\Ard186t4b2\hardware\teensy\avr\cores\teensy4/imxrt.h:7533:0: note: this is the location of the previous definition
 #define SNVS_LPCR_SRTC_ENV_MASK         (0x1)
 ^

T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:78:0: warning: "SNVS_LPCR_SRTC_ENV" redefined
     #define SNVS_LPCR_SRTC_ENV(x)           (((uint32_t)(((uint32_t)(x)) << 0U)) & SNVS_LPCR_SRTC_ENV_MASK)
 ^

In file included from T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:5:0:
T:\Ard186t4b2\hardware\teensy\avr\cores\teensy4/imxrt.h:7534:0: note: this is the location of the previous definition
 #define SNVS_LPCR_SRTC_ENV(x)           (((uint32_t)(((uint32_t)(x)) << 0)) & 0x1)
 ^

T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:80:0: warning: "SNVS_LPCR_LPTA_EN_MASK" redefined
     #define SNVS_LPCR_LPTA_EN_MASK          (0x2U)
 ^

In file included from T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:5:0:
T:\Ard186t4b2\hardware\teensy\avr\cores\teensy4/imxrt.h:7535:0: note: this is the location of the previous definition
 #define SNVS_LPCR_LPTA_EN_MASK          (0x2)
 ^

T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:81:0: warning: "SNVS_LPCR_LPTA_EN" redefined
     #define SNVS_LPCR_LPTA_EN(x)            (((uint32_t)(((uint32_t)(x)) << 1U)) & SNVS_LPCR_LPTA_EN_MASK)
 ^

In file included from T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:5:0:
T:\Ard186t4b2\hardware\teensy\avr\cores\teensy4/imxrt.h:7536:0: note: this is the location of the previous definition
 #define SNVS_LPCR_LPTA_EN(x)            (((uint32_t)(((uint32_t)(x)) << 1)) & 0x2)
 ^

T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:83:0: warning: "SNVS_LPCR_MC_ENV_MASK" redefined
     #define SNVS_LPCR_MC_ENV_MASK           (0x4U)
 ^

…

In file included from T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:5:0:
T:\Ard186t4b2\hardware\teensy\avr\cores\teensy4/imxrt.h:7550:0: note: this is the location of the previous definition
 #define SNVS_LPCR_LPCALB_EN(x)          (((uint32_t)(((uint32_t)(x)) << 8)) & 0x100)
 ^

T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:104:0: warning: "SNVS_LPCR_LPCALB_VAL_MASK" redefined
     #define SNVS_LPCR_LPCALB_VAL_MASK       (0x7C00U)
 ^

In file included from T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:5:0:
T:\Ard186t4b2\hardware\teensy\avr\cores\teensy4/imxrt.h:7551:0: note: this is the location of the previous definition
 #define SNVS_LPCR_LPCALB_VAL_MASK       (0x7C00)
 ^

T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:105:0: warning: "SNVS_LPCR_LPCALB_VAL" redefined
     #define SNVS_LPCR_LPCALB_VAL(x)         (((uint32_t)(((uint32_t)(x)) << 10U)) & SNVS_LPCR_LPCALB_VAL_MASK)
 ^

In file included from T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\ff_utils.c:5:0:
T:\Ard186t4b2\hardware\teensy\avr\cores\teensy4/imxrt.h:7552:0: note: this is the location of the previous definition
 #define SNVS_LPCR_LPCALB_VAL(x)         (((uint32_t)(((uint32_t)(x)) << 10)) & 0x7C00)
 ^

…

"T:\\Ard186t4b2\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=396000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\TEMP\\arduino_build_970393/pch" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\cores\\teensy4" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\MSC" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\USBHost_t36" "T:\\Ard186t4b2\\hardware\\teensy\\avr\\libraries\\uSDFS\\src\\utility\\sd_msc.cpp" -o "T:\\TEMP\\arduino_build_970393\\libraries\\uSDFS\\utility\\sd_msc.cpp.o"
In file included from T:\Ard186t4b2\hardware\teensy\avr\libraries\MSC/msc.h:32:0,

                 from T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS\src\utility\sd_msc.cpp:41:
[COLOR="#FF0000"]T:\Ard186t4b2\hardware\teensy\avr\libraries\MSC/MassStorage.h:132:1: error: 'boolean' does not name a type
 boolean deviceAvailable(void);
 ^

T:\Ard186t4b2\hardware\teensy\avr\libraries\MSC/MassStorage.h:133:1: error: 'boolean' does not name a type
 boolean deviceInitialized(void);
 ^

T:\Ard186t4b2\hardware\teensy\avr\libraries\MSC/MassStorage.h:146:1: error: 'boolean' does not name a type
 boolean deviceAvailable(void);
 ^

T:\Ard186t4b2\hardware\teensy\avr\libraries\MSC/MassStorage.h:147:1: error: 'boolean' does not name a type
 boolean deviceInitialized(void);
 ^
[/COLOR]
Using library uSDFS at version 1.1.0 in folder: T:\Ard186t4b2\hardware\teensy\avr\libraries\uSDFS 
Using library MSC at version 1.0.0 in folder: T:\Ard186t4b2\hardware\teensy\avr\libraries\MSC 
Using library USBHost_t36 at version 0.1 in folder: T:\Ard186t4b2\hardware\teensy\avr\libraries\USBHost_t36 
Error compiling for board Teensy 4-Beta2.
 
Ignoring the warnings I edited Boolean to bool and it compiles and works in : ...\hardware\teensy\avr\libraries\MSC\MassStorage.h
Code:
[COLOR="#FF0000"]bool [/COLOR]deviceAvailable(void);
[COLOR="#FF0000"]bool [/COLOR]deviceInitialized(void);
uint8_t	WaitDriveReady(void);
uint8_t readSectors(void *sectorBuffer,uint32_t BlockAddress, uint8_t Blocks);
uint8_t writeSectors(void *sectorBuffer,uint32_t BlockAddress, uint8_t Blocks);
msSCSICapacity_t *getDriveCapacity(void);
msInquiryResponse_t *getDriveInquiry(void);
uint8_t getDriveSense(msRequestSenseResponse_t *mscSense);
#ifdef __cplusplus
}
#endif

// C++ prototypes
uint8_t mscInit(void);
[COLOR="#FF0000"]bool [/COLOR]deviceAvailable(void);
[COLOR="#FF0000"]bool [/COLOR]deviceInitialized(void);

Test 1 SDHC reads the two cards right it seems:
Code:
Test uSDFS
1:/

Change drive

Create a new subdirectories.

Create a new file /Ascii/HELLO12.TXT.
Write some text lines. (Hello world!)
Close the file.

Open same file /Ascii/HELLO12.TXT.
Get the file content.
Hello world!
Second Line
Third Line
Fourth Line
Habe keine Phantasie
Close the file.

open binary file
write file
close file
Binary test done

Open root directory.
Directory listing...
   <dir>  System Volume Information
17173152  SDTEST4.WAV
       0  SomeFile.txt
 8894873  workshop.pdf
16787550  SDTEST1.WAV
16425698  SDTEST2.WAV
13617358  SDTEST3.WAV
   <dir>  Ascii
   <dir>  Binary

Test completed.
and
Code:
Test uSDFS
1:/

Change drive

Create a new subdirectories.

Create a new file /Ascii/HELLO12.TXT.
Write some text lines. (Hello world!)
Close the file.

Open same file /Ascii/HELLO12.TXT.
Get the file content.
Hello world!
Second Line
Third Line
Fourth Line
Habe keine Phantasie
Close the file.

open binary file
write file
close file
Binary test done

Open root directory.
Directory listing...
   <dir>  System Volume Information
   <dir>  Ascii
   <dir>  Binary

Test completed.
 
Turned on debug - for some reason it is using the TD installed USBHost_t36 not the one in sketchbook?

64GB Adata gives this:
Code:
Test uSDFS
2:/
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20005000
periodictable = 20005000
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 10 02 00 00 00 40 5F 12 1A DC 00 11 01 02 03 01 
    VendorID = 125F, ProductID = DC1A, Version = 1100
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: ADATA
enumeration:
Product: ADATA USB Flash Drive
enumeration:
Serial Number: 2890521250140047
enumeration:
Config data length = 32
enumeration:
Configuration Descriptor:
  09 02 20 00 01 01 00 80 FA 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 02 08 06 50 00 
    Interface = 0
    Number of endpoints = 2
    Class/Subclass/Protocol = 8(Mass Storage) / 6(SCSI) / 80(Bulk Only)
  07 05 01 02 00 02 00 
    Endpoint = 1 OUT
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 82 02 00 02 00 
    Endpoint = 2 IN
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
enumeration:
msController claim this=200040E0
Descriptor 4 = INTERFACE
msController claim this=200040E0
09 04 00 00 02 08 06 50 00 07 05 01 02 00 02 00 07 05 82 02 00 02 00 
endpointType = 2
Descriptor 5 = ENDPOINT

Then I put the one SD card in a USB adapter and HOT PLUG added this:
Code:
Descriptor 5 = ENDPOINT
port change: 1C00100A
    disconnect
disconnect_Device:
USBDriver (available_drivers) list: 200040E0
USBDriver (dev->drivers) list: (empty
USBDriver (available_drivers) list: 200040E0
delete_Pipe 20005400
  shut down async schedule
  Free transfers
  Free transfers attached to QH
    * 536892736
* Delete Pipe completed
removed Device_t from devlist
  disable
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 10 02 00 00 00 40 64 85 00 40 37 00 03 04 05 01 
    VendorID = 8564, ProductID = 4000, Version = 0037
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: TS-RDF5 
enumeration:
Product: Transcend
enumeration:
Serial Number: 000000000039
enumeration:
Config data length = 32
enumeration:
Configuration Descriptor:
  09 02 20 00 01 01 00 80 FA 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 02 08 06 50 00 
    Interface = 0
    Number of endpoints = 2
    Class/Subclass/Protocol = 8(Mass Storage) / 6(SCSI) / 80(Bulk Only)
  07 05 81 02 00 02 00 
    Endpoint = 1 IN
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 02 02 00 02 00 
    Endpoint = 2 OUT
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
enumeration:
msController claim this=200040E0
Descriptor 4 = INTERFACE
msController claim this=200040E0
09 04 00 00 02 08 06 50 00 07 05 81 02 00 02 00 07 05 02 02 00 02 00 
endpointType = 2
numendpoint=2
endpointIn=81
endpointOut=2
packet size in (msController) = 512
packet size out (msController) = 512
polling intervalIn = 0
polling intervalOut = 0
new_Pipe
new_Pipe
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
control CallbackIn (msController)
00 00 00 00 00 00 00 00 
control CallbackIn (msController)
00 00 00 00 00 00 00 00 
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)

Change drive

Create a new subdirectories.
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)

Create a new file /Ascii/HELLO12.TXT.
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
Write some text lines. (Hello world!)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
Close the file.
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)

Open same file /Ascii/HELLO12.TXT.
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
Get the file content.
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
Hello world!
Second Line
Third Line
Fourth Line
Habe keine Phantasie
Close the file.

open binary file
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
write file
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
close file
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
Binary test done

Open root directory.
Directory listing...
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
   <dir>  System Volume Information
   <dir>  Ascii
   <dir>  Binary

Test completed.
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20005000
periodictable = 20005000
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe

Then putting in my WRITE PROTECTED USB Flash:
Code:
Test uSDFS
2:/
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20005000
periodictable = 20005000
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 10 02 00 00 00 40 1D 1E 04 11 00 01 01 02 03 01 
    VendorID = 1E1D, ProductID = 1104, Version = 0100
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: Kanguru
enumeration:
Product: FlashBlu 30
enumeration:
Serial Number: 0708784EA61B9727
enumeration:
Config data length = 32
enumeration:
Configuration Descriptor:
  09 02 20 00 01 01 00 80 96 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 02 08 06 50 00 
    Interface = 0
    Number of endpoints = 2
    Class/Subclass/Protocol = 8(Mass Storage) / 6(SCSI) / 80(Bulk Only)
  07 05 81 02 00 02 00 
    Endpoint = 1 IN
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 02 02 00 02 00 
    Endpoint = 2 OUT
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
enumeration:
msController claim this=200040E0
Descriptor 4 = INTERFACE
msController claim this=200040E0
09 04 00 00 02 08 06 50 00 07 05 81 02 00 02 00 07 05 02 02 00 02 00 
endpointType = 2
numendpoint=2
endpointIn=81
endpointOut=2
packet size in (msController) = 512
packet size out (msController) = 512
polling intervalIn = 0
polling intervalOut = 0
new_Pipe
new_Pipe
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
control CallbackIn (msController)
00 00 00 00 00 00 00 00 
control CallbackIn (msController)
00 00 00 00 00 00 00 00 
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)

// a million of these removed - then I unplugged

msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
port change: 1C00100A
    disconnect
disconnect_Device:
USBDriver (available_drivers) list: (empty
USBDriver (dev->drivers) list: 200040E0
disconnect driver 200040E0
Device Disconnected...
USBDriver (available_drivers) list: 200040E0
delete_Pipe 200041C0
  remove QH from async schedule
  Free transfers
    * 536892544
  Free transfers attached to QH
    * 536888224
* Delete Pipe completed
delete_Pipe 20004160
  remove QH from async schedule
  Free transfers
    * 536892544 * remove * free
  Free transfers attached to QH
    * 536892736
* Delete Pipe completed
delete_Pipe 20005400
  shut down async schedule
  Free transfers
  Free transfers attached to QH
    * 536892608
* Delete Pipe completed
removed Device_t from devlist
  disable
 
Ignoring the warnings I edited Boolean to bool and it compiles and works in : ...\hardware\teensy\avr\libraries\MSC\MassStorage.h
Well, I added typedef bool boolean; into MSC\MassStorage.h, as I did not know how many booleans @wwatson is using in his code.

concerning MSC library location, I have it in my local "Arduino\libraries" directory, not in the "teensy\avr\libraries" and it seems to work

Edit: will next go over all uSDFS code and streamline to eliminate warnings, align error codes (without changing functionality)

Question, would it be useful to add a SD-type wrapper (https://www.arduino.cc/en/Reference/SD) into uSDFS.h ?
 
Last edited:
GOOD NEWS - Reformatted that earlier NTFS 180GB SSD drive to ExFAT and it saw the drive - removed it - then PC cannot recognize it as plugged in???
BAD NEWS putting it back on TEENSY and it doesn't see it now?

That drive plugged in and spew running wild - not seeing the drive :( - Teensy MCU showing 120.2 F or 49 C for temperature on surface.

Note: the 64 GB Adata Flash above is exFat formatted.

Suggest not putting SSD Drives on Teensy with this - I think I lost mine … it doesn't even show the USB adapter plugged in. Put it in proper drive carrier ( Teensy didn't recognize this before ) and PC does see the USB connect - but it does not mount a drive in any way - even in Disk Management.

Code:
port change: 1C00100A
    disconnect
disconnect_Device:
USBDriver (available_drivers) list: 200040E0
USBDriver (dev->drivers) list: (empty
USBDriver (available_drivers) list: 200040E0
delete_Pipe 20005400
  shut down async schedule
  Free transfers
  Free transfers attached to QH
    * 536888224
* Delete Pipe completed
removed Device_t from devlist
  disable
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 00 02 00 00 00 40 E3 05 18 07 08 00 00 01 02 01 
    VendorID = 05E3, ProductID = 0718, Version = 0008
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Product: USB Storage
enumeration:
Serial Number: 000000000033
enumeration:
Config data length = 32
enumeration:
Configuration Descriptor:
  09 02 20 00 01 01 00 C0 30 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 02 08 06 50 00 
    Interface = 0
    Number of endpoints = 2
    Class/Subclass/Protocol = 8(Mass Storage) / 6(SCSI) / 80(Bulk Only)
  07 05 81 02 00 02 00 
    Endpoint = 1 IN
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 02 02 00 02 00 
    Endpoint = 2 OUT
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
enumeration:
msController claim this=200040E0
Descriptor 4 = INTERFACE
msController claim this=200040E0
09 04 00 00 02 08 06 50 00 07 05 81 02 00 02 00 07 05 02 02 00 02 00 
endpointType = 2
numendpoint=2
endpointIn=81
endpointOut=2
packet size in (msController) = 512
packet size out (msController) = 512
polling intervalIn = 0
polling intervalOut = 0
new_Pipe
new_Pipe
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
control CallbackIn (msController)
00 00 00 00 00 00 00 00 
control CallbackIn (msController)
00 00 00 00 00 00 00 00 
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)

// REMOVED COPIUS DUPE SPEW

msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)

Change drive

Create a new subdirectories.
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0

// REMOVED COPIUS DUPE SPEW :: The text that you have entered is too long (243943 characters). Please shorten it to 200000 characters long.

msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)

Create a new file /Ascii/HELLO12.TXT.
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
Write some text lines. (Hello world!)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
Close the file.
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)

Open same file /Ascii/HELLO12.TXT.
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
Get the file content.
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
Hello world!
Second Line
Third Line
Fourth Line
Habe keine Phantasie
Close the file.

open binary file
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
write file
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
close file
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
Binary test done

Open root directory.
Directory listing...
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
   <dir>  System Volume Information
   <dir>  Directory1
   <dir>  $RECYCLE.BIN
   <dir>  Ascii
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 0
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
      32  textFile.txt
   <dir>  Binary

Test completed.
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20005000
periodictable = 20005000
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
 
Well, I added typedef bool boolean; into MSC\MassStorage.h, as I did not know how many booleans @wwatson is using in his code.

concerning MSC library location, I have it in my local "Arduino\libraries" directory, not in the "teensy\avr\libraries" and it seems to work

Edit: will next go over all uSDFS code and streamline to eliminate warnings, align error codes (without changing functionality)

Question, would it be useful to add a SD-type wrapper (https://www.arduino.cc/en/Reference/SD) into uSDFS.h ?

Oddly it was just those 4 on prototypes as Boolean - and nothing in the .c code had it on?

DOH - With the RESET OF THE IDE (noted above from too fast USB to sermon) - IT DOES NOT KNOW WHERE MY SKETCHBOOK folder is!!!! That explains it using the TD installed USBHost too.
 
Well, I added typedef bool boolean; into MSC\MassStorage.h, as I did not know how many booleans @wwatson is using in his code.

concerning MSC library location, I have it in my local "Arduino\libraries" directory, not in the "teensy\avr\libraries" and it seems to work

As I mentioned in the other thread, I fixed the compiler error by including wiring.h in MassStorage.h

Some of the beginning looked like:
Code:
#ifndef _MASS_STORAGE_H_
#define _MASS_STORAGE_H_
#include <wiring.h>

Will try again. Note: I edited utility/sd_msc.cpp to change msc_disk_status to look like:
Code:
int MSC_disk_status() 
	{
			int	stat = 0;
			if(!deviceAvailable()) stat = STA_NODISK; // No USB Mass Storage Device Connected
			if(!deviceInitialized()) stat = STA_NOINIT;  // USB Mass Storage Device Un-Initialized
			return stat;
	}
Not sure if that was needed or not, but I think this reflected some of the changes he logically made to his version
 
@WMXZ, @KurtE and @defragster

Took a break from debugging CANFD and think I caught up on everything reading SD cards from the USBHost port using Kurt's USBHOST_t36 works with and issue even up to a 128GB SD Card.

Putting in an old Sony 4Gb Cruzer USB stick with debug turned on it does still fail with RC=13 but it does recognize the USB Stick without a problem:
Code:
Test uSDFS
2:/
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20005000
periodictable = 20005000
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 00 02 00 00 00 40 81 07 06 54 10 00 01 02 03 01 
    VendorID = 0781, ProductID = 5406, Version = 0010
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: SanDisk
enumeration:
Product: U3 Cruzer Micro
enumeration:
Serial Number: 00001675C670AE7C
enumeration:
Config data length = 32
enumeration:
Configuration Descriptor:
  09 02 20 00 01 01 00 80 64 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 02 08 06 50 00 
    Interface = 0
    Number of endpoints = 2
    Class/Subclass/Protocol = 8(Mass Storage) / 6(SCSI) / 80(Bulk Only)
  07 05 81 02 00 02 00 
    Endpoint = 1 IN
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 01 02 00 02 01 
    Endpoint = 1 OUT
    Type = Bulk
    Max Size = 512
    Polling Interval = 1
enumeration:
msController claim this=20004040
Descriptor 4 = INTERFACE
msController claim this=20004040
09 04 00 00 02 08 06 50 00 07 05 81 02 00 02 00 07 05 01 02 00 02 01 
endpointType = 2
numendpoint=2
endpointIn=81
endpointOut=1
packet size in (msController) = 512
packet size out (msController) = 512
polling intervalIn = 0
polling intervalOut = 1
new_Pipe
new_Pipe
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
control CallbackIn (msController)
00 00 00 00 00 00 00 00 
control CallbackIn (msController)
01 00 00 00 00 00 00 00 
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
Mount: Failed with rc=13.
 
SSD drive seems really gone … plugged it as internal computer SATA and it doesn't show - though it still has a comforting green led.

Looks like it was a refurb purchase Feb 2014 [OCZ bought by Toshiba] - hard to say what may have conflicted with an SSD that old - their tools don't even cover this model to see if it can be observed/recovered. Though PC saw it as NTFS with old data before reformat - and after to write on it.
 
Yup, I've got it happening here.

Investigating now. It's starting to look like I'm going to need to make another board rev to fix this. :(

Getting closer ? ... can it be fixed with minor rework - i.e. it will fit on that wonderfully teensy PCB size? Hopefully you have a way to modify a board in hand to test normal start, power off/on and bootloader upload to know it works across the board.

Would be interesting if somebody with an EVK/eval 1052/1062 board could see if they have it work and power up with 3.3V UART stop bit power on an Rx (&Tx) pin or two.
 
Yes, getting pretty close.

It's looking like the solution is going to involve the bootloader chip participating much more in getting the RT1062 started. Or really, just making sure it doesn't try to start too soon, and keep the RT1062's PSWITCH pin driven low when the voltage is too low to start up.

Turns out this is 2 sort of interrelated problems. For the DCDC converter (which turns 3.3V into ~1.2V for the CPU core) to start up, PSWITCH must make a low->high transition. I actually got an answer from NXP on this one, confirming a rising edge is needed. Merely having PSWITCH and PMIC_ON_REQ high isn't enough, as you might think by reading section 17.6.1 on page 1261 of the RT1060 manual. They confirmed VIL is 0.5V for that pin. With the CP2104 I have here, VCC rests around 1.7 volts when power is "off". PSWITCH is connected to VCC by a 10K resistor, so it too rests at 1.7 volts. When VCC comes back up to 3.3V, so does PSWITCH. But the DCDC converter won't start again until is sees a rising edge that must cross the ~0.5V threshold.

The other sort of related problem is some sort of safety shutdown built into the DCDC converter. Or at least I'm guessing that. When VCC is less than about ~2.7 volts, even if PSWITCH gets a valid rising edge, the DCDC tries to turn on but aborts and remains forever off. Well, off until you give it another rising edge to tell it to try again. None of this is really documented anywhere by NXP... I've been learning it by experimentation.

So to control the DCDC converter startup, I'm going to reuse the JTAG_TRST signal to control PSWITCH. I'm still debating whether to leave it connected to JTAG_TRST (the power off state also resets the JTAG TAP controller - but whether it's even powered in that state is unknown). On PSWITCH, I'm going to remove the pullup resistor and put a pulldown resistor where the capacitor is currently located. The pulldown will keep the DCDC converter from attempting to start until the bootloader chip drives it high. I'm testing now with a 1M resistor, so it adds only 3.3 uA to all the low power modes where 3.3V is still turned on. So far don't result in low currents anyway. Maybe Duff will work some incredible magic later, and I'm sad to say this resistor will permanently add a few microamps. But I don't see much alternative, without a completely different and rather exotic design with lots of hardware (sorta like NXP's eval board has).

If all goes well, this can preserve the location of all the parts, as well as the PCB size. It will be tough to route that extra signal, since PSWITCH is near the bottom of the BGA (near pins 5 & 6) and the bootloader chip is up near pin 23 (close to where all the JTAG signals are on the BGA). All the traces on layers 3 & 4 & 6 are horizontal in that area, layer 5 has the DCDC power delivery cutting through the center (and 3.3V VCC everywhere else) and disrupting the layer 2 ground plane isn't an option. Still, have a couple ideas to reroute parts of layer 4 to make room. Keeping all the components in the same locations would be nice, since the contract manufacturer had stencils made last week.

With the bootloader also acting as a power supply supervisor chip, I'm targeting turn-on at VCC = 3.1 volts and turn-off at VCC = 2.6 volts. I've been doing quite a lot of testing with different thresholds. The worst case is where VCC rises very slowly and just barely hits the turn-on threshold. The linear regulator's dropout behavior also comes into play, if VIN is just slightly above 3.1 volts. When the load suddenly jumps as the DCDC starts up, the linear regulator adds about 0.1 volts extra loss if it's operating in dropout, which makes lower turn-on thresholds somewhat risky.

I have 8 more beta #2 boards here with only the chips. Might build up a few (hand soldering everything but the BGA) and add this hardware mod. Who would like to get one for testing?
 
Yes, getting pretty close.
...
Who would like to get one for testing?

Well - you know I'll try it if you send me one :) Great as hoped you can test the redesign with current boards! And awesome you see needed signal solution and a path to routing.

I'm really glad it wasn't a larger issue with this hi-tek silicon unable to handle the presented voltages! Also you keep pointing to the Ref Manual like it is valuable and yet saying how wrong, misleading or incomplete it is :confused: glad I don't have to read it :)

Bummer we didn't get this understood in Jan when my stunned confusion in posting left you confused … and a casual 'Note:' that day didn't trigger anything then. Good at least if the Stencils can work with in place part exchange.

Not attempting power up until 3.1V sounds good and safe given the drop on startup. Would be nice if it ended up being LiPo friendly and wouldn't take them fatally low if it dropped once under 2.7 V it wouldn't restart - though may still have some drain?

Sounds like this may result in a bootloader change that will deprecate the Beta 2 T4's - at least from more than one more update?
 
Yeah, sometimes I have a difficult time parsing your messages. Shoulda looked at this months ago. It didn't even make the list on msg #6. Really glad we at least caught it now!

NXP's manual leaves a lot to be desired. So does the PJRC website, so I guess it'd be a little hypocritical of me to complain too much. But maybe others hitting these same problems with the RT1062 chip later may find these messages by google search? Plan is to really work on the website later this year, after T4 is selling and the first wave of incompatible libs and software issues are fixed.

I believe T4 will be the most lipo battery friendly Teensy yet. Even though we're not starting the CPU until 3.1 volts, T4 has a really low dropout 3.3V regulator and this time I used really low on-resistance mosfet for the reverse polarity protection. Running at 600 MHz, about 100 mA input current, I'm seeing 78 mV drop from the VIN pad to the regulator input. The regulator needs about 100 mV. So that means you really only need 3.3V at VIN for T4 to boot up, and once started it's able to keep running until VIN gets down to about 2.8V. Should work pretty well with 3.6V or 3.7V lipo, of course if you design a way to avoid too deeply discharging the battery.

On bootloader updates, I believe there's a pretty good chance for compatibility with the beta #2 hardware. But of course the update won't fix the startup from leakage power issue without the hardware changes.
 
Yeah, sometimes I have a difficult time parsing your messages. Shoulda looked at this months ago. It didn't even make the list on msg #6. Really glad we at least caught it now!

NXP's manual leaves a lot to be desired. So does the PJRC website, so I guess it'd be a little hypocritical of me to complain too much. But maybe others hitting these same problems with the RT1062 chip later may find these messages by google search? Plan is to really work on the website later this year, after T4 is selling and the first wave of incompatible libs and software issues are fixed.

I believe T4 will be the most lipo battery friendly Teensy yet. Even though we're not starting the CPU until 3.1 volts, T4 has a really low dropout 3.3V regulator and this time I used really low on-resistance mosfet for the reverse polarity protection. Running at 600 MHz, about 100 mA input current, I'm seeing 78 mV drop from the VIN pad to the regulator input. The regulator needs about 100 mV. So that means you really only need 3.3V at VIN for T4 to boot up, and once started it's able to keep running until VIN gets down to about 2.8V. Should work pretty well with 3.6V or 3.7V lipo, of course if you design a way to avoid too deeply discharging the battery.

On bootloader updates, I believe there's a pretty good chance for compatibility with the beta #2 hardware. But of course the update won't fix the startup from leakage power issue without the hardware changes.

Indeed fixing it before shipping is most awesome - even if it suxz doing it now. And B2 with altered hardware will have this issue, just wondered about maintaining special code if needed for so few Beta boards.

It did make it onto the msg#6 list - before it was understood as not even needing 3+ boards - and I had the wrong idea it was a USB T_ports issue - then added to with recent post findings:
teensy_ports issues with 3+ boards, #1330, #1398 #2391 t4b2 one board LED Glows, Also 15s Restore #2700

MCU fails to start with power from external Teensy UART pins attached

First report was in the week before #1330 though at #1213 that confused us both then same day #1218 was a bit subtle but on point {though attached Serial UART not apparent as problem}.
NOTE: My T4 won't start if the two T_3.1's are plugged into their hub - when T4 goes in on a separate port now. T4 alone okay - or T_3's after - three times repeated ...

Indeed you do sometimes have trouble in reading as I write - I think the prior running burned in mental count of seeing it written is at 4 :(
In the cases I don't just drastically repower and change the situation to understand or fix it - I try to capture what I did/see before I lose it - with no idea what will be relevant to what may be a problem.
 
Getting closer ? ... can it be fixed with minor rework - i.e. it will fit on that wonderfully teensy PCB size? Hopefully you have a way to modify a board in hand to test normal start, power off/on and bootloader upload to know it works across the board.

Would be interesting if somebody with an EVK/eval 1052/1062 board could see if they have it work and power up with 3.3V UART stop bit power on an Rx (&Tx) pin or two.

Tim, not sure the evk boards would experience this problem, those boards have so much on the board that the power design is a lot different - think Paul alluded to that in his post #2839 ".. without a completely different and rather exotic design with lots of hardware (sorta like NXP's eval board has)."

Think the only ones I could easily get to are on the Arduino header.
 
Tim, not sure the evk boards would experience this problem, those boards have so much on the board that the power design is a lot different - think Paul alluded to that in his post #2839 ".. without a completely different and rather exotic design with lots of hardware (sorta like NXP's eval board has)."

Think the only ones I could easily get to are on the Arduino header.

I saw Paul's note that the EVK boards should handle what he has found out - so not worth bothering - they may not do manuals right - or even SDK docs - but the hardware should be good --- with a rev or two :)

Well there is light coming across the bay - official sunrise in 27 minutes - I need to get to sleep.
 
@PaulStoffregen

As @defragster said glad you got the problem isolated and a potential fix. Hope won't you can make the HW changes with just minor adjustments and it wont impact production too much.

Glad of this, backward compatible :
On bootloader updates, I believe there's a pretty good chance for compatibility with the beta #2 hardware. But of course the update won't fix the startup from leakage power issue without the hardware changes.
 
@PaulStoffregen @defragster @mjs513 - Glad you are getting it isolated and fixed. Sorry I did not also report it more directly earlier... I noticed it earlier as well, but figured it was a known issue...
Well there is light coming across the bay - official sunrise in 27 minutes - I need to get to sleep.
Yes - Now for the day crew :D
 
Note: I edited utility/sd_msc.cpp to change msc_disk_status to look like:
Code:
int MSC_disk_status() 
	{
			int	stat = 0;
			if(!deviceAvailable()) stat = STA_NODISK; // No USB Mass Storage Device Connected
			if(!deviceInitialized()) stat = STA_NOINIT;  // USB Mass Storage Device Un-Initialized
			return stat;
	}
Not sure if that was needed or not, but I think this reflected some of the changes he logically made to his version

Next of my update will have this too.
 
@PaulStoffregen Since I only have the original beta boards, I have a quick question... is changing the PWM frequency going to still be available? I'm pretty close to releasing a library that covers from the t3.0 to current, and will need PWM >= 2.4MHz in order to actually sound acceptable.
Yeah, might be able to do DAC too, but not yet ready for ARM Teensys with a DAC/external audio.
Direct to DAC it won't make it sound any better, since it is ~33. 33KHz audio, but I could expand it to allow various filters to clean up the audio. It's just not quite there yet.
Hint: the library is LPC speech synth and currently uses only ~26K of flash, and ~5K of RAM. :)
 
@PaulStoffregen Since I only have the original beta boards, I have a quick question... is changing the PWM frequency going to still be available? I'm pretty close to releasing a library that covers from the t3.0 to current, and will need PWM >= 2.4MHz in order to actually sound acceptable.
Yeah, might be able to do DAC too, but not yet ready for ARM Teensys with a DAC/external audio.
Direct to DAC it won't make it sound any better, since it is ~33. 33KHz audio, but I could expand it to allow various filters to clean up the audio. It's just not quite there yet.
Hint: the library is LPC speech synth and currently uses only ~26K of flash, and ~5K of RAM. :)

Bing just showed me what https://www2.spsc.tugraz.at/add_material/courses/scl/vocoder/ - sounds very cool - Live action Talkie! They use 3Kbit to cover voices.


Just to follow up on LPS_test.exe - it finished yesterday with T4B1 on surfaceBook- to compare Desktop:
The lps_test.exe finished its 10 million 4 K buffer testing with T4B2. 142 broken buffers - many I saw from Windows actions - where stalled PC input somehow causes a blip ...
Code:
#99998330[4K] : __>> count=2660894156, lines/sec=194717 << >142> Good lines=113____
#99999209[4K] : __>> count=2660994166, lines/sec=190145 << >142> Good lines=____114
 ------  elapsed time 71866.233 secs for 400000000 KBytes

The SurfaceBook has the same number (#143) at 4.76 million - but it was on RemoteDesktop for much of that and on battery power and other odd events - even though it is not being actively used.

So the last 5.2 M buffers only saw another 36 interrupted buffers - some likely at rollover as shown before:
Code:
#99998420[4K] : __>> count=2954966683, lines/sec=178564 << >179> Good lines=____114
#99999299[4K] : __>> count=2955066694, lines/sec=175116 << >179> Good lines=113____
 ------  elapsed time 63172.302 secs for 400000000 KBytes

OH - I got a link late last night from Koromix on T4B2 - just tried it and it doesn't seem to be ready to work with the T4b2 yet. I sent him back a verbose log to see if he can identify the issue.
 
Next of my update will have this too.

I did another update of uSDFS to reduce the compiler warnings.

For what I'm concerned concerning MSC-USBHost (USB disks) there seems to be some instabilities.
In other words, Teensy does not always behave as expected: enumeration sometimes needs a lot of time, program hangs from time to time, or dies with rc error. In principle, I see all symptoms that are also reported also by others.
So more work is needed.
Unfortunately, my knowledge in USB programming is close to zero, so I hope for @WWatson and other experts to fill the gap.
 
Status
Not open for further replies.
Back
Top