pierremolinaro / acan-t4 Goto Github PK
View Code? Open in Web Editor NEWCAN / CANFD Arduino Library for Teensy 4.0
License: MIT License
CAN / CANFD Arduino Library for Teensy 4.0
License: MIT License
Pierre,
I am not writing this to bring up an issue, but rather to get in contact with you about giving credit. My name is Harlan Johnson. I am the Chief Technical Officer of the Formula Electric team at the Missouri University of Science & Technology. This year we have switched over to using the Teensy 4.0/4.1 as our main microcontroller for different projects. We have found your ACAN_T4 libraries to be extremely helpful and useful in several ways. Obviously, we can use them for communication on car, but the main love I the libraries is the approachability for someone who is new to programming and electrical engineering, and is just learning how CAN works. The libraries handle a lot of functions we were writing from scratch when using TI architecture. Doing things at such a low level is very difficult to understand for a new member. This has been great for new members to more easily understand and implement the technology. Since we are using your libraries for almost all of our electronics projects, we would love to give you credit for this by putting a logo of your choice on the car next to our sponsors. The sponsors have contributed money to the team, but we consider your libraries to have equal value to the team. Please let me know if you are interested, or just to give permission for us to put your name and library name on the car. You can contact me at the following email and please check out our website at the URL below:
Email: [email protected]
Website: https://formulaelectric.mst.edu/
Thank you!
Hello I have used you CAN1CAN2CAN3FD example. I wounder how you will set the parameters to 500/500 kbit/sec and samplepoint abbrivation 80% and Data samplepoint 60%.
// Arbitration segments 80%
settingsFD.mArbitrationPropagationSegment = 23;
settingsFD.mArbitrationPhaseSegment1 = 8;
settingsFD.mArbitrationPhaseSegment2 = 8;
settingsFD.mArbitrationRJW = 4;
// Data segments 80%, Works
settingsFD.mDataPropagationSegment = 23; //Tobbe
settingsFD.mDataPhaseSegment1 = 8; //Tobbe
settingsFD.mDataPhaseSegment2 = 8; //Tobbe
settingsFD.mDataRJW = 2; //Tobbe
// Data segments 60%, dont work
// settingsFD.mDataPropagationSegment = 13; //Tobbe
// settingsFD.mDataPhaseSegment1 = 10; //Tobbe
// settingsFD.mDataPhaseSegment2 = 16; //Tobbe
// settingsFD.mDataRJW = 2; //Tobbe
Best regards
Torbjörn Styrenius
[email protected]
+46703739887
Hi,
I am trying to send can bus messages with my Teensy 4.0 using an MCP2515 canbus module. How should the module be connected to the Teensy board and what code should I use?
Thanks in advance!
Nicolas de Tracy
Hi Pierre!
I saw that you don't have a function in the FlexCAN_T4 library to clear the canbus RX buffer and needed one.
A way I like to do it is like this:
void clearRxBuffer(){
while (canbus.read(rxmsg)){}
}
Maybe more people will appreciate this new function!
Kind Regards,
Nicolas de Tracy
Has anyone gotten the CANFD receive filters to work? I've been using this great library for awhile now and the only way I can process incoming CANFD frames is to use an "accept-all" filter. For example, I have tried setting a filter for ID 0xD5 and 0xD6, along with an accept-all filter. When I receive the frames, all of the accepted data uses index 2, indicating that the accept-all filter is catching the incoming frames. I also receive data for 0xD4, 0xD5 and 0xD6. I was trying to filter out 0xD4.
I have read and studied the information provided on page 55 of the manual regarding the issues with CANFD filters. Does anyone know if this issue still exists? I'm not 100% sure I understand what it means in the manual "So we should use the legacy legacy way, filtering is done per receive Message Buffer."
Here is code I use to create the receive filters:
ACAN_T4FD_Settings settings(1000000, DataBitRateFactor::x1);
const ACANFDFilter FDFilters[] = {
ACANFDFilter(kData, kStandard, 0xD5, procRECVFDMsg),
ACANFDFilter(kData, kStandard, 0xD6, procRECVFDMsg),
ACANFDFilter(kData, kStandard, procRECVFDMsg)
};
const uint8_t numFilters = 3;
errorCode = ACAN_T4::can3.beginFD(settings, FDFilters, numFilters);
Any help would be greatly appreciated.
Hi,
I hope you can help me with an issue concerning including the ACAN_T4 library in PlatformIO.
Long story short, I am working on a project with two boards, a Teensy 3.6 and 4.0. I am therefore using both your ACAN.h library and your ACAN_T4.h library. My issue is that PIO doesn't seem to find the ACAN_T4. I've worked in a while with the 3.6 board and ACAN.h with no problems at all, but with ACAN_T4, I am asked to update my include path, even though I have the library in my library dependencies.
I've tried to make a seperate project with only the 4.0 environment in my .ini file, and only including the pierremolinaro/ACAN_T4 @ ^1.1.1 in my library dependencies, but PIO fails to recognize it.
I'm aware this might be a long shot, but none the less, I was wondering if you know a way to fix this issue?
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.