parallel I/O ports & opend darin pins on MPC8xx
Hi,
on one of our boards we are using one of the I/O pins in open drain mode. This leads to some problems in combination with other drivers that write to the ports data register. Since they can not detect the current output value of the open drain pin. They only see the status of the I/O pin no matter who forces the value the CPM or another device connected to the open drain pin. After writing back the value read from the I/O data register this value is forced by CPM which is normaly wrong.
Did anyone run into that problem in the past? What was your solution? Any thing else but NOT using open drain pins?
Thanks, Stephan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 4 lines · Stephan Linke
on one of our boards we are using one of the I/O pins in open drain mode. This leads to some problems in combination with other drivers that write to the ports data register. Since they can not detect the current output value of the open drain pin. They only see the status of the I/O pin no matter who forces the value the CPM or another device connected to the open drain pin. After writing back the value read from the I/O data register this value is forced by CPM which is normaly wrong.
Stephan,
What you are explaining, I beleive, is the reason why developers use open drain in the first place. Multiple devices connected to control a single signal giving bidirectional data flow.
Quoted 2 lines
Did anyone run into that problem in the past? What was your solution? Any thing else but NOT using open drain pins?
Have you grepped the kernel source to find the other drivers affecting that specific port control register? What did you look for and what did you find?
Craig
Quoted 1 line
--
------------------------------------------------------------
Dr. Craig Hollabaugh, [email protected]
Author of Embedded Linux: Hardware, Software and Interfacing www.embeddedlinuxinterfacing.com
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Dear Stephan,
Quoted 2 lines · in message <[email protected]> you wrote:
on one of our boards we are using one of the I/O pins in open drain mode. This leads to some problems in combination with other
Please don't use such long lines, they are hard to read.
Quoted 3 lines
drivers that write to the ports data register. Since they can not detect the current output value of the open drain pin. They only see the status of the I/O pin no matter who forces the value the CPM or another device connected to the open drain pin. After writing back the value read from the I/O data register this value is forced by CPM which is normaly wrong.
This is a feature. It allows you to detect the the state of the pin which can be pretty useful.
Quoted 1 line
Did anyone run into that problem in the past? What was your solution? Any thing else but NOT using open drain pins?
It is _not_ a problem, it is a feature, and a useful one.
Solution? What is so difficult about latching your output value in a variable?
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] It is practically impossible to teach good programming style to stu- dents that have had prior exposure to BASIC: as potential programmers
they are mentally mutilated beyond hope of regeneration. - Dijkstra
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
I hope it is not a Hardware problem. Do you
need an external pullup? If you do not have one, then the problem arises (had the same problem once). Except if one of your peripherals actively drives your input....
Cheers
Dimitris.
Quoted 16 lines · --- Stephan Linke
Hi,
on one of our boards we are using one of the I/O pins in open drain mode. This leads to some problems in combination with other
drivers that write to the ports data register. Since they can not detect the current output value of the open drain pin. They only
see the status of the I/O pin no matter who forces the value the CPM or another device connected to the open drain pin. After
writing back the value read from the I/O data register this value is forced by CPM which is normaly wrong.
Quoted 8 lines
Did anyone run into that problem in the past? What was your solution? Any thing else but NOT using open drain pins?
Thanks, Stephan
=====
------------------------------------------------------------
-Dhmhtrios Meidanis
-Degree in Mathematics, University of the Aegean.
-Master in Computer Architecture and Digital
Systems, University of Crete.
Greece.
------------------------------------------------------------
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/