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

Thread: Using the pre-programmed MINI54 on a custom board

  1. #1

    Using the pre-programmed MINI54 on a custom board

    I am having difficulties with the MINI54 chip. I tried to adapt Paul's schematic to my own custom board (which interfaces with many other things). I can program the board I got just fine with JTAG and it works like it should. However, the bootloader chip isn't working so I can't just upload a file using the arduino IDE which is really nice. It also allows me to just use 1 USB connector to program the chip and interact with it, which I find incredibly useful...

    Anyway, something is wrong with my schematic. The bootloader bought from http://www.pjrc.com/store/ic_mini54_tqfp.html seems to be unable to communicate with the MK20. What happens is this:

    1) Code compiles
    2) Code is uploaded
    3) Every time I upload the code, it says "Please press the RESET BUTTON on your Teensy..." even though I have a previous sketch on it.
    4) The verbose info alternates between "remote cmd: "status"" and "status data sent" many times (for about 3 seconds straight) before finally ending with "remote connection closed" and that's it. There's none of the normal messages about programming block # X or any of that.

    So it would seem that I have a connection wrong somewhere. Does anyone have any ideas for me? I'd really appreciate a look-over. Hopefully I've only got one trace wrong or something, but my double and triple checking has revealed nothing to me so far.

    Click image for larger version. 

Name:	MINI54 Problem.jpg 
Views:	928 
Size:	72.2 KB 
ID:	486

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    13,800
    Can you post a higher res copy of the schematic? The signals aren't connected by wires and I can't read the label names.

  3. #3

  4. #4
    Well it was worth a shot...

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    13,800
    I'm going to look at this later today. Yesterday afternoon, after looking at your schematic (which I couldn't read), I worked on the SD+ethernet bug, and this morning I'm fixing a delay bug and preparing 1.14-rc3. I have a brief meeting this morning, then I can look at this again after 1.14-rc3 is posted.

  6. #6
    Oh thanks. Of course you are busy, I'm sorry. One more quick question while I'm at it: Do you need the bootloader chip in order for the PC to be able to communicate with the chip via usb serial? In my case, I removed the bootloader chip and use JTAG to program the MK20. When my c++ program tries to interface with the board via the USB port, it fails to even open the port. Sorta mystified by this one. Thanks, Paul.

  7. #7
    Also, here's a PDF so you can view it really up close (there are 6 other pages to get the full schematic, but this should be the only relevant part): https://docs.google.com/file/d/0B8cf...it?usp=sharing
    Last edited by kingforger; 05-24-2013 at 06:33 PM.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    13,800
    Ok, I've looked over your schematic and double-checked against my design here (not just the info on the web page). It looks correct.

    This probably doesn't help much, but here's a photo of the board I made to test the mini54 chip. This is one I made with the first mini54 chip we programmed on the test fixture here, to make sure it really works when used.

    Click image for larger version. 

