Infineon / XMC-for-Arduino

Integration of Infineon's XMC microcontrollers into the Arduino IDE.
Other
106 stars 67 forks source link

XMC CAN Sending & Unity starting point #271

Closed LinjingZhang closed 5 months ago

LinjingZhang commented 6 months ago

By creating this pull request you agree to the terms in CONTRIBUTING.md. https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md --- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

CONTRIBUTING.md also tells you what to expect in the PR process.

Description Enable all CAN basic function s

Related Issue n/a

Context https://jirard.intra.infineon.com/browse/DESMAKERS-3775 (CAN API) https://jirard.intra.infineon.com/browse/DESMAKERS-3821 (Unity Test) - Sorry again I will try to separate the PR next time... 🐱

The XMC CAN module works a bit different: It will not receive all data frames and then filter them. Instead, it only accept data frame with defined ID/ ID Mask. Spent two days reading the user manual and experimenting, no success

⚠️ Therefore the extra setDeviceId() function is added and I could not implement the filtering feature.

LinjingZhang commented 6 months ago

Example program

make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM20 CANReceiver flash monitor

make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM20 CANReceiverCallback flash monitor

make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM24 CANSender flash monitor

only example flash is enable, unit test in development

LinjingZhang commented 6 months ago

Getting there! 👍

Unity should not be part of the code sources... but specific configuration files for this project. The rest should be able to be pulled-in with some external dependency management system providing the required unity version.

Hi Juan, I totally agree. I will research on the dependency management, it will also solve the xmclib version/ patch problem (or at least have a clean configuration to track). possible solution: gitsubmodule/ conan(?)

Can we merge this first for store the status? Its in feature branch anyway.

jaenrig-ifx commented 5 months ago

Getting there! 👍 Unity should not be part of the code sources... but specific configuration files for this project. The rest should be able to be pulled-in with some external dependency management system providing the required unity version.

Hi Juan, I totally agree. I will research on the dependency management, it will also solve the xmclib version/ patch problem (or at least have a clean configuration to track). possible solution: gitsubmodule/ conan(?)

Can we merge this first for store the status? Its in feature branch anyway.

Sure, you can do that in a new branch :)