The 500kbps CAN bus is not fully loaded so I think I might have cracked it for now.
I added a control line from the Slave to the Master to basically say 'Hold on Boss i'm not ready'.
This also keeps the SPI in sync and means CAN packets are no longer getting missed.
I'm going to load up both sides of the CAN bus with a load more packets and see if it falls over.
I realise time is tight.
I need to add a counter to see how many cpu cycles are unused at present?
Not sure how to do that...
This is it working.. for now..
Bookmarks