Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Windows 7 x64/Setupio CPU usage problem
Goto page Previous  1, 2
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various
View previous topic :: View next topic  
Author Message
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Thu Jan 26, 2012 2:11 pm    Post subject: Reply with quote

i will have a look at it. my test system was vista 64 bit. maybe the installer has a problem. when it detects 64 bit it needs to install the 64 bit version so maybe that is not working correct for win7 64 bit.
_________________
Mark
Back to top
View user's profile Visit poster's website
richhbd

Bascom Member



Joined: 03 Feb 2006
Posts: 52

blank.gif
PostPosted: Fri Jan 27, 2012 2:10 am    Post subject: Reply with quote

Concur with your suspicion re. a bug in the io driver installer Mark, although I think there's another problem, on my system at least, and I'm not sure at the moment whether it's related to the i/o driver or the parallel port card (and its drivers)

I've done some more experimentation over the last couple of days and a couple of interesting things have popped up. First of all, I've uninstalled and reinstalled the I/O driver a couple of times, and I've now run into the same issue Luciano has already reported on:

I did some work on a project under W7 tonight, but only installed the i/o driver when I was ready to program - because I didn't want it sitting there using CPU unnecessarily. When I restarted the OS, I didn't get any CPU utilisation, but I couldn't connect to the chip either. Quick investigation revealed that the 32 bit Tvicport.sys driver was now installed - which was then being prevented from running in exactly the same way Luciano reported - "The TVicPort service failed to start due to the following error: This driver has been blocked from loading"

Manual search reveals that the tvicport64.sys file was still present in the 64 bit \Drivers folder - despite theoretically being uninstalled a couple of days ago. Also when I look in the registry, the keys relating to tvicport64 are still present, but the values are all empty. So looks not only like the installer has difficulty determining whether the OS is 32 or 64 bit, but also that the uninstaller occasionally has issues too.

Now, before I started getting this error I'd noticed a further bit of detail re. this CPU utilisation issue. First of all I reinstalled the IO driver on the Win764 setup to see if I could get any more detail on what was going on. Restarted the OS, but this time didn't get the permanent CPU utilisation.

Anyway, wondering what was going on, I started BASCOM, still no constant CPU use. Then when I was ready to flash , I connected the programmer to a test board, and at this point the "phantom" CPU utilisation related to System Interrupts was back - about 90% of one logical processor (10% of the CPU as a whole).

Tested this a couple more times, and sure enough, if I start Windows with the programmer disconnected, everything seems to run fine. As soon as I connect the programmer to the target device, I get the CPU usage.

Furthermore, the NetMos PCI parallel card I've got allows three options for the port's IRQ usage: You can configure it to never use an interrupt, "try not to use an interrupt", or "Use any interrupt assigned to the port". I've tried all three options and I get the CPU utilisation irrespective of which is selected. Changing the option while the OS is running didn't stop or change the utilisation either.

After all of that I went back over to the XP32 setup, and noticed a bit of detail that I hadn't seen t'other day. If I program the chip once, I get CPU utilisation of around 10-11% while the flash is in progress, dropping back down to 0 once program is finished. However, if I hit program a second time, I'll now see about 22% CPU usage during the flash operation, which then drops down to a permanent 9-10% after programming is finished - just like I was getting under W7. It stays there even if I disconnect the AVR.

If I then go into parallel port's properties in Device Manager and change the IRQ usage (doesn't matter which of the three options I choose, just changing it is enough), the abnormal CPU usage disappears - until I restart Bascom and program the chip twice. So, seems as though the I/O driver is failing to release the parallel port - or maybe Bascom is failing to release the I/O driver after programming the second time, while changing the IRQ usage option forces either the port, or the drivers, to reset.

Now what I'm not sure of is why I'm getting odd CPU use on this "new" XP partition when I didn't back when it was my main OS. It could be the parallel port card - but then again, I was using the same hardware, and driver, before. The only real difference I can think of is that on my old XP install, I would originally have set up Bascom at version 1.9x (early 2009-ish) and then upgraded incrementally to current via the Wiz. On my new install (both 7 and the new XP partition), I used the 2.0.7.3 setup.ese. Mark, taking a bit of a stab in the dark, is there any difference between the i/o driver installer supplied with the recent Bascom builds and the 2008-2009 vintage ones? Unfortunately I don't have any old setup.exes here otherwise I'd test that theory myself.

Have ordered the bits to build a USB programmer, so if all else fails the problem's going to be solved, but would be nice to try and get to the bottom of this. Smile
Back to top
View user's profile
Luciano

Bascom Member



Joined: 29 Nov 2004
Posts: 3149
Location: Italy

blank.gif
PostPosted: Fri Jan 27, 2012 10:19 am    Post subject: Reply with quote

@richhbd: My system was not "contaminated" by the EnTech demo.

* * *

