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

Thread: Does the bootloader chip must be attached to the main board anytime ?

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    12

    Does the bootloader chip must be attached to the main board anytime ?

    I have a question in design a diy teensy. Teensy 3.2 mainly based on MK20. And the pre-loaded bootloader chip make it possible for teesny to load arduino code. So if a want to design a teensy based boad. I can just make two board. One is pre-loaded bootloader board with a small bootloader chip and Micro usb on it. The other have MK20 and the left.Is that right? Do you have any suggestion if the bootloader chip must be attached to the main board anytime? It is impoartant for me,because I want to design a very small board. I have made a project based on teensy3.2 , so I don't want to change a lot. Anyone has some experence ? Thank you.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,684
    Please do not duplicate post. Duplicate copies of your question only annoy people who would otherwise want to help you. I have deleted the other 2 copies you posted elsewhere.

    And to answer your question, yes, this can be done. After the MK20 chip is programmed, the bootloader chip can be removed. The MK20 will work perfectly fine without it.

    PJRC does not design the system to require you to buy a bootloader chip simply to run your program. Maybe that's not a great business decision, maybe more bootloader chips would be sold if it was required even to simply run your program. But that's not how it was made. This can be done, and in fact if you search well enough, you'll find plenty of old threads where this was previously asked and answered.

    You may wish to find the _reboot_Teensyduino_() function which is buried deep within the core library. If you delete its code, then your board will not attempt to go into bootloader mode when it hears the request from Arduino. Without the chip present, that code will crash, if it is ever run.

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,948
    There other posts that might address your issues - and certainly the schematic posted on PJRC.com for the T_3.2 would be the first step for understanding the layout/connections - and there is a shared OSH T_3.2 reference board.

    The USB used for programming is the one on the MK20 chip - so that is what needs to be wired. The Bootloader chip can be made removable - but for programming it must properly connect to the pins as indicated in the schematic. Not done it here - but seen more than a few related posts go by that would be good to find for background and other issues to be aware of.

  4. #4
    Junior Member
    Join Date
    Aug 2019
    Posts
    12
    Quote Originally Posted by defragster View Post
    There other posts that might address your issues - and certainly the schematic posted on PJRC.com for the T_3.2 would be the first step for understanding the layout/connections - and there is a shared OSH T_3.2 reference board.

    The USB used for programming is the one on the MK20 chip - so that is what needs to be wired. The Bootloader chip can be made removable - but for programming it must properly connect to the pins as indicated in the schematic. Not done it here - but seen more than a few related posts go by that would be good to find for background and other issues to be aware of.
    Thank you for your replay. I have saw the schematic and reference board is really helpful.
    I know the USB is attached to MK20, but it has no use for me, I just need to make it attached to MK20 when I load the program. So I would make it on the bootloader board and make some wires.
    Thank you for your remind. I will search some related posts.

  5. #5
    Junior Member
    Join Date
    Aug 2019
    Posts
    12
    Quote Originally Posted by PaulStoffregen View Post
    Please do not duplicate post. Duplicate copies of your question only annoy people who would otherwise want to help you. I have deleted the other 2 copies you posted elsewhere.

    And to answer your question, yes, this can be done. After the MK20 chip is programmed, the bootloader chip can be removed. The MK20 will work perfectly fine without it.

    PJRC does not design the system to require you to buy a bootloader chip simply to run your program. Maybe that's not a great business decision, maybe more bootloader chips would be sold if it was required even to simply run your program. But that's not how it was made. This can be done, and in fact if you search well enough, you'll find plenty of old threads where this was previously asked and answered.

    You may wish to find the _reboot_Teensyduino_() function which is buried deep within the core library. If you delete its code, then your board will not attempt to go into bootloader mode when it hears the request from Arduino. Without the chip present, that code will crash, if it is ever run.
    I have reply this topic, but it is disapear.So I just reply again.
    Sorry for the duplicate, and I will not make the same mistake.
    Thank you for you reply. The teensy 3.2 pull off all the pins ,so the board is a little big for me. If my design does not work. I will just make a teensy 3.2 as a load board. I will take the MK20 off a teensy 3.2 and solder some wires. But I think the clock may be a problem. Anything need some test.You are right that's not a great business decision, but it is useful for me.
    I have readn this https://forum.pjrc.com/threads/50174...hi-low-or-open and I have the same question about what to do with the restpin.Any advice?
    What do you mean by "Without the chip present, that code will crash", does the broad will unstable without he bootloader?
    Thank you again for your wonderful work. It really make my project fast.
    English is not my mother language. please forgive me if I make some mistake.

  6. #6
    Senior Member
    Join Date
    Oct 2012
    Location
    Portland OR
    Posts
    677
    "...when it hears the request from Arduino. Without the chip present, that code will crash, if it is ever run."

    I read this to mean: IF you leave the code in, and IF an Arduino host on USB requests the reboot, THEN it would crash because you don't have the bootloader chip.
    Presumably, you are not using it with the Arduino host via USB anyway. But if you delete that code, then it would be safer because it wouldn't crash even if a reboot was requested.
    (I think you have to give Paul some credit for taking his time to help you use his product and not pay for it.)

  7. #7
    Junior Member
    Join Date
    Aug 2019
    Posts
    12
    Quote Originally Posted by JBeale View Post
    "...when it hears the request from Arduino. Without the chip present, that code will crash, if it is ever run."

    I read this to mean: IF you leave the code in, and IF an Arduino host on USB requests the reboot, THEN it would crash because you don't have the bootloader chip.
    Presumably, you are not using it with the Arduino host via USB anyway. But if you delete that code, then it would be safer because it wouldn't crash even if a reboot was requested.
    (I think you have to give Paul some credit for taking his time to help you use his product and not pay for it.)
    Thank you for your reply. Now I understand this topic. Anyway, I am willing to pay more for an external boot board. Whether it is Paul or anyone else. It is really useful for me. My project has very small space. But I have not found such a product.
    Last edited by luckowner; 08-21-2019 at 09:35 AM.

  8. #8
    Junior Member
    Join Date
    Aug 2019
    Posts
    12
    Quote Originally Posted by defragster View Post
    There other posts that might address your issues - and certainly the schematic posted on PJRC.com for the T_3.2 would be the first step for understanding the layout/connections - and there is a shared OSH T_3.2 reference board.

    The USB used for programming is the one on the MK20 chip - so that is what needs to be wired. The Bootloader chip can be made removable - but for programming it must properly connect to the pins as indicated in the schematic. Not done it here - but seen more than a few related posts go by that would be good to find for background and other issues to be aware of.
    Do you have any impression about the posts about my question. I have search for one day , and only found 1 related posts. Can you tell me some information ? Thank you.

  9. #9
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,948
    Quote Originally Posted by luckowner View Post
    Do you have any impression about the posts about my question. I have search for one day , and only found 1 related posts. Can you tell me some information ? Thank you.
    prior posts covered quite a bit - find the PJRC T_3.2 OSH Ref board - That and the schematic will show how it is done as others have done it. AFAIK that would go into a board and the connects for the Bootloader Need to be brought out - everything else is required - USB connect and all to be on the controller PCB.

    Finding the OSH Ref board will give an idea of how large it will be with only two layers - to reduce further will be more layers and more than taking off the tiny bootloader chip.

  10. #10
    Junior Member
    Join Date
    Aug 2019
    Posts
    12
    Quote Originally Posted by defragster View Post
    prior posts covered quite a bit - find the PJRC T_3.2 OSH Ref board - That and the schematic will show how it is done as others have done it. AFAIK that would go into a board and the connects for the Bootloader Need to be brought out - everything else is required - USB connect and all to be on the controller PCB.

    Finding the OSH Ref board will give an idea of how large it will be with only two layers - to reduce further will be more layers and more than taking off the tiny bootloader chip.
    Thank you for your quick reply.
    OK, I think I must explain my application more clearly. I want to design a "Link",in the same way that STM32 work with the ST-Link. The outside PCB has a chip holder and burn the hex file to the MK20, and then I will solder it on the application PCB. There is no need for me design any usb wire in the application PCB, no SWD or 10 pins 1.27mm header. So I think the application PCB can be quite small.

  11. #11
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,948
    Quote Originally Posted by luckowner View Post
    Thank you for your quick reply.
    OK, I think I must explain my application more clearly. I want to design a "Link",in the same way that STM32 work with the ST-Link. The outside PCB has a chip holder and burn the hex file to the MK20, and then I will solder it on the application PCB. There is no need for me design any usb wire in the application PCB, no SWD or 10 pins 1.27mm header. So I think the application PCB can be quite small.
    That sounds VERY DIY - and not Teensy related at all. But at the time of programming a usable USB link must be present to the MCU chip.

  12. #12
    Junior Member
    Join Date
    Aug 2019
    Posts
    12
    Quote Originally Posted by defragster View Post
    That sounds VERY DIY - and not Teensy related at all. But at the time of programming a usable USB link must be present to the MCU chip.
    Yes, the USB link will be designed on the link PCB, the link PCB has no related to the application PCB. It is just a burn tool in order to burn the arduino code to MK20. Because my original code is based on T3.2 and has been finished by arduino , I don't want to change it a lot. So I think the design of a link PCB will be a good idea. And I have make some design , but before make a real PCB, I want to get some advice from this forum. Some people has done this but they design some header on the application PCB. And use some wire to connection the application PCB and the link pcb. In that way the clock pin can be very closed to crystal oscillator. But if I use a chip holder,the crystal oscillator will be far. I don't know if the chip holder will cause some problem , maybe the clock pin? Or some other nosise.When my PCB design finished ,I will post it here and seek support.
    Thank you again for your advice.

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,684
    @luckowner - have you actually used Teensy 3.2 yet? Even if you intend to design your own PCB, you really should create a (physically large) working prototype with solderless breadboards or other prototype construction methods. To attempt a PCB design as you are describing, without making a prototype first, is not a good path to success. You really should build a working prototype first.

    So I am asking, do you have a Teensy 3.2 yet? Have you actually used it yet?

  14. #14
    Junior Member
    Join Date
    Aug 2019
    Posts
    12
    Quote Originally Posted by PaulStoffregen View Post
    @luckowner - have you actually used Teensy 3.2 yet? Even if you intend to design your own PCB, you really should create a (physically large) working prototype with solderless breadboards or other prototype construction methods. To attempt a PCB design as you are describing, without making a prototype first, is not a good path to success. You really should build a working prototype first.

    So I am asking, do you have a Teensy 3.2 yet? Have you actually used it yet?
    I have used T3.2 for a long time. But I can't visit this forum before. It is always say my ip is banned. And I have send a email to you before. In fact I have made a project based on T3.2. And have made some base PCB with T3.2, I mainly use your audio lib. The graphic interface is perfect. And in my next project I deside to ues it again. But my boss just tell me there is only 20mm * 20mm space for my pcb and I can't use all the space as there is some thing else. So the T3.2 is a little big. In this case, I have to minimize the PCB. I realy don't want to make such a stupid design. But the code has been finished as I have posted before. So I think the only way to finish this is to design a link tool.
    Thank you again for your work.

  15. #15
    Junior Member
    Join Date
    Aug 2019
    Posts
    12
    Quote Originally Posted by PaulStoffregen View Post
    @luckowner - have you actually used Teensy 3.2 yet? Even if you intend to design your own PCB, you really should create a (physically large) working prototype with solderless breadboards or other prototype construction methods. To attempt a PCB design as you are describing, without making a prototype first, is not a good path to success. You really should build a working prototype first.

    So I am asking, do you have a Teensy 3.2 yet? Have you actually used it yet?
    Hi I have finished the bootloader design,I have two question
    1 does the vdda vssa must be attached while booting?Can I just attach vdd and vss?
    2 The same with vref do I need to solder them
    I have left all the pins unsoldered.
    here is my design
    1 sch
    2 top pcb
    3 bottom pcb
    4 USB
    5 clock
    Click image for larger version. 

