Page 1 of 1
PCAN-Router interrupts
Posted: Tue 1. Apr 2014, 02:52
by AshokaPhatke
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?
Re: PCAN-Router interrupts
Posted: Tue 1. Apr 2014, 17:54
by PEAK-Support
All available Samples are part of the product DVD:
http://www.peak-system.com/produktcd
in section Develop - Microcontroller Hardware - PCAN-Router - Examples
Re: PCAN-Router interrupts
Posted: Wed 2. Apr 2014, 09:23
by P.Steil
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.