On my W7U-64bit after the installation of Bascom 2.0.7.3 I have:

Files:

The file TVicPort.sys is present in these two folders:

C:\Windows\System32\drivers\
C:\Windows\SysWOW64\drivers\


The file TVicPort64.sys is missing from the system.

The file cpd64.exe is missing from the system.
(Tested after installation, before re-starting the system
and before running Bascom).

=====================================================

Windows Registry:

The key TVicPort is present here:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\TVicPort
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\services\TVicPort
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TVicPort

These are the subkeys present in the above 3 keys:

"Type"=dword:00000001
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"Group"="Extended Base"
"Parameters"=""


The key TVicPort64 is missing from the Windows registry.

=====================================================

I have extracted the installation script from the Bascom setup.exe
and apparently the lines with Check: "Is64BitInstallMode" are all
skipped during the installation on my Windows 7 Ultimate 64-bit (SP1).

I have also extracted cpd64.exe and if I run it from the command line
with a ? as parameter on my system I get:

windows directory: C:\Windows
buf_from: C:\Windows\syswow64\drivers\?
buf_to: C:\Windows\system32\drivers\?

cpd64.exe is used to copy or move the file TVicPort64.sys.
(See section RUN of the installation script).

Best regards,

Luciano

PS: All my testing has been done on a real machine. (Not VM).
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Fri Jan 27, 2012 11:54 am    Post subject: Reply with quote

i installed the demo and the tvicport.dll is exact the same.
the tvicport64.sys reports the same version : 5.2.1.0 only the size differs. That could be because i got an update by mail.
i will test this other driver.

as i already deducted, the Is64BitInstallMode is not working otherwise you should have the right files on your system.
The installer sample came with tvicport.
i checked this and Is64BitInstallMode is when the installer is 64 bit. It does not say anything about the OS. Of course a 64 bit app can only run on 64 bit OS. But since 32 bit app can run on 64 bit OS as well, it is not the best test.
i will replace this by Iswin64 which will work correct for both 32 and 64 bit installers.

_________________
Mark
Back to top
View user's profile Visit poster's website
Luciano

Bascom Member



Joined: 29 Nov 2004
Posts: 3149
Location: Italy

blank.gif
PostPosted: Fri Jan 27, 2012 12:56 pm    Post subject: Reply with quote

In my opinion the user should have the choice to decide to install
the driver or not depending if the parallel port is used or not as
interface for the ISP programmer. This can be done if you remove the
installation of the driver from the Bascom setup and the let the
user decide and run a small setup program to install the driver.
This was the solution you have used when TVicPort was first
introduced, the name of this file was setupio.exe. (Size 359567 bytes).

Example:

SetupIOx86.exe for 32 bit systems.
SetupIOx64.exe for 64 bit systems.

(With two versions you don't need "Is64BitInstallMode").

If the user inside the Bascom IDE try to run a programmer using
the parallel port, Bascom will verify the presence of the file
"TVicPort.dll" in the Bascom program folder and if the file is missing,
a message box will say:

Please run first SetupIOx86.exe to install the driver on a 32-bit OS
or SetupIOx64.exe to install the driver on a 64-bit OS. (The Bascom IDE
must be closed first and the above setup programs are located in the
Bascom program folder).


In the setup you will display a message like:
To be installed only on a XX bit OS, press cancel to abort the installation.

* * *

The advantages of a separate driver installation are:

- No low-level I/O driver running for noting. (TVicPort runs as a service).
(PC without parallel port or for users using a USB/RS232 programmer).

- No very old (2005) low-level I/O driver running for noting.

- The user can uninstall only the driver and keep Bascom installed.

- The user can run the setup of the driver at any time.
(When a PCI parallel port is installed after the Bascom setup).

- The user can uninstall the driver installed by the Bascom setup if
the driver is first installed and then uninstalled with this separate setup.


Best regards,

Luciano
Back to top
View user's profile
Luciano

Bascom Member



Joined: 29 Nov 2004
Posts: 3149
Location: Italy

blank.gif
PostPosted: Sat Jan 28, 2012 5:38 pm    Post subject: Reply with quote

(This is something to be verified).

A driver that lacks a valid digital signature can't be
installed on 64-bit versions of Windows.

Is the new size of the file tvicport64.sys related
with the digital signature?

Release-Signing a Driver through an Embedded Signature: LINK
(Must be done by EnTech).

Best regards,

Luciano
Back to top
View user's profile
Luciano

Bascom Member



Joined: 29 Nov 2004
Posts: 3149
Location: Italy

blank.gif
PostPosted: Tue May 21, 2013 11:14 am    Post subject: Reply with quote

Update:

The driver problem will be solved in Bascom 2.0.7.7.

For now you can use this solution: LINK

Best regards,

Luciano
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
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
You cannot attach files in this forum
You cannot download files in this forum