Name:	D82ADFD9-9685-4535-893C-8FF17B24A4AA.jpg 
Views:	11 
Size:	138.4 KB 
ID:	17300Click image for larger version. 

Name:	E62FE2FA-1848-4A4D-8FCC-C3928DC2106E.jpg 
Views:	7 
Size:	97.7 KB 
ID:	17301Click image for larger version. 

Name:	AE33F690-E6F7-4AEE-83DF-40C63E413A29.jpg 
Views:	6 
Size:	81.0 KB 
ID:	17302Click image for larger version. 

Name:	D6D725CA-6F45-46FA-B46D-02776D7477D3.jpg 
Views:	5 
Size:	86.8 KB 
ID:	17304Click image for larger version. 

Name:	7E951451-EE59-4E22-9027-E440112E958C.png 
Views:	4 
Size:	55.5 KB 
ID:	17303
    2

  16. #16
    Junior Member
    Join Date
    Aug 2019
    Posts
    12
    Quote Originally Posted by PaulStoffregen View Post
    @luckowner - have you actually used Teensy 3.2 yet? Even if you intend to design your own PCB, you really should create a (physically large) working prototype with solderless breadboards or other prototype construction methods. To attempt a PCB design as you are describing, without making a prototype first, is not a good path to success. You really should build a working prototype first.

    So I am asking, do you have a Teensy 3.2 yet? Have you actually used it yet?
    Hi Paul. My design has been made but I have some trouble.
    First I am not in the USA, so if I want to buy a MKL04 I will wait for a long time. So I just got one down from a teeny3.2 with my hot air, I don't know if it is the same thing I brought from PJRC.
    Second, the rest signal is not same with what your said. When I push the button the rest sigal just go down to gnd for I while and then it go up to 3.3 even I still push the button.Is that right?
    Here is my SCH picture with AD18 , and the teensy 3.2 without MKL02.And the loader board I have designed. I have read your suggest and make vbat to 3.3 with a line. Any mistake in the sch?
    Thank you!
    Click image for larger version. 

