Would it help if I ordered a dev board and the mikroe board you’re using?
Or do you think it would be better if I were to use the onboard PHY of the SC20100S? If so, is there any documentation on how to connect it, the correct impedance and what mag jack to use?
If 1-2 time in few hours then we will try more. But it happened every 500 messages easily then we are not on same page. If so then yes, you may need a dev board to see how different between yours and ours design.
Just ordered a SC20100S dev board from Digi and a Mikroe ENC28 click to test it out. Should arrive in a few days, I will report back my findings afterwards.
I tried the same program using the dev board + mikroe click and the problem still occurs. The only difference is that the temperature sensor is now working properly.
Here you see that the problem occurs after having read 410727 messages, this occurs after 410 seconds (6 minutes) because the message rate is 1000 msg/sec.
After redeploying the same code, it seems to happen after a rather random amount of messages. Below are some more screenshots of this phenomenon.
I figured out why the temperature sensor on my custom board did not work. I forgot to add the connections between VREF/VDDA to VCC in my schematic. A quick wire bridge fixed the problem, next version will get a ferrite bead though.
Thank you for the help, will this code be included in the can.Enable() function in the next release?
This does seem to fix the issue where the messagestoread goes to zero (I’m still testing this), but it seems to decrease the amount of messages/sec I am able to process.
When sending 1000 msg/sec, the program only counts 830 of them per second and ocasionally a can error 1 (read buffer full) is spit out.
Thanks. That flag doesn’t do anything with the speed. That flag can be set/clear after can.Enable(), so you can implement a button to set/clear to compare the speed. (press to set, press to clear…)
At 1000 msg/sec, meaning your system has to process a message less than 1ms. Check anything change from last time where we already reach to 1000 msg.
When sending 1000 msg/sec, the program only counts 830 of them per second and ocasionally a can error 1 (read buffer full) is spit out.
Yes, that error is expected if system could not keep up the speed. You can increase the can.ReadBufferSize to 265 or 1024… depends how much memory left. But this just help in special time when system busy. If system is always busy and can’t keep up 1ms all the time, buffer may full then, just longer.