espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.71k stars 7.43k forks source link

3.1.0-RC2 and ACAN2517 library #10568

Open EarlVadim opened 2 weeks ago

EarlVadim commented 2 weeks ago

Board

ESP32-S3

Device Description

plain module

Hardware Configuration

define MCP2517_CS 10

define MCP2517_MOSI 11

define MCP2517_SCK 12

define MCP2517_MISO 13

Version

latest development Release Candidate (RC-X)

IDE Name

A-IDE 2.3.3

Operating System

Win11

Flash frequency

QIO 80MHz

PSRAM enabled

no

Upload speed

921600

Description

I have a project using an external CAN controller MCP2518. On the current version 3.0.7 everything compiles and works, but on the RC2 version the same project compiles, but when trying to initialize the CAN, the controller reboots abnormally.

Sketch

void CAN1_INIT() {  
   SPI.begin (MCP2517_SCK, MCP2517_MISO, MCP2517_MOSI) ;
   Serial.println("SPI started");
   ACAN2517Settings settings2517 (ACAN2517Settings::OSC_40MHz, 500 * 1000) ; 
   settings2517.mRequestedMode = ACAN2517Settings::ListenOnly ; 
   const uint32_t errorCode2517 = can.begin (settings2517, NULL) ;

Here ERROR without any messages and reboot

Debug Message

I don't have any logs. I deleted RC2 and reinstalling is quite complicated. I just want to let you know that you have seriously messed something up in the new version.

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

me-no-dev commented 2 weeks ago

I just want to let you know that you have seriously messed something up in the new version.

We do not provide Arduino abstraction for TWAI, so the issue must be in ESP-IDF v5.3

EarlVadim commented 2 weeks ago

I just want to let you know that you have seriously messed something up in the new version.

We do not provide Arduino abstraction for TWAI, so the issue must be in ESP-IDF v5.3

But, this NOT TWAI... It external CAN-controller via SPI.

me-no-dev commented 2 weeks ago

Sure. My bad. We still need some logs. SPI is so far working OK on our end