3 things need to be done: Line 3 one doesn't uncomment but one needs to insert the complete lines (also note that the word overlay is removed after the mcp2525-can0 and -can1
Insert the line dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=22 for CanBerryNormal, Isolated and CanBerryDual
Insert the line dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=25 only for CanBerryDual
After line 8, you must copy ALL the files in canberry-codesys folder (not the folder) to /home/pi
Also I2C needs to be activated even if you do not intend to use the RTC.
Once done it works as expected!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
I am using a Rpi3 with Stretch and a canberry dual HAT.
Canbus seems to be operating on the pi as per ifconfig and also using candump to monitor the traffic.
The canberry project appears to have loaded correctly into codesys.
https://forum.codesys.com/viewtopic.php?f=21&t=9265 Except I have no idea where to change the clock speed this time.
I can see the webinterface but nothing changes.
Thanks
Seem to have got one stage furtehr. I wasn't using the RTC so did not enable I2C as the Can only uses SPI.
It is now working after enabling I2C.
The instructions on the canberry website are not fully correct certainly for Stretch:
https://www.industrialberry.com/?s=codesys&submit=Search
3 things need to be done: Line 3 one doesn't uncomment but one needs to insert the complete lines (also note that the word overlay is removed after the mcp2525-can0 and -can1
Insert the line dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=22 for CanBerryNormal, Isolated and CanBerryDual
Insert the line dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=25 only for CanBerryDual
After line 8, you must copy ALL the files in canberry-codesys folder (not the folder) to /home/pi
Also I2C needs to be activated even if you do not intend to use the RTC.
Once done it works as expected!
Continuing with info I found as it may help others:
The demo that is provided for the caberry will not send.
You need cansend and this you download from http://www.skpang.co.uk/dl/can-test_pi2.zip These are teh CAN test programs provided for the pi-2 at skpang.co.uk
You will need to put them on the pi and copy the cansend file to /home/pi
In codesys you will need to add in front of the command cansend ./cansend cano or can1 depending on which interface you are using.