Shop OBEX P1 Docs P2 Docs Learn Events
Weird problem uploading to QuickStart — Parallax Forums

Weird problem uploading to QuickStart

Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
edited 2012-05-18 20:05 in Propeller 1
Maybe I haven't been paying attention and this is already on someone's radar, but I've encountered a strange issue uploading programs to the QuickStart board. I'm using Win XP (32-bit) and Prop Tool v1.3. What's happening is that I can upload successfully to the QS once. After that I get the dreaded "No Propeller chip found" message. At that point I have to unplug the USB cable and plug it back in to get another upload, which always works -- until I try to get a second one with the same USB plug-in.

-Phil
«1

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-05-14 19:15
    For some reason, I started getting this problem today. I've been using the same QuickStart board for a variety of tasks, mostly for checking out hardware like a WiFly xBee-like adapter and, on another occasion, an LCD from SparkFun. Both cases seemed to work fine with debugging output on the USB port. Today I tried running a program on the QuickStart board without any other hardware attached. It ran once or twice, then took a couple of tries to download after some changes, now I can't seem to download (No Propeller chip found) to the board. This is with either BST on a MacBook Pro or BST or the Propeller Tool on a Windows XP netbook, all things that have worked many times in the past.

    Plugging in a different Prop board works fine on the MacBook Pro with BST.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-05-14 19:29
    Mike,

    As with you, this is a recent development. The only thing that has changed on my system, that I'm aware of, is that I recently installed FTDI's MProg program, and it installed an updated VCP driver (v2.8.24.0, 4/10/2012).

    -Phil
  • Mike GreenMike Green Posts: 23,101
    edited 2012-05-14 19:54
    I've not installed any Mac I/O drivers recently and another QuickStart board seems to work fine.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2012-05-14 19:56
    I've gotten that from time to time this last month (and never before), and have fixed it by closing the PST, uploading, then reopening the terminal. It was almost as if the PST was clobbering the comm line, which was obviously available and open. The unplug/replug didn't always fix it. In my case the development machine has had no new software or drivers installed on it. This was with a PropBOE, not a QS.

    I've also learned to restart my system when things getting really wacky. In the days since I've done that the problem hasn't returned, but I haven't done a heavy amount of coding, either.

    -- Gordon
  • Mike GreenMike Green Posts: 23,101
    edited 2020-10-27 10:07
    That good old magic resistor did the trick. I may have to do something permanent in the future on my QuickStart boards. Thanks for the link (here). See Post # 167 in that thread for an explanation.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-05-14 20:41
    Thanks for fixing the link, Mike.

    I plan on soldering in a permanent resistor...someday. The header addition is easy but not very fault resistant.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-05-14 20:54
    I'll probably put a 100K resistor across the solder pads adjacent to the header.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-05-14 21:10
    The magic resistor worked for me, too. I've always been an advocate of pull-ups on both P30 and P31, but that's not the problem they were designed to solve. Can anyone explain why this solves the loading problem? I mean, once the Prop resets into the boot loader, it shouldn't matter, right?

    -Phil
  • jazzedjazzed Posts: 11,803
    edited 2012-05-14 22:32
    The magic resistor worked for me, too. I've always been an advocate of pull-ups on both P30 and P31, but that's not the problem they were designed to solve. Can anyone explain why this solves the loading problem? I mean, once the Prop resets into the boot loader, it shouldn't matter, right?

    -Phil


    I submit to thee these questions three.

    1. How long does it take for the Propeller boot loader code to start after hard reset (that is before it asserts TX P30) ?

    2. Can you guarantee that the non-driven propeller/buffer oscillator input node will not cause garbage on P30 from reset to bootload start?

    3. Is it possible to deterministically ensure the PC's serial port receive buffer is flushed *just in time* for the loader code to assert TX P30?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-05-14 22:58
    Jazzed,

    Other boards that are just as sloppy as the QS don't have this problem. What makes the QS any different from, say, a Prop Demo board, which also lacks a pull-up on P30? The only thing I can think of is that buffering P30 without a pull-up creates more noise during reset float than just the P30 pin driving the FT232R. (At least they got it right on the Prop BOE, which has the pull-up and is one of the nicest, most well-designed boards that Parallax has ever done.)

    -Phil
  • jazzedjazzed Posts: 11,803
    edited 2012-05-14 23:19
    Jazzed,

    Other boards that are just as sloppy as the QS don't have this problem. What makes the QS any different from, say, a Prop Demo board, which also lacks a pull-up on P30? The only thing I can think of is that buffering P30 without a pull-up creates more noise during reset float than just the P30 pin driving the FT232R. (At least they got it right on the Prop BOE, which has the pull-up and is one of the nicest, most well-designed boards that Parallax has ever done.)

    -Phil

    The demo board doesn't have the buffer on it, and the FT232 inputs have 200K pull-ups. I.E. No potential oscillator for 100ms from reset to bootloader start.

    Referring to FT232R table 3.4 ... "When used in Input Mode, the input pins are pulled to VCCIO via internal 200kΩ resistors. These pins can be programmed to gently pull low during USB suspend (PWREN# = “1”) by setting an option in the internal EEPROM."
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-05-14 23:25
    jazzed wrote:
    ...the FT232 has a pull-up.
    Ah, so. That I either never knew or had long since forgotten. In any event, that explains it.

    Thanks,
    -Phil
  • turbosupraturbosupra Posts: 1,088
    edited 2012-05-15 06:06
    I was just going to post about this ... I'm having the same issue.

    It seems to be exacerbated by the size of the program I'm loading to it, small programs don't normally trigger it. It has to be a timing issue, because the chip does reset, it just then loses its serial connection before it can be written to
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2012-05-15 07:35
    Mike Green wrote: »
    That good old magic resistor did the trick. I may have to do something permanent in the future on my QuickStart boards. Thanks for the link (here). See Post # 167 in that thread for an explanation.

    At first glance it looks like the resistor may be going from pins 35 and 38 but upon looking closer it appears that it is really between pins 33 and 38. To prevent any mistakes the pin numbers should probably be noted as well. From reading through these posts it sounds like adding a 10K to 100K resistor across these pins as a pull-up should prevent any issues. I just picked up a couple Quickstart boards and will probably install a resistor in the pads next to the 40-pin connector.

    If the issue didn't really show up before and is mainly occurring on Windows system I wonder if any of the recent Windows patches or security fixes have affecting any of the timing or may be a contributing factor in why it is happening now.

    Robert
  • turbosupraturbosupra Posts: 1,088
    edited 2012-05-15 09:19
    I've tried it on 2 different win 7 machines, 32bit, one is a fresh install that is only about <30 days old with an MS OE image. Phil said he was XP.

    The other is a work machine. Both work perfect with my protoboard and I've never seen this issue.

    I'm not 100% sure how the tool works, but I think the prop tool is not waiting long enough for the prop to return the propeller chip version, which is how it will identify which com port the prop is on. If it is taking a few mS longer to pull that pin down low, or to hold it low?
  • Mike4421Mike4421 Posts: 131
    edited 2012-05-15 09:28
    I may have to do something permanent in the future on my QuickStart boards.

    @ MikeGreen .... new fetures are always welcome to the small QS board
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-05-15 09:40
    I'm calling this one [SOLVED], since the reason for the resistor fix is no longer magic, but logical.

    Other than the new VCP driver, I have not upgraded WinXP in ages. (Automatic upgrades is off. If it works, don't mess with it.) Perhaps the recent spate of problems can be laid to the weather which, here at least, is a lot warmer than it's been in months. A higher ambient temperature brings changing RC clock speeds and raises the noise floor, so it could be a factor.

    -Phil
  • jazzedjazzed Posts: 11,803
    edited 2012-05-15 09:45
    turbosupra wrote: »
    I've tried it on 2 different win 7 machines, 32bit, one is a fresh install that is only about <30 days old with an MS OE image. Phil said he was XP.

    The other is a work machine. Both work perfect with my protoboard and I've never seen this issue.

    I'm not 100% sure how the tool works, but I think the prop tool is not waiting long enough for the prop to return the propeller chip version, which is how it will identify which com port the prop is on. If it is taking a few mS longer to pull that pin down low, or to hold it low?


    QS Pull-up doesn't help?

    There is a parameter in Propeller-Tool version 1.3 software for adjusting the delay from reset to load start. Have you tried that?

    Also what are the specs on your CPU Frequency/Cache/#Cores?
  • turbosupraturbosupra Posts: 1,088
    edited 2012-05-15 12:18
    I haven't tried the resistor yet, but I will tonight. I was hoping there was a config setting, I hadn't found it, but I must not have looked in the correct place, I will look again now and report back what I find. Here are the specs:


    Laptop
    2.6ghz, dual core, win7 32bit, 3.25gb of usable ram, I don't know the cpu cache for this off of the top of my head


    Desktop
    3ghz, dual core, win7 32bit, 3.25gb of usable ram, 6144kb of L2 cache
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-05-15 12:39
    mindrobots wrote: »
    You need the magic resistor. here
    Add the resistor, life will be good!

    The old magic resistor trick! Would you believe I've been seeing this for months? On both the 32K quickstart and the 64k quickstarts. I didn't narrow it down to being exclusive to the quickstart. I thought it was a bug in propforth, even though Sal assured me likelyhood was very low. It happens intermittently, usually on the big desktop rig, but has also happened on the junky old terminal PC's. Re-trying and re-plugging the USB fixes it, so the work around was liveable.

    Thanks for pointing this out.
  • turbosupraturbosupra Posts: 1,088
    edited 2012-05-15 12:42
    Well, I had 1.2.7, so that might be why I didn't have the "Post-reset Delay" to configure under preferences --> operation .

    Either way, as soon as I downloaded version 1.3, the problem went away without adjusting the Post-reset Delay from the factory default setting of 90mS. Parallax must have experienced this too and added that value to their gui, so IMHO anyone that is experiencing this they should first download the prop tool version 1.3 here
    http://www.parallax.com/Portals/0/Downloads/sw/propeller/Setup-Propeller-Tool-v1.3.zip
    and try using that, before soldering to the board.

    I have a program that was consistently giving me the "prop not found" error with the quick start board (the program is about 27000kb), and by consistently I mean 2 out of every 3 times it would fail on at least the first attempt to send data to it. I tried it 15 times and it worked the first time, each time with the prop tool version 1.3 and the default Post-reset delay setting of 90mS.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-05-15 12:46
    I'm using 1.3 without any adjustments to the delay and had the problem without the resistor. The resistor is necessary and will, hopefully, be added to the next QuickStart rev. Leaving a buffer input floating is never a good idea.

    -Phil
  • RaymanRayman Posts: 14,827
    edited 2012-05-16 04:39
    So, I guess we figured out why the pullup resistor works now.
    Guess is this is a lesson in unintended consequences...
    The buffer chip solves one problem, but causes another...

    I'm back to thinking that 1k resistors between Prop chip and FT232 is a simpler solution than this buffer chip.

    Are people using a 10k pullup resistor? Seems like 1 meg or 100k should be enough and then allow P30 and P31 to remain more general purpose.

    If I'd known this was a Phil approved solution earlier, I would have encorporated it into our Merlin and Merlina plugin boards for Quickstart... This might be something that future plugin board designers might want to think about...

    I'm also curious if Parallax and others never noticed this problem because they always tested with code that started a serial driver that forced P30 high and the pin capacitance kept the pin high during rebooting...
  • jazzedjazzed Posts: 11,803
    edited 2012-05-16 06:13
    This has been discussed for months.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-05-16 06:41
    Since like June of 2011. I think it was hot Quickstart forum topic #3

    #1 - Hey, these touch buttons are funky, how do we get them to work reliably
    #2 - Hey, I only have a 32KB EEProm? What's up with that??
    #3 - I can't reload my Quickstart, I need to unplug it and then plug it back in before it' recognized.
    #4 - What do I need to do to power Quickstarts externally without letting out the smoke???
    #5 - Duane's showing of again with all the things he's making his Quickstart do!!! :lol:

    Add the resistor either locally or globally!!
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-05-16 07:02
    jazzed wrote: »
    This has been discussed for months.

    You make it sound like that's a reason to stop folks from asking about it. It's not like this is a company project meeting, and everyone was informed and obligated by terms of employment to keep up to date. It's the exact opposite. Also, since Phil is the OP, anyone of lesser skill, experience, or time spent on the forums is likely to have the same question.

    The only stupid question is the one you didn't ask.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-05-16 07:58
    What would be especially embarrassing (i.e. entertaining for others) is to find a thread on this selfsame subject that I'd already commented on. :) I'd like to say it's never happened before, but ...

    -Phil
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-05-16 09:00
    Exercise your right to demonstrate that you are human!

    Anyway, this question will continue to come up, potentially every time somebody gets a new quickstart. The more times it gets brought up, the quicker it will get answered next time, which is the intended function of the forums. This is NOT something folks are suppose to "just know". The alternative would b to modify the quick production design which would break the "not a serial port" option and add cost to a loss leader. This was a design decision, we just got to go with it. This does NOT necessarily indicate a change to the quickstart design, as multiple hardware versions in the filed has its own (potentially worse) issues. Maybe just shipping the board with a 100k resistor in header 33 and 38 or even a note suggesting the user do this would be fine.

    This is actually a good thing, as it shows us the pros and cons and consequences of floating pins. My massive brain continues to grow. :)
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-05-16 09:29
    IMO, the resistor appears so fundamental to the success of the Quickstart (as opposed to frustration for newcomers to the Propeller) that it really needs to be incorporated onto the board. I'd also add a pull-up on P31 so the Prop won't receive garbage when externally powered with the USB disconnected. Moreover, I'd change the values on all the pull-ups (P28-P31) to 4.7K. On a heavily-loaded I2C bus, especially, 10K may not be stiff enough for maximum-speed operation. Next, I'd make sure that the sigma-delta input pins are on the same 0.1" grid as the main dual-row receptacle, so that the proto board can connect to them via a header/connector pair. Finally, I'd figure out some way to label the pins on the receptacle, even if it means including stickers for it or laser etching the nomenclature onto it (there being no room on the PCB itself for a slkscreen legend).

    -Phil
Sign In or Register to comment.