Cyclic messages

4-Channel CAN Router with Data Logger
Post Reply
c.litke
Posts: 3
Joined: Fri 29. Oct 2021, 12:35

Cyclic messages

Post by c.litke » Thu 9. Dec 2021, 15:24

Hi PEAK Forum,

I am currently developing custom firmware for the PCAN-Router Pro, using the PCAN development kit.
As part of my development I'm trying to send out cyclic status messages every 20 ms, Ideally, I would set up an independent thread sending out defined messages.
How would I go ahead to do that? How do I set up cyclic messages using the dev kit?
I can't find any option for timekeeping in smaller increments than seconds in the lpc22xx.h to test against, and creating threads does not seem possible unless I port my entire project to C++.

Regards,
Litke

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: Cyclic messages

Post by M.Heidemann » Thu 9. Dec 2021, 16:16

Hello,

Have you taken a look at the timer example provided with the PEAK-DevPack yet?

You can find it in :

PEAK-DevPack\Hardware\PCAN-Router_Pro\Examples\03_TIMER

Download Link PEAK-DevPack:
https://www.peak-system.com/quick/DLP-DevPack

The timer implementation shown here can easily work in the milliseconds
range (Depending on the load otherwise) and does not require threads to work.

Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

Post Reply