I have more research and testing to do with the peripheral running 2.5x slower, particularly at 1M bus rate to be sure there is adequate performance.
I can help if you share the updated code (have 1M setup ready)
I have more research and testing to do with the peripheral running 2.5x slower, particularly at 1M bus rate to be sure there is adequate performance.
Sure, thanks. There is a branch called clock16 in the github repo. The github repo has an issue started so you can post findings there. I won't get to testing until Sunday afternoon so I wasn't spreading it around too much yet. Comment out the #error stuff in the header if testing at an odd CPU clock - I will remove that after getting things tested.I can help if you share the updated code (have 1M setup ready)
Sure, thanks. There is a branch called clock16 in the github repo. The github repo has an issue started so you can post findings there. I won't get to testing until Sunday afternoon so I wasn't spreading it around too much yet. Comment out the #error stuff in the header if testing at an odd CPU clock - I will remove that after getting things tested.
Sweet, thanks. When coding I ran at 500K but had no time to test. Did you check the RX filtering at 1M?Did some quick test @ 1M. Works fine
Did you check the RX filtering at 1M?
Ha. No doubt. I remember having micros at 2 and 4 MHz and hand optimizing every little thing to get what I needed out of them. Thanks again for all your work, this driver wouldn't be available for teensyduino 1.20 without your involvement.I could not get it to work reliably with 4 and 2 MHz which I believe is not a surprise at that data rate.
Ha. No doubt. I remember having micros at 2 and 4 MHz and hand optimizing every little thing to get what I needed out of them. Thanks again for all your work, this driver wouldn't be available for teensyduino 1.20 without your involvement.
In addition to the pawelsky testing above, I was able to confirm operation at the lower bit rates. The clock16 branch has been merged into master on the repo and we are good to go. The CAN clock input is taken from the 16MHz XTAL. Please post any issues or requests on the repository. Thanks for all the help.
https://github.com/teachop/FlexCAN_Library
Agreed. I was holding off hoping for a reply from Paul on the oscillator enable inquiry.So, time for RC#1 tag?
Agreed. I was holding off hoping for a reply from Paul on the oscillator enable inquiry.
Paul if you are still listening on this thread I need some teensy advice. I made this change and updated CAN phase timings to work directly from the XTAL. CAN works, yea. However, I needed to do this:
Code:OSC0_CR |= OSC_ERCLKEN;
Thank you. The driver is released as 1.0 now.Yes, that's perfectly fine.
Fyod, I use a modified version to sniff the messages on my motorbike and it works a treat. Not sending anything in (as it will likely just result in errors)
BTW: I'm planning to put FlexCAN in the Teensyduino 1.20 installer. Is the Teachop's copy on Github the best to use?