Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding FC1121 PCIe functions #9

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

robert-burger
Copy link

This pull-request adds functionality for Beckhoff FC1121 slave cards which presumable use the same FPGA/CCAT interface.

  • esc.c: access ESC registers and memory
  • irq.c: IRQ function of the FC1121.

ESC register mapping is working fine.
IRQ does not seems to work though it is implemented as described in FC1121 documentation (https://download.beckhoff.com/download/document/io/infrastructure-components/fc11xxen.pdf).

@pbruenn
Copy link
Member

pbruenn commented Mar 1, 2024

Hi @robert-burger nice work. The ESC part looks good and should be easy to merge. I only would want to reuse the ccat_sram_read/write functions or do I miss something? They look pretty similar. The IRQ driver will be more difficult, since I can't help you at the moment to fix that.

@robert-burger
Copy link
Author

we could use the read and write funcs of the sram driver but i don't use them for the slave stack. There i only use mmap to map the ESC regs/memory to user-level. So the mmap is the important part here which is missing in the sram driver.

modprobe rule to automatically load other ccat_* modules after ccat was loaded automatically by pci id.
udev rule to set permissions for users on /dev/ccat_* device files.
- It seems to be there is a mistake in the documentation of
the FC1121 card. In chapter 3.2.1 Interrupt it is said that
the global interrupt enable/status is bit 7 but instead it
is bit 0 !!!

- The FC1121 card is also configured to map DC Sycn0/1 interrupts
to PDI interrupt for only 100 ns. With this configuration DC interrupts
cannot be used when using standard OS like Linux or Windows. For processing
inside an IRQ handler this is usually too short to determine the INT source.
@robert-burger
Copy link
Author

The interrupt seems to work now, but please notice:

  • It seems to be there is a mistake in the documentation of
    the FC1121 card. In chapter 3.2.1 Interrupt it is said that
    the global interrupt enable/status is bit 7 but instead it
    is bit 0 !!!

  • The FC1121 card is also configured to map DC Sycn0/1 interrupts
    to PDI interrupt for only 100 ns. With this configuration DC interrupts
    cannot be used when using standard OS like Linux or Windows. For processing
    inside an IRQ handler this is usually too short to determine the INT source.

@robert-burger
Copy link
Author

any news about that? changes needed?

@pbruenn
Copy link
Member

pbruenn commented Aug 28, 2024

Hi Robert, thanks for the ping. The same applies here as in the BBAPI PR. I would also like to try this out before I merge it. Unfortunately, I don't have the test infrastructure for the CCAT driver, as we no longer use the driver ourselves (DPDK). I won't be able to see if I can find the time for this until next week at the earliest. At least to merge the small changes. For the FC1121 extension, I first have to get some hardware and think about how to integrate it into the infrastructure. I'm really sorry for leaving your PRs hanging around like this. I know this from the other direction so I'll definitely do the BBAPI stuff tomorrow. And CCAT is also on the list but I hope nothing else comes up in the next week. Many thanks and best regards, Patrick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants