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

Change SPI pins #27

Open
acedogblast opened this issue Apr 16, 2024 · 2 comments
Open

Change SPI pins #27

acedogblast opened this issue Apr 16, 2024 · 2 comments

Comments

@acedogblast
Copy link

Hello I have a custom rp2040 based board using MCP251863. I was able to build Micro-python along with the added CAN related code from this repo (except the MIN_PROTOCOL support due to a build error). I have not been able to find out where the GP# pins are defined to interface with the MCP251863. On my board it uses GP pins 8 through 11 which is part of the second SPI bus of the rp2040. Where can I set the SPI pins?
Thank you.

@kentindell
Copy link
Owner

The CAN drivers are in another repository: https://github.com/kentindell/canis-can-sdk

The SPI pins are set in the header file: https://github.com/kentindell/canis-can-sdk/blob/main/mcp25xxfd/rp2/mcp25xxfd-rp2.h

You can modify this file to add extra board support. If you want, you can create some macro fu that when allows arbitrary board definition headers to be pulled in, then I will accept a pull request for this so that you don't need to maintain a fork of the repo.

@acedogblast
Copy link
Author

Thanks for the info. I am not very familiar with working with C Macros and change is very simple so I don't think I can submit such patch. Just wondering is the SPI_IRQ macro corresponds to ~INT (pin 19 of SSOP)? The MCP251863 also has ~INT0 and ~INT1 are they used in the driver?

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

No branches or pull requests

2 participants