Reading CAN messages via interrupt

Programmable 6-channel router and data logger for CAN and CAN FD with I/O and optional Ethernet interface
Locked
javher4127
Posts: 2
Joined: Mon 22. Jan 2024, 08:50

Reading CAN messages via interrupt

Post by javher4127 » Mon 22. Jan 2024, 09:05

Hi,

I would like to read CAN messages with PCAN Router Pro FD via interrupt instead of via poll within the main function.
How do I do this using the PCAN Router Pro FD?

Best regards.

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Reading CAN messages via interrupt

Post by PEAK-Support » Mon 22. Jan 2024, 14:53

The CAN FPGA Core and the MCU have no option to interact with IRQs.
But in the sample package are RTOS Sample(s), Sample 20 and 21, here you could simply add your needed feature (callback) in a own task.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

javher4127
Posts: 2
Joined: Mon 22. Jan 2024, 08:50

Re: Reading CAN messages via interrupt

Post by javher4127 » Tue 23. Jan 2024, 10:21

Would it be possible to activate the interrupt of the DMA peripheral of the microcontroller, to detect when the data of a CAN frame is written to the memory through DMA?

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Reading CAN messages via interrupt

Post by PEAK-Support » Tue 23. Jan 2024, 11:15

As we wrote - No - not possible - use the RTOS - that is the recommended way.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Locked