NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Everything Else » Blue Screen - Vista 64 Ultimate
October 06, 2009 by mikedoug |
I was toying around with my NerdKit by playing with the starter program in the guide to make it do different things -- namely print my daughters' names. I decided to play around with the RS232 interface with the computer -- reading and writing data, with putty on the computer end for the interface. I quickly discovered that the serial port doesn't support hardware flow control, and the uart implementation does not support XON/XOFF support -- I was easily dropping characters when I typed. (Mind you I'm only checking for characters every 1-2 seconds on the MCU.) So, being the programmer I am, I decided I would update uart.c to be interrupt driven on receive, build in a small buffer, set start/stop thresholds, and transmit the xon/xoff codes. I've got what I think is a good starting point for the code (though there are some unknown interesting points for me). When testing it, I discovered that I wasn't getting any characters in -- my local console wasn't transmitting... So to verify that it was putty not transmitting (like I can't trust the little LED on the RS232 port), I switched the flow control from xon/xoff to none in putty, and... ... my system blue screened. I immediately unplugged the usb-to-rs232 device from my computer -- I'm suddenly worried about burning my computer up messing around with this -- even though I'm fairly certain it's an issue with the driver for the usb/serial connector. :( Anyone else experience blue screens dealing with the serial device? |
---|---|
October 07, 2009 by wayward |
I wish I could contribute in an intelligent manner, but I played with UARTs way back in high school when 2400bps MNP5 modems were all the rage, and I am a hardcore Linux user on top of that, so... All I can give you are two thumbs up and a heartfelt "go forth and wreak havoc". :) |
October 07, 2009 by rusirius |
Mike, The reason there is no hardware flow control is because you would have to use another (technically two) pin(s) on the MCU... One for RTS and one for CTS... These would still have to be implmented manually through programming. I don't recall if some UARTs actually implement the hardware on their own, but I don't think so... Software flow control is essentially the same thing, it just doesn't require the extra pins... As for switching the putty term around and getting the blue screen, it technically sounds more like a problem with putty than anything else... Since xon/xoff is software flow, that option is never seen by the hardware or the usb-rs232 hardware at all... Basically you're just telling putty to "watch out" for the XOFF character and stop sending at that point until it sees the XON character... Likewise putty then knows that if it's getting data too fast it can send an XOFF to stop and catch up... Though that's unlikely to be needed... ;) In other words, don't worry about messing something up... Putty is a great program but it does have a few little glitches... I've seen memory leaks and other issues, so a blue screen really doesn't surprise me much... ;) Bottom line is, absolutely nothing you can do from the software side will damage or harm your serial and/or usb port in any way... |
October 07, 2009 by mikedoug |
wayward -- me too on the hard core Linux guy. :) rusirius -- Putty is an application running in user space, and can't blue screen the computer unless it tickles a bug in the Kernel. The most likely cause of kernel bugs is third-party drivers. I agree that the change I made SHOULD not have touched the driver, but it wouldn't surprise me if it didn't go in and "set" or "reset" things -- even though nothing changed in the actual settings for the port. Never the less, I'm back at it. :) Should I blue screen again, I'll just dig out my old DB-9 extension cables and go direct to my on-board COM1 and skip the USB-RS232 device completely. I did think about wiring up the RTS/CTS -- maybe that's for another day. :) MikeDoug |
October 14, 2009 by mikedoug |
Just for the record, I've not had the same problem since. Dunno! MikeDoug |
October 18, 2009 by mikedoug |
I blue screened again. This time I think I understand the cause -- When I opened putty, connected to COM4 with no flow control on, the MPU was sending TONS of data to the serial port. I'm pretty certain there is an issue with the driver for this USB/RS232 device that causes it to blue screen if data is coming in at the exact moment that you open the device. I'll avoid having any data transmitting when I open it in the future -- hopefully that will reduce my blue screens. I'd be interested if anyone else with Vista 64 can recreate the problem; just so I know that I'm not mad. MikeDoug |
October 19, 2009 by rusirius |
I'm not using 64-bit on this laptop, but I couldn't re-create it here... I have a 64-bit Win7 loaded on my media center machine... If I get a chance this weekend I'll give it a try there... |
October 22, 2009 by mikedoug |
Curses... It definitely blue screens if you have data coming in on the port when you OPEN the port. I accidentally had my nerdkit on when I ran putty and connected... BOOM! |
October 30, 2009 by BobaMosfet |
That's why I still do most of my work on a Windows2000 machine. it was the last (kind of) stable attempt an an operating system that Microsoft made. |
October 31, 2009 by mikedoug |
Boba, That's pretty dramatic, and I respectfully disagree. 2000 was the FIRST time they had a stable OS. This is NOT an OS issue though -- this is purely a driver issue. The sad fact is that MS gets blamed a LOT because of the sloppy driver writing of others. This is one reason why Macs are so well regarded -- they don't crash a lot -- why is that? Restrictive hardware. MikeDoug |
October 31, 2009 by mrobbins (NerdKits Staff) |
Hi MikeDoug, Can you try this with the latest PL2303 driver? This one is dated 07/23/2009. Mike |
November 02, 2009 by mikedoug |
I can once I rescue my nerdkit from the garage -- it's currently monitoring the temperature in my deep freeze. |
November 03, 2009 by mrobbins (NerdKits Staff) |
:-) Reminds me of how NerdKits got started (3MB PDF from MIT Undergraduate Research Journal) two years ago... Mike |
November 03, 2009 by mcai8sh4 |
Mike, great article!! That is all ;) -Steve |
November 05, 2009 by mikedoug |
Well this is just plain sad... I had actually tried this version of the driver when I first installed it -- I almost always go looking for the latest driver from manufacturers at the time of the release. The problem with this "new" version is that it just doesn't work. Device manager states: "This device cannot start. (Code 10)". I tried installing it tonight because I just had another blue screen -- this time was when I closed putty (closed the COM port) with traffic on the line. So I apparently need to neither open nor close the COM port with the AVR on and transmitting. Now to find the old driver and get it working again... |
November 05, 2009 by mikedoug |
Arggg... Now I had one with the nerdkit just on, but not transmitting. I may have to see if I can find one of my old RS232 serial cables and just hook into the back of my computer directly into COM1 -- hopefully that won't crash on me! |
November 07, 2009 by mikedoug |
Mike from NerdKits emailed me this link http://www.usglobalsat.com/download/546/win_drivers.zip to a set of drivers which (from the release notes of the newest showing no code changes) should be equivalent to the latest drivers. The good news is that IT WORKS!! No blue screening. At least not in my limited testing where I opened and closed putty with my nerdkit massively producing data. Yay!! MikeDoug |
November 07, 2009 by mrobbins (NerdKits Staff) |
Hi MikeDoug, Glad to hear it's all working now. I put a copy of that version of the driver here on our server just so we have them archived in case others need them in the future. Mike |
Please log in to post a reply.
Did you know that NerdKits make a great gift? Learn more...
|