Speed while sending out CAN-signals

4-Channel CAN Router with Data Logger
ckessle2
Posts: 14
Joined: Wed 15. Mar 2017, 11:44

Re: Speed while sending out CAN-signals

Post by ckessle2 » Mon 10. Apr 2017, 11:00

Thanks for the help delivered so far. Good news:

Update on buffer tests
At first a slow increase with some improvements. Then I increased all buffers to 64

Code: Select all

#define  CAN1_TX_QUEUE_SIZE	64
#define  CAN1_RX_QUEUE_SIZE	64

#define  CAN2_TX_QUEUE_SIZE	64
#define  CAN2_RX_QUEUE_SIZE	64

#define  CAN3_TX_QUEUE_SIZE	64
#define  CAN3_RX_QUEUE_SIZE	64

#define  CAN4_TX_QUEUE_SIZE	64
#define  CAN4_RX_QUEUE_SIZE	64
Now the code works perfect.
However, I do not know if 64 is affecting other parts of the Router.
Could you please tell me:
- the unit of the Queue-Size? Is it bytes or messages or something else?
- is there a maximum queue size which should not be exceeded?

Best regards
ckessle2

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

Re: Speed while sending out CAN-signals

Post by P.Steil » Tue 11. Apr 2017, 11:13

hello,

the queue sizes are in message-counts. So 16 will mean 16 messages.
The values 56 and 100 refers to the PPCAN standard firmware for module
shipment. It was erroneously refered to your issue, but it is not relevant
cause you use GCC writing your own firmware.

Attached you can find a standard example 1_ROUTING modified using filters.
Test was OK, try this on your module and compare your code or use this as
starting point for your firmware.
Attachments
1_ROUTING.ZIP
filter example
(122.81 KiB) Downloaded 568 times
--------------------------------------------
PEAK-System HW development Team
support@peak-system.com
phone: +49-6151-8173-20
fax: +49-6151-8173-29
--------------------------------------------

ckessle2
Posts: 14
Joined: Wed 15. Mar 2017, 11:44

Re: Speed while sending out CAN-signals

Post by ckessle2 » Wed 12. Apr 2017, 08:20

Thanks again for the clear answer.
The attached 1_routing.zip has again the too small queue sizes (8 and 16 messages for TX and RX_Queue). Since I am using now 64 for both I am closer to the 56/100 message size for the PPCAN standard and therefore it should not be too large.
Once I wanted to complain that info is missing in the router-manual - but it is lots of work to collect everything in one document. The forum works fine.
Problem solved!

Post Reply