-
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
Problem with SPI Communication #16
Comments
Hello,
Maybe it's a memory overflow: an Arduino has little memory. Try to reduce the size of the transmit and receive buffers:
settings.mDriverTransmitFIFOSize = 0 ; // Should be >= 0
settings.mDriverReceiveFIFOSize = 1 ; //Should be > 0
Otherwise, post your code. Do you try to run one of the sample codes ?
Best Regards,
Pierre
… Le 4 juil. 2020 à 09:11, Ludo ***@***.*** ***@***.***>> a écrit :
Dear all
I'm trying to set up a board using Microchip's MCP2518 controller (MCP2518FD CLICK Board <https://www.mikroe.com/mcp2518fd-click>) together with an Arduino Uno, but I can't get SPI communication working.
The example in ACAN2517FD\examples\LoopBackDemoArduinoUno\LoopBackDemoArduinoUno.ino seems to not be able to setup the SPI correctly.
Here a diagram of the SPI CLK (CH1) and SPI MOSI (CH2) using the example:
<https://user-images.githubusercontent.com/8124111/86506954-8462b800-bdd4-11ea-9ad3-b0623d5dbda2.gif>
As check I try the Arduino Barometric Pressure Sensor SPI example and here the SPI seems to be OK:
<https://user-images.githubusercontent.com/8124111/86506955-84fb4e80-bdd4-11ea-8fd8-f28eeb9ba6e0.gif>
Any suggestion how to proceed to find the root cause? Thanks in advance!
Ludwig
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#16>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVAOQDSSSDXU6PFWQOTRZ3IY5ANCNFSM4OQIYNWQ>.
|
And you use an MCP2518FD CLICK Board with an Arduino Uno : do you select +5V for VIO ?
Pierre
… Le 4 juil. 2020 à 09:11, Ludo ***@***.***> a écrit :
Dear all
I'm trying to set up a board using Microchip's MCP2518 controller (MCP2518FD CLICK Board <https://www.mikroe.com/mcp2518fd-click>) together with an Arduino Uno, but I can't get SPI communication working.
The example in ACAN2517FD\examples\LoopBackDemoArduinoUno\LoopBackDemoArduinoUno.ino seems to not be able to setup the SPI correctly.
Here a diagram of the SPI CLK (CH1) and SPI MOSI (CH2) using the example:
<https://user-images.githubusercontent.com/8124111/86506954-8462b800-bdd4-11ea-9ad3-b0623d5dbda2.gif>
As check I try the Arduino Barometric Pressure Sensor SPI example and here the SPI seems to be OK:
<https://user-images.githubusercontent.com/8124111/86506955-84fb4e80-bdd4-11ea-8fd8-f28eeb9ba6e0.gif>
Any suggestion how to proceed to find the root cause? Thanks in advance!
Ludwig
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#16>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVAOQDSSSDXU6PFWQOTRZ3IY5ANCNFSM4OQIYNWQ>.
|
Thank you very much, I will add this wiring scheme to the library documentation.
Best Regards,
Pierre
… Le 23 oct. 2020 à 15:12, soso49 ***@***.***> a écrit :
Hello, I've had a hard time setting the SPI com with my arduino UNO and a MCP2518FD click board. I haven't seen a clear wiring scheme yet so I'm sharing mine.
<https://user-images.githubusercontent.com/73294829/97007471-bfcef100-1541-11eb-95e2-882647477e00.png>
Make sure to remove the jumper on the 3.3V section and solder it on the 5V section.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#16 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVHPGU7VS2T2IL52PS3SMF6MLANCNFSM4OQIYNWQ>.
|
Hello, I have the same problem and can't find the solution. Jumpers: 51 MOSI --> 6 SDI The error is always 1 = kRequestedConfigurationModeTimeOut. It looks, that SPI from Arduino Mega doesn't work. I tried settings.mDriverTransmitFIFOSize = 0 --> no effect. I don't have any single idea... Could you help me? |
One thing: is it normal that the voltage between CANL and CANH is 0V if nothing is connected? |
Okay. now I'm one step further with a oscilloskop. |
Hello,
I have checked your connections, I think it is ok.
Did you change the the clock setting ? ACAN2517FDSettings::OSC_40MHz for a 40 MHz clock ?
Pierre
… Le 22 mars 2022 à 14:00, dost0011 ***@***.***> a écrit :
Hello, I have the same problem and can't find the solution.
Arduino Mega 2560 Rev. 3 --> MCP2517FD click
I have downloaded your lib and tried the example "LoopBackDemoArduinoUnoNoInt".
I connected the CS to PIN 53 (and changed the code). I have used a Pullup 10kOhm.
Jumpers:
VIO 5V
STBY ON
40 MHz
STBY SEL STBY
51 MOSI --> 6 SDI
50 MISO --> 5 SD0
52 SCK --> 4 SCK
53 CS --> 3 CS
I checked the connections 1000 times.
The error is always 1 = kRequestedConfigurationModeTimeOut.
It looks, that SPI from Arduino Mega doesn't work. I tried settings.mDriverTransmitFIFOSize = 0 --> no effect.
I don't have any single idea... Could you help me?
Many thanks...
—
Reply to this email directly, view it on GitHub <#16 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVDDIFNV3CD7LKHM22TVBG76VANCNFSM4OQIYNWQ>.
You are receiving this because you commented.
|
I agree, CANH = CANL = 2.5V when the bus is IDLE.
Note the easy way for enabling the ATA6563 transceiver is to connect pins 1 and 2 of strap STBY.
Pierre
… Le 22 mars 2022 à 16:30, dost0011 ***@***.***> a écrit :
Okay. now I'm one step further with a oscilloskop.
CANL and CANH are 2.5V --> that's why the difference is 0v
CLK, MOSI, CS are working. SDO is 0V the whole time.
Does anybody know, how to wake up the SDO from the MCP2517FD?
—
Reply to this email directly, view it on GitHub <#16 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVGFXXQIY4NWSVOQ22DVBHRSJANCNFSM4OQIYNWQ>.
You are receiving this because you commented.
|
Dear all
I'm trying to set up a board using Microchip's MCP2518 controller (MCP2518FD CLICK Board) together with an Arduino Uno, but I can't get SPI communication working.
The example in ACAN2517FD\examples\LoopBackDemoArduinoUno\LoopBackDemoArduinoUno.ino seems to not be able to setup the SPI correctly.
Here a diagram of the SPI CLK (CH1) and SPI MOSI (CH2) using the example:
As check I try the Arduino Barometric Pressure Sensor SPI example and here the SPI seems to be OK:
Any suggestion how to proceed to find the root cause? Thanks in advance!
Ludwig
The text was updated successfully, but these errors were encountered: