CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PCWH Debugger - CPU Hogging

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
john cutler



Joined: 06 Sep 2003
Posts: 82
Location: Hot Tub, California

View user's profile Send private message

PCWH Debugger - CPU Hogging
PostPosted: Wed May 21, 2003 8:45 pm     Reply with quote

I brought this up a few days ago, and after checking my CPU monitor, it appears that both when programming the flash rom in a pic chip, and when running the debugger from the green "go" button, 100\% of my host computer's CPU time is grabbed by PCWH and the ICD-S. Is there any way to affect this phenomenon?
It seems like either incorrect operation, or an error in programming design.

Perhaps I'm just uninformed, and maybe without external buffers it's necessary for things to work this way. I purposely use a laptop because I am really bothered by the fan noise of desktops. Now I find that my wonderful, fast, quiet new laptop ONLY turns on it's fan when I use the ICD-S and debugger. This is a major bummer for me, so I'm hoping someone out here has some good news for me.

Thanks

John
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514651
sar



Joined: 08 Sep 2003
Posts: 36

View user's profile Send private message

Re: PCWH Debugger - CPU Hogging
PostPosted: Wed May 21, 2003 8:49 pm     Reply with quote

<font face="Courier New" size=-1>John
Always state your operating system when posting such a question. What is it?</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514652
ajt



Joined: 07 Sep 2003
Posts: 110

View user's profile Send private message

Re: PCWH Debugger - CPU Hogging
PostPosted: Wed May 21, 2003 9:20 pm     Reply with quote

At least it appears CCS put the loading code in a separate thread. If you think the situation is bad with the debugger, try it with MPLAB 5.x. It basically locks up the machine until it is done. I only tried MPLAB 6.1 briefly and don't remember if it had the same affliction.

The fact that your fan comes on during the downloads is quite bizzare. I always assumed the fan was controlled by a temperature sensor.

:=I brought this up a few days ago, and after checking my CPU monitor, it appears that both when programming the flash rom in a pic chip, and when running the debugger from the green "go" button, 100\% of my host computer's CPU time is grabbed by PCWH and the ICD-S. Is there any way to affect this phenomenon?
:=It seems like either incorrect operation, or an error in programming design.
:=
:=Perhaps I'm just uninformed, and maybe without external buffers it's necessary for things to work this way. I purposely use a laptop because I am really bothered by the fan noise of desktops. Now I find that my wonderful, fast, quiet new laptop ONLY turns on it's fan when I use the ICD-S and debugger. This is a major bummer for me, so I'm hoping someone out here has some good news for me.
:=
:=Thanks
:=
:=John
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514653
_________________
Al Testani
john cutler



Joined: 06 Sep 2003
Posts: 82
Location: Hot Tub, California

View user's profile Send private message

Re: PCWH Debugger - CPU Hogging
PostPosted: Wed May 21, 2003 9:25 pm     Reply with quote

<font face="Courier New" size=-1>It's WindowsXP Pro on a Centrino Acer 1.3Ghz laptop. Soon after pushing go in the CCS Deburgger the fan comes on and stays on until a little while after I push stop. No other program has yet to cause this behavior - ie fan on. I monitor on the CPU monitor and the debugger indeed takes 100\% of the cpu time when it's actually running.

John

Running 3.158 PCWH - which target Pic type doesn't seem to make any difference. Oops - forgot to mention that I'm using a Keyspan USB-RS-232 adapter to run the ICD-s - since this new laptop doesn't have an RS-232 port - only 4 x USB2.0 - but again, the problem has only occured while using the debugger.</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514654
sar



Joined: 08 Sep 2003
Posts: 36

View user's profile Send private message

Re: PCWH Debugger - CPU Hogging
PostPosted: Wed May 21, 2003 10:16 pm     Reply with quote

<font face="Courier New" size=-1>John
Use your Task manager and check to see if the ICD.exe is running while you are using the PCW debugger. ICD.exe will use 100\% cpu time. Check it yourself....run task manager. Then click the ICD interface program from the pcw debugger window interface!(without your USB adapter connected to your laptop!!)I mean nothing connected to your serial port or USB port and watch your cpu usage. Mine went to 100\% with nothing connected on windows 2000. Strange!
Best regards, SAR</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514656
john cutler



Joined: 06 Sep 2003
Posts: 82
Location: Hot Tub, California

