-
Notifications
You must be signed in to change notification settings - Fork 17
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
SPI connection with Arduino Nano 33 BLE #23
Comments
Hello!
I have no Arduino 33 nano BLE, so I can't reproduce the bug. But there is no reason why it shouldn't work.
From what I've seen on the Internet, the connection should be :
D11 - Mosi (SDO)
D12 - Miso (SDI)
D13 - SCK
CS connection : any pin
INT connection : any PIN
It is strange that Arduino IDE stops working as long as i don't disconnect the Arduino from the USB. What pins are you using for CS and INT ? Perhaps there is a conflict with an USB function ?
Pierre
… Le 15 juil. 2021 à 11:41, Marittia ***@***.***> a écrit :
Hello!
First of all, thanks a lot for the library.
I currently have a MCP2518FD-Click and i wanted to use it along with my Arduino 33 nano BLE.
I already tried the example LoopBackDemoArduinoUno with an Arduino Uno and everything works fine.
But when i switch to the Arduino Nano the code seems to stuck (Arduino IDE stops working as long as i don't disconnect the Arduino from the USB) when calling the function "writeRegister8" inside ACAN2517FD::begin.
Could it be something wrong with the SPI communication? I double checked the wiring and it seems to be correct (it's equal to the one on my Arduino Uno).
Also, i'm using the MCP2518 with jumper on VIO=3.3 (used a shifter with arduino UNO) and i'm connecting both 3.3V and 5V.
Thanks for your time!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#23>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVAZFJJ4AIYEQAQDKHDTX2UNXANCNFSM5ANFSVYQ>.
|
I'm using the same wiring you're describing. Tomorrow i will be able to test it a bit further and see what can cause the problem. For now, thank you very much! |
Hello! Still the InternalLoop mode doesn't work, and i saw that in NormalFD mode my can sniffer is able to read only the first packet, all the other ones cannot be sent. Do you happen to have any idea about what could be the problem? Also, i noted that with noInterrupts enabled it seems to stuck inside this portion of code here, right after writing and the reading back MCP2517FD RAM at address 0x400:
Thank you very much once again, |
Hello !
It is strange that noInterrupts() call causes code blocking. But the library requires disabling and enabling interrupts, so it's no wonder that by commenting noInterrupts() the library no longer works.
You can try your luck in the following ways (see LoopBackDemoTeensy3xNoInt demo sketch):
- do not use interrupt pin any more (ast argument of ACAN2517FD object instanciation is 255) ;
- call can.poll() as often as possible in loop function.
Best Regards,
Pierre
… Le 21 juil. 2021 à 09:17, Marittia ***@***.***> a écrit :
Hello!
Thanks for the help. So far i recognized the "IDE stuck while Arduino is connected" was due to the code blocking (maybe an infinite loop?) after a noInterrupts() call. So what i did was basically commenting all the "noInterrupts()" i found in the library code. The result is that now the Begin function seems to succeed (errorCode = 0).
Still the InternalLoop mode doesn't work, and i saw that in NormalFD mode my can sniffer is able to read only the first packet, all the other ones cannot be sent. Do you happen to have any idea about what could be the problem?
Thank you very much once again,
Mariano
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#23 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVEC4WZFNE4UDT4WNODTYZYCJANCNFSM5ANFSVYQ>.
|
Hi there, |
Hello!
First of all, thanks a lot for the library.
I currently have a MCP2518FD-Click and i wanted to use it along with my Arduino 33 nano BLE.
I already tried the example LoopBackDemoArduinoUno with an Arduino Uno and everything works fine.
But when i switch to the Arduino Nano the code seems to stuck (Arduino IDE stops working as long as i don't disconnect the Arduino from the USB) when calling the function "writeRegister8" inside ACAN2517FD::begin.
Could it be something wrong with the SPI communication? I double checked the wiring and it seems to be correct (it's equal to the one on my Arduino Uno).
Also, i'm using the MCP2518 with jumper on VIO=3.3 (used a shifter with arduino UNO) and i'm connecting both 3.3V and 5V.
Thanks for your time!
The text was updated successfully, but these errors were encountered: