-
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
ESP32-S3 + MCP2518FD #43
Comments
Hello,
I'm afraid I can't help you, the MCP2518 is a temperamental component, and many users have reported difficulties with initialization. Error 0x10000 means that the MCP2518 does not go into configuration mode.
You get different behaviour depending on whether the MCP2518 is connected to the bus or not. Is the electrical ground the same?
Pierre
… Le 23 nov. 2023 à 10:59, jblazeg ***@***.***> a écrit :
Hi,
I use a custom board and I get "Configuration error 0x10000" - which means timeout initialising the SPI device.
<https://user-images.githubusercontent.com/42333542/285160172-a6bce59a-c0ff-4853-9154-4ee26746178a.png>
But when I disconnect the other can bus device (works - verified) it initializes correctly, but still doesnt send any data (CAN TX line is permanently high, also no CAN receive):
<https://user-images.githubusercontent.com/42333542/285167009-ef16a7c7-74c3-4c5c-aed9-2a895701916e.png>
Anything else I should capture or add files? CAN Select has a 10K pullup resistor. I use a 40MHz resonator with 22pF capacitors
extract from the code:
SPIClass SPI2(HSPI);
const uint8_t SOFT_SCK_PIN = 19;
const uint8_t SOFT_MISO_PIN = 20;
const uint8_t SOFT_MOSI_PIN = 21;
#define SELECT 17
ACAN2517FD can2(SELECT, SPI2, 255)
setup() {
SPI2.begin(SOFT_SCK_PIN,SOFT_MISO_PIN,SOFT_MOSI_PIN);
SPI2.setFrequency(5000000);
ACAN2517FDSettings settings (ACAN2517FDSettings::OSC_40MHz_DIVIDED_BY_2, 125 * 1000, DataBitRateFactor::x4) ;
settings.mRequestedMode = ACAN2517FDSettings::NormalFD;
const uint32_t errorCode = can2.begin (settings, NULL) ;
}
Cheers
—
Reply to this email directly, view it on GitHub <#43>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVDC4LF66GZ7EGPGVCTYF4M75AVCNFSM6AAAAAA7XP2LZOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYDOOBVGIYDAMA>.
You are receiving this because you are subscribed to this thread.
|
Yes, the behaviour is different. With can bus traffic, the chip does not initialise. But it does not receive/send anything even if it initialises correctly. Common ground is generally not needed for can bus (differential pair) but I tried with common ground and without - the problem is the same. |
Could you provide working code example? |
I was stuck at frame structure. But already found it. |
I am still having trouble with the MCP2518FD Pro board. |
I have a problem with reading and transmitting. It wont start receiving. And the weirdest part is that if I disconnect 5v and then reconnect it somehow starts working. Do I have something wrong in my setup? |
I tried espressif 3.0.0-rc1 version and it works perfectly, but with version 2.x it simply does not start transmitting/receiving. Configuration works but no data comes in and unable to send frames. |
I dont know why but calling canfd.poll() after begin() it starts working correctly |
Hi,
I use a custom board and I get "Configuration error 0x10000" - which means timeout initialising the SPI device.
But when I disconnect the other can bus device (works - verified) it initializes correctly, but still doesnt send any data (CAN TX line is permanently high, also no CAN receive):
Anything else I should capture or add files? CAN Select has a 10K pullup resistor. I use a 40MHz resonator with 22pF capacitors. Tansceiver is a TCAN332.
extract from the code:
Cheers
The text was updated successfully, but these errors were encountered: