All Forums
 Hardware
 General Hardware, ADSmartIO, Digital I/O and A/Ds
 Port reading/writing cause lockups with SmartIO?
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

generic@terumomedical.com

5 Posts

Posted - 05 Oct 2010 :  08:16:37  Show Profile
Hey guys, it seems that in my code, if I continually monitor any of the ports (PortA, PortB or PortC) on our BitsyXb board using SmartIO Api, I get lockups within 10-15 minutes....

I commented out the code and the program can run over night but with the code in, I always lock up. I am using the two functions SIOInitDDRX and SIOWritePortX...

The rate at which I am reading the ports is not that quick (like 4 to 6 times a second or so)...thoughts?

ctacke

877 Posts

Posted - 05 Oct 2010 :  09:11:18  Show Profile  Email Poster
This sounds like the issue over at Topic 2618 as well.

Edited by - ctacke on 05 Oct 2010 09:12:12
Go to Top of Page

akidder

1519 Posts

Posted - 05 Oct 2010 :  13:59:56  Show Profile  Email Poster
As an update to other readers, we are currently investigating if excessive calls to InitDDR() might be the fault. This is code that worked on the Bitsy, but is now causing a fault on the BitsyXb.

Some clarifications that came up in our discussions:
- InitDDR() is intended to be called once at the beginning of an application.
- An ADSmartIO bit can always be read, even if the bit is configured as an output (i.e. you should not call InitDDR to change the state of the IO to an input to determine its state)
- There are two ways to set the ADSmartIO outputs, which must be set eight bits at a time: (1) keep track of the desired state of each IO in a central, byte-size variable or (2) read the current state of an 8-bit IO port, change the target bit, and write the new value back out (read-modify-write).
- The ADSmartIO driver code has been designed to handle multi-threaded access. However, if your application is writing to the same port from different threads, you should probably centralize the writes in a single function.
Go to Top of Page

generic@terumomedical.com

5 Posts

Posted - 14 Oct 2010 :  18:17:46  Show Profile
Final reply (and fix for this), is that our CE Build is old. There is a new update (we had version 5.00.39 and the newest version is 5.00.59).

With the latest build, we could read analog and digital ports constantly without ever locking up. It looks like one of the fixed in 5.00.59 was the solution which was:
- SmartIO: Resolved driver failure that occurred after several hours of calls to SIOReadKeypad()

Edited by - generic@terumomedical.com on 15 Oct 2010 06:33:51
Go to Top of Page

akidder

1519 Posts

Posted - 15 Oct 2010 :  06:59:32  Show Profile  Email Poster
Thanks for providing the update to the rest of our readers. The fix for your fault was made in build 5.00.43, though there was a much more subtle fault that was corrected in 5.00.59.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.02 seconds. Snitz Forums 2000