Open robert-burger opened 6 months ago
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.
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.
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.
any news about that? changes needed?
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
This pull-request adds functionality for Beckhoff FC1121 slave cards which presumable use the same FPGA/CCAT interface.
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).