PCAN-Router interrupts

Universal CAN Converter
Post Reply
AshokaPhatke
Posts: 1
Joined: Mon 31. Mar 2014, 21:06

PCAN-Router interrupts

Post by AshokaPhatke » Tue 1. Apr 2014, 02:52

I want to use 'CAN read' and 'CAN write' functions in a timer interrupt. Is there an example to setup and use interrupts in c and use them with yagarto command line tool?

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

Re: PCAN-Router interrupts

Post by PEAK-Support » Tue 1. Apr 2014, 17:54

All available Samples are part of the product DVD:
http://www.peak-system.com/produktcd
in section Develop - Microcontroller Hardware - PCAN-Router - Examples
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

User avatar
P.Steil
Hardware Development
Hardware Development
Posts: 32
Joined: Fri 14. Jan 2011, 10:27

Re: PCAN-Router interrupts

Post by P.Steil » Wed 2. Apr 2014, 09:23

hello,

attached you can find an example for a timer IRQ. The example will send a message from an IRQ.
The function CAN_UserWrite() is protected against timer IRQs. You can modify this example for your
own needs. If you want to read from CAN inside the IRQ, the CAN_UserRead() function must be
protected against timer IRQs too.
Attachments
31_TIMER_ISR.zip
(41.86 KiB) Downloaded 799 times
--------------------------------------------
PEAK-System HW development Team
support@peak-system.com
phone: +49-6151-8173-20
fax: +49-6151-8173-29
--------------------------------------------

Post Reply