<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Claas,<br>
I am planning to add i2c support to stm32f4 so I've been trying to
find some information about it too.<br>
So far I've found i2c implementation for LPC24xx and I would take
it as a template for my port.<br>
The implementation is here: c/src/lib/libbsp/arm/lpc24xx/i2c/i2c.c.<br>
<br>
It looks like all the function: send_start, send_addr and
send_stop do the following steps:<br>
<br>
1/ set appropriate bits in i2c peripheral's control register and
write data to data register - so the transfer can immediatelly
start<br>
2/ obtain RTEMS semaphor - so device is locked <br>
3/ enable interrupt<br>
3/ finish<br>
<br>
the device will stay locked until interrupt handler is called,
then:<br>
1/ checks the current state of the i2c device and prepare another
transmittion (if it wasn't the last byte transmitted/received)<br>
2/ release the semaphor and disable interrupt - if it wasn't the
last byte)<br>
<br>
But I must confess, I haven't study the documentation how to port
RTEMS yet, so I just guess (having some knowledge about drivers
in Linux).<br>
So I can't guarantie I am 100% right.<br>
<br>
Maybe someone could confirm that it is ok<br>
<br>
Regards,<br>
Jiri<br>
<br>
<br>
<br>
On 11/12/12 10:16, Claas Ziemke wrote:<br>
</div>
<blockquote cite="mid:DUB115-W285C8A6F1BB3C85F6A0563BE480@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
<div dir="ltr">
hi all,<br>
<br>
sorry for spamming all the lists with this, but since nobody
answered on my first try i have to repost this.<br>
if nobody wants to take this one, please point me to the right
documentation or the right people to ask directly.<br>
<br>
i am currently working on the implementation of the low-level
driver for the beagleboard/omap35xx i2c drivers.<br>
<br>
i see that in the libi2c there are 5 hooks defined:<br>
<br>
const rtems_libi2c_bus_ops_t beagle_i2c_ops = {<br>
.init = beagle_i2c_init,<br>
.send_start = beagle_i2c_send_start,<br>
.send_stop = beagle_i2c_send_stop,<br>
.send_addr = beagle_i2c_send_addr,<br>
.read_bytes = beagle_i2c_read,<br>
.write_bytes = beagle_i2c_write,<br>
.ioctl = beagle_i2c_ioctl<br>
};<br>
<br>
my question is:<br>
<br>
are the send_start, send_addr and send_stop functions supposed
to actually _send_ the according signals to the bus when called?<br>
or are they just preparing the device and the actual sending
takes place in the read/write functions?<br>
<br>
i have some difficulties generating the former behaviour on the
beagleboard hardware.<br>
<br>
thx for the great help so far, i am recently making really good
progress, the interrupt handling is working now and i only have
to <br>
implement the i2c drivers and the clockdriver which i hope to do
till xmas, so that u get a new BSP for RTEMS as a little xmas<br>
present finally...<br>
<br>
greetz,<br>
<br>
claas </div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
rtems-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a>
<a class="moz-txt-link-freetext" href="http://www.rtems.org/mailman/listinfo/rtems-users">http://www.rtems.org/mailman/listinfo/rtems-users</a>
</pre>
</blockquote>
<br>
</body>
</html>