Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

canio: Add support for i.MX 10xx series of chips #9982

Merged
merged 12 commits into from
Jan 21, 2025

Conversation

SamantazFox
Copy link

@SamantazFox SamantazFox commented Jan 20, 2025

Closes #8151

First of all, I'd like to thank @qutefox for the initial work!

What I've done is:

  • adapt the code to newer CP versions (notably switching from STATIC to static)
  • fixing the byte ordering (due to i.MX chips endianness, byte order was [3,2,1,0,7,6,5,4])
  • fixing filtering and masking
  • fixing the reception of CAN frames (the "read" flag was never cleared, causing the code to read the same buffer indefinitely)
  • Add documentation

Notes

  1. The original author was working with Sparkfun's Teensy micromod, where I have a Teensky 4.1. I suppose that it's safe to enable canio for all i.MX-based boards, but didn't want to do so without proper testing. (Edit: not all boards, I discovered thanks to CI that 1010/1011/1015 don't have a CAN interface).

  2. The link https://mcuxpresso.nxp.com/en/select_config_tools_data is dead, so I was unable to download the required config tools data, and thus I wasn't able to check the generated periph.c.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you!

@tannewt tannewt merged commit 04d9c53 into adafruit:main Jan 21, 2025
401 checks passed
@SamantazFox SamantazFox deleted the teensy-can branch January 24, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mimxrt10xx: Implement canio (micromod)
2 participants