xxxajk
Well-known member
I have just uploaded to my github area the needed bits to allow you to use the storage part of the USB Host Shield library in an unobtrusive way on the teensy 3.0 and 3.1. This is done by using my xmem2 memory management library, and provides you with ISR safe libc memory management, aka malloc/free/new/delete, etc.
At present the preemptive multitasking of XMEM2 is not available on the Teensy 3.x products, or any other micro-controller that lacks banked memory at this time. This is because the IntervalTimer class for the Teensy 3.x is just perfect for polled tasks, such as what is used in the UHS library.
Right now the only module available is xmemUSBFS. More will be written as time permits. Please consider contributing extra modules, even if they only work on the Teensy 3.x, or the AVR micro-controllers with the extra memory. I’ll be happy to complete them to support the board you don’t have.
You will need the following libraries to take advantage of this and the upcoming ‘modules’:
https://github.com/xxxajk/spi4teensy3 This gives you the high speed you want on SPI!
https://github.com/xxxajk/RTClib This is to support timestamps on the filesystem, even if you lack an RTC on the i2c buss, it will use the one on the Freescale chip…
https://github.com/xxxajk/generic_storage This is for the FAT filesystem.
https://github.com/xxxajk/xmem2 This is for memory management.
https://github.com/xxxajk/xmemUSB This is to place USB out of your way, behind the scenes so you don’t have to think about it!
https://github.com/xxxajk/xmemUSBFS Ditto for the FAT filesystem
Unfortunately the Arduino IDE does not allow you to do any manual defines for a build, so you will need https://github.com/xxxajk/Arduino_Makefile_master so you can compile everything with the correct options.
More details and some discussion about this shield are here:
https://www.circuitsathome.com/mcu/teensy-3-0-now-supported-by-the-usb-host-library/
At present the preemptive multitasking of XMEM2 is not available on the Teensy 3.x products, or any other micro-controller that lacks banked memory at this time. This is because the IntervalTimer class for the Teensy 3.x is just perfect for polled tasks, such as what is used in the UHS library.
Right now the only module available is xmemUSBFS. More will be written as time permits. Please consider contributing extra modules, even if they only work on the Teensy 3.x, or the AVR micro-controllers with the extra memory. I’ll be happy to complete them to support the board you don’t have.
You will need the following libraries to take advantage of this and the upcoming ‘modules’:
https://github.com/xxxajk/spi4teensy3 This gives you the high speed you want on SPI!
https://github.com/xxxajk/RTClib This is to support timestamps on the filesystem, even if you lack an RTC on the i2c buss, it will use the one on the Freescale chip…
https://github.com/xxxajk/generic_storage This is for the FAT filesystem.
https://github.com/xxxajk/xmem2 This is for memory management.
https://github.com/xxxajk/xmemUSB This is to place USB out of your way, behind the scenes so you don’t have to think about it!
https://github.com/xxxajk/xmemUSBFS Ditto for the FAT filesystem
Unfortunately the Arduino IDE does not allow you to do any manual defines for a build, so you will need https://github.com/xxxajk/Arduino_Makefile_master so you can compile everything with the correct options.
More details and some discussion about this shield are here:
https://www.circuitsathome.com/mcu/teensy-3-0-now-supported-by-the-usb-host-library/