Multi-Core MCU Flash Driver Scheduling to Prevent Duplicate Access
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Low-performance multi-core MCUs face issues with duplicate access to flash memory, leading to potential memory job failures and unexpected program terminations due to the lack of separate hardware devices for flash memory access.
Innovation Solution
A flash driver control method is implemented in the MCU, where tasks are designed to execute main functions and terminate only when the flash driver is idle, preventing repeated access and ensuring that memory jobs are completed without interference.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multiple tasks are executed concurrently on host core and HSM core in low-performance multi-core MCU, then processing capability is improved, but duplicate access to flash driver occurs causing memory job failures
Solution Approach 1:
The patent introduces a flash driver status register as an intermediary mechanism that mediates access between multiple tasks and the flash driver. The status register contains bits indicating whether the flash driver is busy or idle, serving as a communication medium that coordinates access without requiring separate hardware flash devices for each core.
Solution Approach 2:
The patent implements a feedback mechanism where tasks continuously monitor the flash driver status register to determine whether the flash driver is idle or busy. This feedback loop allows tasks to adjust their access timing, waiting when the driver is busy and proceeding when idle, thereby preventing duplicate access conflicts while maintaining concurrent execution capability.
2Reliability
If separate hardware devices for flash memory access are provided for each core, then duplicate access problem is prevented, but device complexity and cost increase
Solution Approach 1:
The patent makes the single flash driver serve multiple functions by enabling it to handle memory jobs from both the host core and HSM core through software coordination. The flash driver is designed to be universally accessible with a shared status register that manages requests from multiple sources, eliminating the need for separate dedicated hardware devices for each core.
Solution Approach 2:
The patent merges the flash access functionality for both cores into a single shared flash driver resource. Instead of providing separate flash drivers for host core and HSM core, the system combines access control into one unified driver with a shared status register, reducing hardware complexity while maintaining reliable access control through software-based coordination.
3Speed
If tasks are terminated without checking flash driver idle status, then execution speed is improved, but unexpected program termination occurs due to duplicate access
Solution Approach 1:
The patent applies preliminary action by having tasks check the flash driver status register before initiating a memory job. This advance checking allows tasks to determine in advance whether the flash driver is idle and ready for access, or if they need to wait. This prevents duplicate access conflicts before they occur, ensuring program stability while maintaining efficient execution by avoiding unnecessary waiting when the driver is already idle.
Data Source
AI summary
A flash driver control method performed in an MCU including a flash memory and a flash driver configured to perform a memory job on the flash memory includes executing a first task that executes a first main function for performing a first memory job and is terminated when the flash driver is idle, executing a second task that executes a second main function for performing a second memory job and is terminated when the flash driver is idle, and executing a third task that executes a third main function for requesting execution of a third memory job and is terminated when a third memory job completion response is received.


