refactor: serialize CH390 runtime SPI access

Move runtime CH390 transactions behind a single ch390_runtime owner so main, lwIP glue, and EXTI no longer compete for SPI access. Keep the system stable under runtime load and capture the remaining CH390 readback failure as a credible low-level device-response issue in the handoff logs.
This commit is contained in:
2026-04-01 03:39:08 +08:00
parent e5fffaccdf
commit 14a532290d
11 changed files with 892 additions and 255 deletions
+3 -2
View File
@@ -23,6 +23,7 @@
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "ethernetif.h"
#include "ch390_runtime.h"
#include "SEGGER_RTT.h"
#include "uart_trans.h"
#include "config.h"
@@ -345,8 +346,8 @@ void EXTI0_IRQHandler(void)
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_0);
/* Defer CH390 processing to main loop */
ethernetif_set_irq_pending();
}
ch390_runtime_set_irq_pending();
}
}
/**