All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Accessing an EtherCAT master from a Xenomai driver
@ 2014-01-15  8:55 Asier Tamayo
  2014-01-15 13:41 ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Asier Tamayo @ 2014-01-15  8:55 UTC (permalink / raw)
  To: xenomai@xenomai.org

Hello all,

I'm using IgH EtherCAT master for Linux, from EtherLab. I have a problem with accessing the master from a RTDM driver.

I've already asked this question in the EtherLab list, but have received no response, so I'm posting it here in case someone has worked with EtherLab but is no more in the mailing list.

My problem is the following:

I can access the EtherCAT master from a Xenomai user task, but have found no way to do it from a RTDM driver. In my tests, I have tried to follow the functions from the Xenomai example, but I find some problems I can't see how to resolve.

For instance, the Xenomai example (user space application) calls ecrt_master_activate(), which eventually calls rtdm_mmap_to_user(): in the RTDM driver, rtdm_mmap_to_user() is called with a user_info value set to NULL, and it crashes. Also, some functions have to be called in non-RT context. For example, ecrt_master_slave_config(), which allocates memory by causing a page fault.

I hope this time I'll have better luck. Best regards,


Asier Tamayo Arbide

Dpto I+D

R&D Department



ONA Electroerosión, s.a.



t      (34) 946 200 800

m    (34) 600 910 522

f      (34) 946 818 548

e      asier.tamayo@onaedm.com<mailto:asier.tamayo@onaedm.com>

w    www.onaedm.com<http://www.onaedm.com/>








[cid:image001.jpg@01CF11D7.E294FF10]








Aviso legal: Este mensaje y los documentos adjuntos pueden contener información confidencial. Si usted lo ha recibido por error debe saber que la información contenida en el mismo es reservada y su uso no autorizado esta prohibido por la ley, por lo que le rogamos que nos lo comunique por la misma vía y proceda a borrar el mensaje.


Legal advice: The contents of this email and any attachments may contain confidential information. If you have received it by mistake please be aware that the information is private and confidential and as such its non authorised use is legally protected, therefore we ask you to contact the sender and delete the message.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3717 bytes
Desc: image001.jpg
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20140115/a63ad03c/attachment.jpg>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai] Accessing an EtherCAT master from a Xenomai driver
  2014-01-15  8:55 [Xenomai] Accessing an EtherCAT master from a Xenomai driver Asier Tamayo
@ 2014-01-15 13:41 ` Jan Kiszka
  2014-01-15 15:45   ` Asier Tamayo
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2014-01-15 13:41 UTC (permalink / raw)
  To: Asier Tamayo, xenomai@xenomai.org

On 2014-01-15 09:55, Asier Tamayo wrote:
> Hello all,
> 
> I'm using IgH EtherCAT master for Linux, from EtherLab. I have a problem with accessing the master from a RTDM driver.
> 
> I've already asked this question in the EtherLab list, but have received no response, so I'm posting it here in case someone has worked with EtherLab but is no more in the mailing list.
> 
> My problem is the following:
> 
> I can access the EtherCAT master from a Xenomai user task, but have found no way to do it from a RTDM driver. In my tests, I have tried to follow the functions from the Xenomai example, but I find some problems I can't see how to resolve.
> 
> For instance, the Xenomai example (user space application) calls ecrt_master_activate(), which eventually calls rtdm_mmap_to_user(): in the RTDM driver, rtdm_mmap_to_user() is called with a user_info value set to NULL, and it crashes. Also, some functions have to be called in non-RT context. For example, ecrt_master_slave_config(), which allocates memory by causing a page fault.
> 
> I hope this time I'll have better luck. Best regards,

The right address for your request remains the EtherLab Master project -
or you need to fix it yourself. Probably, their RTDM driver is not well
prepared for being used by other drivers and requires adaptions. Or
there are some details missing in the API documentation, e.g. that you
do not need to invoke that service which performs rtdm_mmap_to_user.
Moreover, from a quick look over it, EtherLab contains several
conceptual bugs /wrt RTDM API usage, so I would look carefully at the
whole thing.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai] Accessing an EtherCAT master from a Xenomai driver
  2014-01-15 13:41 ` Jan Kiszka
@ 2014-01-15 15:45   ` Asier Tamayo
  0 siblings, 0 replies; 3+ messages in thread
From: Asier Tamayo @ 2014-01-15 15:45 UTC (permalink / raw)
  To: Jan Kiszka, xenomai@xenomai.org

Dear Jan,

Thank you for your support. I think you're right when you say the Xenomai part of the EtherLab master is not finely tuned.

I may finally create a Xenomai task that accesses the EtherCAT RTDM driver, and let the other tasks communicate with the first one. However, I preferred the driver solution: better latency and better system structure (I could call the RTDM driver from another driver, both being at the same level).

If this solution doesn't work, I may try fixing the master myself.

> The right address for your request remains the EtherLab Master project -
>
I completely agree with you. As I wrote in my previous e-mail, I had already asked it there.

Best regards,

Asier Tamayo Arbide
Dpto I+D
R&D Department
 
ONA Electroerosión, s.a.
 
t      (34) 946 200 800
m    (34) 600 910 522
f      (34) 946 818 548
e      asier.tamayo@onaedm.com
w    www.onaedm.com
 
 
 
 
> -----Mensaje original-----
> De: Jan Kiszka [mailto:jan.kiszka@siemens.com]
> Enviado el: miércoles, 15 de enero de 2014 14:41
> Para: Asier Tamayo; xenomai@xenomai.org
> Asunto: Re: Accessing an EtherCAT master from a Xenomai driver
> 
> On 2014-01-15 09:55, Asier Tamayo wrote:
> > Hello all,
> >
> > I'm using IgH EtherCAT master for Linux, from EtherLab. I have a problem
> with accessing the master from a RTDM driver.
> >
> > I've already asked this question in the EtherLab list, but have received
> no response, so I'm posting it here in case someone has worked with
> EtherLab but is no more in the mailing list.
> >
> > My problem is the following:
> >
> > I can access the EtherCAT master from a Xenomai user task, but have
> found no way to do it from a RTDM driver. In my tests, I have tried to
> follow the functions from the Xenomai example, but I find some problems I
> can't see how to resolve.
> >
> > For instance, the Xenomai example (user space application) calls
> ecrt_master_activate(), which eventually calls rtdm_mmap_to_user(): in the
> RTDM driver, rtdm_mmap_to_user() is called with a user_info value set to
> NULL, and it crashes. Also, some functions have to be called in non-RT
> context. For example, ecrt_master_slave_config(), which allocates memory
> by causing a page fault.
> >
> > I hope this time I'll have better luck. Best regards,
> 
> The right address for your request remains the EtherLab Master project -
> or you need to fix it yourself. Probably, their RTDM driver is not well
> prepared for being used by other drivers and requires adaptions. Or
> there are some details missing in the API documentation, e.g. that you
> do not need to invoke that service which performs rtdm_mmap_to_user.
> Moreover, from a quick look over it, EtherLab contains several
> conceptual bugs /wrt RTDM API usage, so I would look carefully at the
> whole thing.
> 
> Jan
> 
> --
> Siemens AG, Corporate Technology, CT RTC ITP SES-DE
> Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-15 15:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-15  8:55 [Xenomai] Accessing an EtherCAT master from a Xenomai driver Asier Tamayo
2014-01-15 13:41 ` Jan Kiszka
2014-01-15 15:45   ` Asier Tamayo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.