Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Migrating from 3.1 to 4.0, database solution, and custom layout

  1. #1
    Junior Member
    Join Date
    Oct 2019
    Posts
    5

    Migrating from 3.1 to 4.0, database solution, and custom layout

    Hello,

    I have a prototype which is built upon the Teensy 3.1 and am considering either sticking with the 3.2 (the obvious upgrade) or moving on to the 4.0.

    What I like about the 4.0 is more flash memory. I am looking forward to including more images in the flash so I can improve my displays.

    How compatible are they? Will my existing code pretty much port over by just changing pin numbers?

    Secondly, I will be implementing a database with external storage. Estimated entries I will need to manage will be around 1 million. Looking at about 10 MB of data in total when in full use. Are there any existing database libraries which work on the 3.2 or the 4.0? If I'm making my own or using an existing database do you think the extra speed and RAM of the 4.0 is a must for this amount of data? Perhaps Teensy is not suitable for a database like this at all?

    Lastly, I cannot keep this form factor. For one these USB headers are incredibly easy to break off, but I also want to turn this into a completely surface mount solution. I understand I can purchase every component of the Teesny 3.2 or Teensy 4.0 wherever I want with the exception of the bootloader chip. Is the bootloader chip necessary in order to keep programming over USB using Visual Micro, teensyduino, and the Arduino libraries?

    If it is necessary then can I buy the bootloader chip pre-programmed for the 3.2 or 4.0? I need 200 for the first run and the knowledge that more will continue to be available. Not to mention, I want to support you guys for developing the Teensy.. do you sell the other components as well?

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,533

    Cool

    Quote Originally Posted by JWizard View Post
    Hello,

    I have a prototype which is built upon the Teensy 3.1 and am considering either sticking with the 3.2 (the obvious upgrade) or moving on to the 4.0.
    Some answers, some others will have to answer.

    I believe the only differences between the Teensy 3.1 and 3.2 are the 3.2 has a bigger voltage regulator, the pad underneath the Teensy to do the reset moved location, and I think the D-/D+ pads for the USB were moved slight.

    Quote Originally Posted by JWizard View Post
    What I like about the 4.0 is more flash memory. I am looking forward to including more images in the flash so I can improve my displays.

    How compatible are they? Will my existing code pretty much port over by just changing pin numbers?
    It depends on your code. In general a lot of things got moved around. If you only use the following, you might be safe:

    • You use at most one serial UART on Serial1, (pins 0/1), and you don't use RTS/CTS;
    • You use at most one SPI bus (MISO, MOSI, SCLK on pins 11, 12, and 13) and you don't access fast displays using DMA or SPI FIFO;
    • You use at most one I2C bus (SDA, SCL on pins 18 and 19);
    • You don't generate sound, either through digital sound (I2S) or by using the DAC pin (A14);
    • You don't use touch sensing;
    • You don't change AREF, or use pins A10 or A11;
    • You don't rely on the board being 5v tolerant.


    Quote Originally Posted by JWizard View Post
    Secondly, I will be implementing a database with external storage. Estimated entries I will need to manage will be around 1 million. Looking at about 10 MB of data in total when in full use. Are there any existing database libraries which work on the 3.2 or the 4.0? If I'm making my own or using an existing database do you think the extra speed and RAM of the 4.0 is a must for this amount of data? Perhaps Teensy is not suitable for a database like this at all?
    I don't know. You likely will want to either add a flash memory chip on either Teensy (using a breakout board) or use a micro SD card. The Teensy 3.5 and 3.6 have a micro SD card built-in. The Teensy 4.0 has pins to connect to a micro SD card, but you will need to use a breakout board or soldering of 1mm to get to the SD card pins. If speed is not an issue, you can put a micro SD card on the 3.2 (or 4.0 if you don't want to deal with the solder issues).

    Quote Originally Posted by JWizard View Post
    Lastly, I cannot keep this form factor. For one these USB headers are incredibly easy to break off, but I also want to turn this into a completely surface mount solution. I understand I can purchase every component of the Teesny 3.2 or Teensy 4.0 wherever I want with the exception of the bootloader chip. Is the bootloader chip necessary in order to keep programming over USB using Visual Micro, teensyduino, and the Arduino libraries?
    Pretty much so.

    There was this thread about fixing a broken USB port:


    And I recall somebody posting a PCB that would bring out the pads to a different USB connector. But I don't remember where it is at the moment.

    Note, the Teensy 4.0 does not bring out the D-/D+ pins due to signaling issues (Teensy 4.0 runs at USB 2 speeds, Teensy 3.x/LC runs at USB 1 speeds). The D-/D+ pads are for the second USB adapter (for USB host support).

    Quote Originally Posted by JWizard View Post
    If it is necessary then can I buy the bootloader chip pre-programmed for the 3.2 or 4.0? I need 200 for the first run and the knowledge that more will continue to be available. Not to mention, I want to support you guys for developing the Teensy.. do you sell the other components as well?
    You can buy the MKL02 and MKL04 chips from PJRC.COM for the Teensy LC, 3.2, 3.5 or 3.6 boards. The boot loader for the Teensy 4.0 has not been released yet. Paul has said he will release it eventually.

    Paul or Robin would have to answer about the stock levels and how many you can buy:


  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,467
    Quote Originally Posted by JWizard View Post
    Is the bootloader chip necessary in order to keep programming over USB using Visual Micro, teensyduino, and the Arduino libraries?

    If it is necessary then can I buy the bootloader chip pre-programmed for the 3.2 or 4.0? I need 200 for the first run and the knowledge that more will continue to be available. Not to mention, I want to support you guys for developing the Teensy.. do you sell the other components as well?
    Yes, to be compatible with uploading from the normal software, you need the bootloader chip.

    First a standard disclaimer - this message isn't a guarantee or contract or any sort of legally binding document.

    Usually we have plenty of the MKL02 chips (thousands) and a relatively small number of the MKL04 chips (hundreds) in stock. Lead time is usually just a day or two for programming.

    Generally PJRC doesn't sell any of the other chips. But on some occasions when there have been chip shortages (all normal distributors out of stock & painful long lead times) we've made some of our reserves of the other chips available to customers who designed a PCB and found they couldn't get the main processor. Obviously we can't do too much of that without risking the supply of Teensy for everyone, so those decisions are made on a case-by-case basis.

Posting Permissions

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