Name:	mini54_test.jpg 
Views:	776 
Size:	76.9 KB 
ID:	490
    (click for larger)

    I can dig up the gerber files for this board, if that might help? (EDIT: found 'em...)

    I really would like to figure out why this isn't working. From everything I've seen here so far, it really should work.
    Last edited by PaulStoffregen; 05-24-2013 at 07:23 PM.

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    13,800
    Here are the gerber files for that test board. You can view them using "gerbv" (I run it on Linux) or any other gerber viewer program, or upload the zip file to OSH Park for an easy (but limited) online viewing.

    I can tell you the preprogrammed Mini54 definitely works on this test board. I know it's tedious to compare PCBs by tracing out where wires go, but maybe by comparing this design to your PCB the difference might become evident?

    Edit: the 4 light blue parts near the Mini54 are zero ohm jumpers. This PCB was designed early when I was considering another similar Nuvoton chip with slightly different pinout. The capacitor near pin 0 is the LDO cap. All the other parts should closely match the parts on a real Teensy 3.0.
    Attached Files Attached Files
    Last edited by PaulStoffregen; 05-24-2013 at 07:26 PM.

  10. #10
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,067
    Quote Originally Posted by PaulStoffregen View Post
    This probably doesn't help much, but here's a photo of the board I made to test the mini54 chip. This is one I made with the first mini54 chip we programmed on the test fixture here, to make sure it really works when used.

    Click image for larger version. 

Name:	mini54_test.jpg 
Views:	776 
Size:	76.9 KB 
ID:	490
    (click for larger)
    Nice that the extra analog and digital pins, hidden round the back on the standard Teensy 3.0, are exposed. Also, is that 2x5 pin block a JTAG AVR header, he asked innocently? I thought there was some incompatibility between JTAG and the mini54 due to their sharing the same pins on the mk20dx?
    Last edited by Nantonos; 05-25-2013 at 10:00 AM.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    13,800
    Quote Originally Posted by Nantonos View Post
    Also, is that 2x5 pin block a JTAG AVR header, he asked innocently?
    No, not JTAG and definitely not AVR. There's no AVR chips on this board at all.

    It's the Freescale "EzPort", which is similar to AVR's ISP programming. See chapter 29 for details. This isn't a standard pinout... it's only 10 pins because I happened to have 10 pin headers and IDC connectors! In the year leading up to Teensy3, I made many prototypes. The very early work used one of Freescale's eval boards (back when it was impossible to buy any Freescale Kinetis chip, except on an eval board, and not even the chip which is now used) and a Teensy++ 2.0 with a custom-made 10 pin cable to the EzPort.

    That 10 pin connector on the edge is a leftover from those very early days, when all I had working was very basic functionality with the Ezport, a not-quite-right C toolchain, a barely working linker file, and little fragments of code that poked at memory addresses just enough to get the one of the I/O ports working and an LED blinking. It's pretty amazing how far Teensy 3.0 has come in since those first days, only about a 2 years ago.
    Last edited by PaulStoffregen; 05-25-2013 at 12:29 PM.

  12. #12
    Thanks Paul. I'll check this over later. For now, I have to get a few other parts of my board working because I'm running out of time. And believe it or not, other parts have more priority than this. I'll let you know as soon as I've investigated this further. Expect to hear back from me in about 2 days if my other priorities go well...

  13. #13
    Alright. It turns out that the schematic is perfectly fine. For some reason, the 3.3V line generated by the MK20 is having spikes on it. Specifically, every few seconds, there will be dips down to about 2.75V that last about a millisecond each. Usually they come in trains of 5-15 according to my oscilloscope. I put a 220uF cap on that line (bigger than needed, but it's what I had lying around), and the voltage problem is gone. Also, the bootloader started working as expected!

    So in summary, the problem was not in the schematic. It was in my 3.3V line. Thanks for your help anyway and sorry to waste your time with that.

    edit: I'd also like to add that a major part of the reason my project has been so successful is because of the Teensy 3.0. My fellow hardware engineers and I are not very good programmers, but we can definitely do arduino C and a little tiny bit of actual C. I've just now finished debugging the second revision of the prototype and it's all working after a few minor modifications! Thank you so much for making the Teensy 3.0.
    Last edited by kingforger; 05-29-2013 at 08:53 PM.

  14. #14
    Junior Member
    Join Date
    Mar 2014
    Posts
    2
    ohh My GOD you saved My day. I had the same issue and have been struggling with this for days now. Added a 10uF on the 3.3v line and it started working

  15. #15
    Senior Member Constantin's Avatar
    Join Date
    Nov 2012
    Location
    In the yard with a 17' Dia. Ferris Wheel
    Posts
    1,377
    FWIW, this is why I externally regulate and supply power to the MK20 instead of relying on it to produce a regulated power output. The Freescale design is certainly clever and very helpful in many situations (battery-powered operation where sleep mode is important, for example) but for designs that expect to get their power externally, I don't see a good reason to introduce another variable that can go wrong. Combine a good external 5V wall wart with a MCP1824 or MCP1825 and some decoupling and storage capacitors and voila, you have more than enough power to keep the chip happy and glitch free.

  16. #16
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    13,800
    Quote Originally Posted by kingforger View Post
    For some reason, the 3.3V line generated by the MK20 is having spikes on it. Specifically, every few seconds, there will be dips down to about 2.75V that last about a millisecond each. Usually they come in trains of 5-15 according to my oscilloscope.
    Does this ever happen on a PJRC-made Teensy 3.0 or 3.1?

    I've never observed one doing such a thing, but then I haven't specifically looked for this either. But I have tested a LOT of 3.3V stuff powered from the Teensy 3, without ever a sign of such trouble.

  17. #17
    Paul, this was resolved back in May of 2013. It was my thread!

    The problem was caused by drawing too much current on the 3.3V rail. Now, the reason that it was just little voltage dips/spikes is because I had an SD card hooked up. They can draw around 100mA. Along with a GPS and the IC itself, the 3.3V rail could not supply enough current during SD write operations. My write operations were of short duration, however, which is why the 220uF capacitor got rid of the problem. The cap could maintain the voltage on the line because the SD card writes were so short. This is off the top of my head, but I think that the MK20 can supply 120mA or 130mA including the MK20 itself (which is the detail that I missed), and I was demanding more than that for very short durations. The MK20 was fine.

    Anyway, this project has since gone a long way since this thread. It will be a finished product in a little over two months. We've sold three final prototypes to one company for testing, one prototype to another, and have three more going out to the Philippines for testing by a third company. Exciting

  18. #18
    Senior Member
    Join Date
    Feb 2013
    Posts
    179
    I just happened upon this (apparently old) thread... That mini54 test board up there looks suspiciously similar to what I'd expect a Teensy ++ 3.0 to look like...

  19. #19
    Hello, I d like to revive this topic to ask couple of questions around integration of the mini54tan on a custom board;

    I m very impressed by the integration done by Paul around Cortex M4 with Arduino and this beats everything around, for this reason I forsee I will never move to STM and will continue with the kinetis
    in a coming project, I want to integrate a MK20DX256VLH7 on my onw board and my plan is to put a JTAG-SWD 10pin header and then I d like to do a small adapter with the MINI54TAN and a pushbutton that will imediately bring the Teensy compatibility, right ?

    That said, I m questioning if we need to connect the P3.4 and P3.5 of the mini54 to the ptb2/3 ??? it seems to be an I2C connection and I forsee that the mini54tan proabbly support some I2C slave at a specific adress for some diagnostic or programing reason. I could not imagine that the mini54 and kinetis would engage any communication together via this port, as the pins are conencted to A4/A5 which are user dependent and may not accept such trafic. But who knows :=)

    So is it fair to unconnect these pins ? if so, I can really route the standard cortex swd10 pinout, right ?

    many thanks for supporting our hobby and long life to teensy

  20. #20
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    217
    Quote Originally Posted by PanMillenium View Post
    I want to integrate a MK20DX256VLH7 on my own board and my plan is to put a JTAG-SWD 10pin header and then I d like to do a small adapter with the MINI54TAN ...
    If anyone has such an adapter/programmer board, please let me know. Otherwise I'll make one (using the MKL04).

Posting Permissions

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