Comments (2)
I read MarlinFirmware/Marlin#25774 and used some clues with TEMP_SENSOR_FORCE_HW_SPI
to get SPI MAX31865 on motor driver to work correctly when EXP2 (LCD SD SPI) is connected to the EXP2 on the board.
SOFTWARE_SPI for both temp sensors must be commented out. If it is not disabled, the SPI connection for MAX31865 fails when the SD card is used. As soon as the card is inserted into the LCD SD slot and the SD is read from, the MAX31865 SPI fails with a temp error even though it worked fine before any SD was inserted. I have 2 2 wire PT1000s connected to both the onboard MAX31865 and stepper driver MAX31865. The temp error is first thrown on the onboard MAX31865 so I assume that SPI to both MAX31865 is failing. The onboard MAX31865 used to work fine with the LCD SD SPI in the past so there is an issue where the onboard MAX31865 works with SOFTWARE_SPI and fails with HW_SPI while the stepper driver SPI works with HW_SPI and fails with SOFTWARE_SPI.
It's not clear why there are separate defines for SOFTWARE_SPI
and TEMP_SENSOR_FORCE_HW_SPI
when it comes to temp sensors. Since they can be enabled and disabled independent of each other, it is not self explanatory whether soft or hard SPI take precedence for temp sensor without viewing the code.
@bigtreetech Hopefully the below config helps with the immediate SPI issue but I don't know why software spi does not work for stepper driver SPI and EXP2 (LCD SD) SPI at the same time.
#if TEMP_SENSOR_0 == -5
#define TEMP_0_CS_PIN PF8 // Max31865 CS
#define TEMP_0_SCK_PIN PA5
#define TEMP_0_MISO_PIN PA6
#define TEMP_0_MOSI_PIN PA7
//#define SOFTWARE_SPI // Max31865 and LCD SD share a set of SPIs, Set SD to softwareSPI for Max31865
#define FORCE_SOFT_SPI
#else
#define TEMP_0_PIN PF4 // TH0
#endif
//Define E3 or TEMP_SENSOR_1 on MOTOR 7
#if TEMP_SENSOR_1 == -5
#define TEMP_1_CS_PIN PD3 // Max31865 CS MOTOR 7
#define TEMP_1_SCK_PIN PA5
#define TEMP_1_MISO_PIN PA6
#define TEMP_1_MOSI_PIN PA7
//#define SOFTWARE_SPI // Max31865 and LCD SD share a set of SPIs, Set SD to softwareSPI for Max31865
#define FORCE_SOFT_SPI
/*
#ifndef MAX31865_CS_PIN
#define MAX31865_MISO_PIN PA6
#define MAX31865_SCK_PIN PA5
#define MAX31865_MOSI_PIN PA7
#define MAX6675_SS_PIN PD3
//#define MAX31865_CS_PIN PD3
#endif
*/
#else
#define TEMP_1_PIN PF5 // TH1
//Define E3 if MOTOR 7 not used for TEMP_SENSOR_1 MAX module
#define E3_STEP_PIN PE6 // MOTOR 7
#define E3_DIR_PIN PA14
#define E3_ENABLE_PIN PE0
#ifndef E3_CS_PIN
#define E3_CS_PIN PD3
#endif
#endif
/**
* Thermocouple Options — for MAX6675 (-2), MAX31855 (-3), and MAX31865 (-5).
*/
#define TEMP_SENSOR_FORCE_HW_SPI // Ignore SCK/MOSI/MISO pins; use CS and the default SPI bus.
#define MAX31865_SENSOR_WIRES_0 2 // (2-4) Number of wires for the probe connected to a MAX31865 board.
#define MAX31865_SENSOR_WIRES_1 2
//#define MAX31865_SENSOR_WIRES_2 2
from bigtreetech-octopus-pro.
Update: The printer fails to read temp via SPI from both the onboard and stepper module MAX31865 when SD card is inserted into the LCD SD reader that uses SPI. This happens randomly so it's basically not possible to use the LCD SD slot right now.
from bigtreetech-octopus-pro.
Related Issues (20)
- USB wifi adapter HOT 1
- TMC5160proV1.1 & octopus Pro V1.0 F429 (Marlin SPI) 48V -> no communikation, what to do? HOT 2
- Octopus Pro 1.1 (STM32H723) and TMC5160 Pro V1.1 Cannot Communicate HOT 2
- Wrong Motor in Pinout Changes Table in Readme
- F420 V1.0 hotend themperatur sensor via max31856
- Can Bus Connector type does not match BigTreeTech Manual
- Marlin Octopus Pro v1.1 (H723ZE) no definition HOT 7
- Octopus Pro H729 DIAG pins HOT 4
- Canbus connection on USB-C port to U2C module, how to do that?
- BTT Tmc 5160 1.2 and octopus pro giving error "TMC 'stepper_y1' reports error: GSTAT: 00000004 uv_cp=1(Undervoltage!") HOT 2
- Octopus Pro & MicroProbe V2.0 HOT 14
- Errant string in USB descriptor breaks dfu-util
- HE0 (PA0) and HE2 (PB0) does not work HOT 2
- Cant use MAX31865/PT1000 while using EXP1 and/or EXP2
- OCTOPUS PRO V1.1 (H723) HOT 1
- New firmware development
- Bootloader issue with 446 HOT 4
- Octopus pro 723 HOT 1
- PA0 is not the driver 3 EN pin! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bigtreetech-octopus-pro.