by PaulL » Sat Jul 10, 2010 8:13 pm
by PaulL
Sat Jul 10, 2010 8:13 pm
Well, I can tell you how I've done that to MY board.

I was doing a lot of work on writing to PCI Configuration Registers, and a few times along the way, I ended up either locked up and had to reboot, or invoked a reboot inadvertently. In both cases, I would end up with the same message you got, and each time, I had to reset the hard drive back to Auto. Sometimes, I would be moving the mouse after having run some code, and it would lock while I was moving the mouse, for no apparent reason, with no code actively running.
What I think is happening is one of two things: Either some register code wrote to somewhere it shouldn't have, or there was a "collision" with accessing the PCI Configuration Registers, perhaps the O.S. was attempting to do something with the hard drive or something at the time. Changing things in the PCI Configuration registers the way that it's done in RoboIO and in the software I've written (they use the same method) isn't quite the right way to do so. If something else (the operating system) attempts to access the PCI Configuration Registers while your code is doing so directly, you have a crash, a conflict.
It's a problem because it's a two-step process, writing to the PCI Configuration registers. First, you put a value out onto the PCI Config Address Register CF8h, then you either read or write a value to the PCI Config Data register CFCh. I know in XP, you can be interrupted by the O.S., perhaps you write to CF8h, then the CPU writes to CF8h, then you write to CFCh, and then you have a problem.
As to why you didn't see it until a reboot, you won't see BIOS changes until you reboot / restart. What would be changing BIOS and why? I am not sure, but my only guess is that it's related to the PCI Config register access method.
Most (all?) of the setup options for Roboard's custom hardware is accessed via the PCI Config registers.
Registers that use PCI Config Registers include:
- Buffer Strength / Clock Output Control Register
- CPU ID Register
- CPU Revision Register
- Device ID / Vendor ID Register
- GPIO Port 0 / Port 1 Data Register Base Address
- GPIO Port 0 Interrupt Register
- GPIO Port 1 Interrupt Register
- GPIO Port 2 / Port 3 Data Register Base Address
- GPIO Port 4 Data Register / GPIO Base Address
- I2C Base Address
- Internal Peripheral Feature Control Register I
- Internal Peripheral Feature Control Register II
- Internal Peripheral Feature Control Register III
- On-Chip Device Control Register
- Servo Control Register
- SPI Base Address Register
That said, if you were doing work that included any of those registers, I think that may have caused the problem.
IF this is the problem (and I'm not 100% certain that it is), then the "true" solution is to have a REAL driver that works WITH the XP driver model instead of clobbering it.

For XP, anyway.
What operating system were you using on your Roboard when it crashed? All will use the same PCI Configuration registers, and access to them depends on how the O.S. is built. Were you working with any of the above mentioned registers? If you're not sure, did you set some initialization for your compass? Which interface are you using to connect your compass?
Thanks,
Paul
Well, I can tell you how I've done that to MY board.

I was doing a lot of work on writing to PCI Configuration Registers, and a few times along the way, I ended up either locked up and had to reboot, or invoked a reboot inadvertently. In both cases, I would end up with the same message you got, and each time, I had to reset the hard drive back to Auto. Sometimes, I would be moving the mouse after having run some code, and it would lock while I was moving the mouse, for no apparent reason, with no code actively running.
What I think is happening is one of two things: Either some register code wrote to somewhere it shouldn't have, or there was a "collision" with accessing the PCI Configuration Registers, perhaps the O.S. was attempting to do something with the hard drive or something at the time. Changing things in the PCI Configuration registers the way that it's done in RoboIO and in the software I've written (they use the same method) isn't quite the right way to do so. If something else (the operating system) attempts to access the PCI Configuration Registers while your code is doing so directly, you have a crash, a conflict.
It's a problem because it's a two-step process, writing to the PCI Configuration registers. First, you put a value out onto the PCI Config Address Register CF8h, then you either read or write a value to the PCI Config Data register CFCh. I know in XP, you can be interrupted by the O.S., perhaps you write to CF8h, then the CPU writes to CF8h, then you write to CFCh, and then you have a problem.
As to why you didn't see it until a reboot, you won't see BIOS changes until you reboot / restart. What would be changing BIOS and why? I am not sure, but my only guess is that it's related to the PCI Config register access method.
Most (all?) of the setup options for Roboard's custom hardware is accessed via the PCI Config registers.
Registers that use PCI Config Registers include:
- Buffer Strength / Clock Output Control Register
- CPU ID Register
- CPU Revision Register
- Device ID / Vendor ID Register
- GPIO Port 0 / Port 1 Data Register Base Address
- GPIO Port 0 Interrupt Register
- GPIO Port 1 Interrupt Register
- GPIO Port 2 / Port 3 Data Register Base Address
- GPIO Port 4 Data Register / GPIO Base Address
- I2C Base Address
- Internal Peripheral Feature Control Register I
- Internal Peripheral Feature Control Register II
- Internal Peripheral Feature Control Register III
- On-Chip Device Control Register
- Servo Control Register
- SPI Base Address Register
That said, if you were doing work that included any of those registers, I think that may have caused the problem.
IF this is the problem (and I'm not 100% certain that it is), then the "true" solution is to have a REAL driver that works WITH the XP driver model instead of clobbering it.

For XP, anyway.
What operating system were you using on your Roboard when it crashed? All will use the same PCI Configuration registers, and access to them depends on how the O.S. is built. Were you working with any of the above mentioned registers? If you're not sure, did you set some initialization for your compass? Which interface are you using to connect your compass?
Thanks,
Paul