Skip to content

Conversation

robert-burger
Copy link
Contributor

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
Contributor 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
Contributor 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
Contributor 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

@robert-burger
Copy link
Contributor Author

Push.
Any chance that this ever get's merged?

@pbruenn
Copy link
Member

pbruenn commented Aug 5, 2025

Sorry, again. I was on vacation the last three weeks. Well, my last attempt was to split this into logical chunks (eeprom, irq, fc1121). But as that was quite complicated and hard to diff. I hit a point with more urgent things to do and lost track. If you split off the eeprom addition the irq driver into separate commits/PR. We can try again. Sorry I don't even have time to write a CONTRIBUTING file but it would actually just be a reference to the Linux submitting_patches documentation. E.g. have logical ordered, clean commits.

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