用户工具

站点工具


knowledge:3d_print:2022102301

这是本文档旧的修订版!


External SPI flash XFLASH is not responding错误分析

打印机可能会开机时候在LCD显示屏上显示External SPI flash XFLASH is not responding错误。 该错误一个最直观的影响就是Blet test操作是无法显示数值的,一直显示0. 源码文件Marlin_main.cpp 1052行 1093行 1331行均是相关代码

static void xflash_err_msg()
{
	lcd_clear();
	lcd_puts_P(_n("External SPI flash\nXFLASH is not res-\nponding. Language\nswitch unavailable."));
}

// "Setup" function is called by the Arduino framework on startup.
// Before startup, the Timers-functions (PWM)/Analog RW and HardwareSerial provided by the Arduino-code 
// are initialized by the main() routine provided by the Arduino framework.
void setup()
{
	timer2_init(); // enables functional millis

	mmu_init();

	ultralcd_init();

	spi_init();

	lcd_splash();
    Sound_Init();                                // also guarantee "SET_OUTPUT(BEEPER)"

	selectedSerialPort = eeprom_read_byte((uint8_t *)EEPROM_SECOND_SERIAL_ACTIVE);
	if (selectedSerialPort == 0xFF) selectedSerialPort = 0;
	eeprom_update_byte((uint8_t *)EEPROM_SECOND_SERIAL_ACTIVE, selectedSerialPort);
	MYSERIAL.begin(BAUDRATE);
	fdev_setup_stream(uartout, uart_putchar, NULL, _FDEV_SETUP_WRITE); //setup uart out stream
	stdout = uartout;

#ifdef XFLASH
    bool xflash_success = xflash_init();
	uint8_t optiboot_status = 1;
	if (xflash_success)
	{
		optiboot_status = optiboot_xflash_enter();
#if (LANG_MODE != 0) //secondary language support
        update_sec_lang_from_external_flash();
#endif //(LANG_MODE != 0)
	}
	else
	{
	    xflash_err_msg();
	}
#else
	const bool xflash_success = true;
#endif //XFLASH

通过查看源码,发现该错误信息是Arduino的Setup函数初始化中显示的。

knowledge/3d_print/2022102301.1666526514.txt · 最后更改: 2023/06/07 04:09 (外部编辑)

Valid HTML5 Valid CSS Driven by DokuWiki