Name:	3.jpg 
Views:	7 
Size:	130.0 KB 
ID:	17594
    Click image for larger version. 

Name:	21.jpg 
Views:	7 
Size:	61.6 KB 
ID:	17595
    Click image for larger version. 

Name:	11.jpg 
Views:	8 
Size:	57.4 KB 
ID:	17596

  17. #17
    Junior Member
    Join Date
    Aug 2019
    Posts
    12
    And another question I saw you have made it possible to program with jlink in teensy 3.5 and 3.6. Does it mean I can also do the same thing with teensy3.2 using mkl04 from PJRC? In this way the usb don't need to be used .I have no confidence in designing USB on the double layer board with a chip holder. This will cause many unknown errors. But I am confident to design a Jlink.
    Thank you again.
    Last edited by luckowner; 09-14-2019 at 11:28 AM.

  18. #18
    Junior Member
    Join Date
    Aug 2019
    Posts
    12
    Quote Originally Posted by luckowner View Post
    Hi Paul. My design has been made but I have some trouble.
    First I am not in the USA, so if I want to buy a MKL04 I will wait for a long time. So I just got one down from a teeny3.2 with my hot air, I don't know if it is the same thing I brought from PJRC.
    Second, the rest signal is not same with what your said. When I push the button the rest sigal just go down to gnd for I while and then it go up to 3.3 even I still push the button.Is that right?
    Here is my SCH picture with AD18 , and the teensy 3.2 without MKL02.And the loader board I have designed. I have read your suggest and make vbat to 3.3 with a line. Any mistake in the sch?
    Thank you!
    Click image for larger version. 

Name:	3.jpg 
Views:	7 
Size:	130.0 KB 
ID:	17594
    Click image for larger version. 

Name:	21.jpg 
Views:	7 
Size:	61.6 KB 
ID:	17595
    Click image for larger version. 

Name:	11.jpg 
Views:	8 
Size:	57.4 KB 
ID:	17596
    OK,More tests have been completed. The crystal begins to oscillate. So this means that ML02 has taken over programming. But the device does not display on the computer. So the only thing is USB.

Posting Permissions

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