View user's profile Send private message

Re: PCWH Debugger - CPU Hogging
PostPosted: Wed May 21, 2003 11:01 pm     Reply with quote

Can't do the full check until morning, but when I launch ICD with nothing else plugged in, it does take 100\% - but of course it's waiting for me to connect to a nonexistent ICD-S. When I "abort" of course the ICD program ends and the usage disappears.

Tomorrow AM I'llbe hooked up normal again, and will post my findings. I do belive that when I was running ICD2 and MPLAB last week that the same thing was happening - fan coming on while "running" - the little busy light on the ICD2 flashes continuously when I'm running the target PIC via ICD2 control.

Hope I don't need to buy an ICE4000 to cure this Smile
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514658
sar



Joined: 08 Sep 2003
Posts: 36

View user's profile Send private message

Re: PCWH Debugger - CPU Hogging
PostPosted: Wed May 21, 2003 11:26 pm     Reply with quote

John
Just check while your in debugging mode with your target connected that ICD.exe isn't running at the same time the PCW debugger is. Check in Task manager (proccesses window).
SAR
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514659
john cutler



Joined: 06 Sep 2003
Posts: 82
Location: Hot Tub, California

View user's profile Send private message

Re: PCWH Debugger - CPU Hogging
PostPosted: Wed May 21, 2003 11:54 pm     Reply with quote

<font face="Courier New" size=-1>I checked and it's not running (ICD.exe) when debugging with PCWH - I did see (of course) that PCW.exe is running.

If I single step debug or run to a breakpoint, it's so quick that the CPU monitor never gets very high. But when just running my program with the debugger, it's still 100\%

I get the feeling that that's the way it is. Especially since the Microchip ICD2 essentially is doing the same thing with MPLab6.2.

Thanks!

John</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514660
shep
Guest







Re: PCWH Debugger - CPU Hogging
PostPosted: Thu May 22, 2003 2:45 am     Reply with quote

:=At least it appears CCS put the loading code in a separate thread. If you think the situation is bad with the debugger, try it with MPLAB 5.x. It basically locks up the machine until it is done. I only tried MPLAB 6.1 briefly and don't remember if it had the same affliction.
:=
:=The fact that your fan comes on during the downloads is quite bizzare. I always assumed the fan was controlled by a temperature sensor.

It is. When the proc goes to 100\% usage it heats up...

:=
:=:=I brought this up a few days ago, and after checking my CPU monitor, it appears that both when programming the flash rom in a pic chip, and when running the debugger from the green "go" button, 100\% of my host computer's CPU time is grabbed by PCWH and the ICD-S. Is there any way to affect this phenomenon?
:=:=It seems like either incorrect operation, or an error in programming design.
:=:=
:=:=Perhaps I'm just uninformed, and maybe without external buffers it's necessary for things to work this way. I purposely use a laptop because I am really bothered by the fan noise of desktops. Now I find that my wonderful, fast, quiet new laptop ONLY turns on it's fan when I use the ICD-S and debugger. This is a major bummer for me, so I'm hoping someone out here has some good news for me.
:=:=
:=:=Thanks
:=:=
:=:=John
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514665
Tomi
Guest







Re: PCWH Debugger - CPU Hogging
PostPosted: Thu May 22, 2003 5:25 am     Reply with quote

Keyspan could not be problem. I have a Toshiba laptop without any COM port, too. I also use a Keyspan adapter. I think the problem is about the software; some PC programs use a simple "command out - result in" protocol and once the command sent out these programs have a(n infinitive) loop to wait for incoming bytes. This means 100\% CPU usage.
In my own PC programs, I use the following method (and my CPU usage is under 15\% on a 1.7GHz P4 in a case of continuos polling):
1. Send out the command
2. Check the number of received bytes using ClearCommError() call (cbInQue record element holds the number of received chars). It is a very short call.
3. If the total amount is less than the expected: send the thread to sleep for 1msec using Sleep(1) (to give time for other tasks incl. processor power recycling) then goto point #2
4. Otherwise process the answer and optionally repeat from #1.

Maybe a new ICD-s software have to do something similar. Otherwise you will see 100\% CPU usage even if your USB-RS232 adapter is not connected.

:= forgot to mention that I'm using a Keyspan USB-RS-232 adapter to run the ICD-s
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514668
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group