Non-contact eMMC UART card opening method, system and electronic device

CN122593794APending Publication Date: 2026-08-18合肥康芯威存储技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610724351.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-25
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

首先,整体操作步骤较为繁琐,接线环境复杂,不仅增加了现场操作难度,而且降低了开发调试效率

Benefits of technology

所述code block写入模块用于根据解析结果写入code block,以完成eMMC开卡。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122593794A_ABST
    Figure CN122593794A_ABST
Patent Text Reader

Abstract

The application discloses an eMMC contactless UART card opening method and system and electronic equipment, and the method comprises the following steps: setting an execution switching flag in the ROM starting code of a target processing platform, and presetting the storage addresses corresponding to the ROM starting code, the card opening code and the card opening configuration file; restoring the ROM starting code, the card opening code and the card opening configuration file to the corresponding addresses through a debugging interface; resetting the target processing platform, and modifying the execution switching flag through the debugging interface, so that the target processing platform jumps to execute the card opening code; starting the UART input interrupt during the execution of the card opening code, and receiving the card opening file through the UART serial port after receiving a preset starting character. The application does not need to rely on a card opening fixture and special card opening software, can reduce wiring, reduce the risk of static damage, simplify the card opening process, and support custom file transmission and parallel card opening of multiple devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of eMMC card activation technology, specifically to a contactless UART card activation method, system, and electronic device for eMMC. Background Technology

[0002] eMMC is an embedded memory device that integrates flash memory and a controller within the same package. Due to its advantages such as high integration, moderate capacity, low cost, and high degree of interface standardization, it has been widely used in various consumer electronics products, industrial control equipment, and embedded development platforms. During FPGA development, firmware debugging, and product verification, it is often necessary to first perform initialization processes on the eMMC, such as card activation, parameter configuration, boot data writing, or loading of related files, to ensure that subsequent firmware can correctly recognize, access, and use the eMMC. Therefore, how to efficiently and stably complete eMMC card activation during the development phase has always been a key issue of concern in related technical fields.

[0003] In existing technologies, the initial card activation process for eMMC typically requires a dedicated card activation fixture and accompanying activation software. Specifically, developers usually need to connect the target FPGA platform, activation tool, host computer, and related interfaces via multiple cables, and then use specific software to write a pre-formatted activation file to the target device to complete the activation operation. While this method can achieve basic functionality, it still has several shortcomings in practical applications. First, the overall operation steps are cumbersome, and the wiring environment is complex, increasing the difficulty of on-site operation and reducing development and debugging efficiency. Second, the activation process often requires frequent contact with the FPGA development board or related devices, which can introduce the risk of electrostatic discharge (ESD), increasing the possibility of ESD damage to the FPGA devices and affecting development safety and equipment reliability.

[0004] Furthermore, existing card activation methods typically rely on fixed-format activation files and dedicated activation software, resulting in a limited and inflexible file transfer mechanism. On the firmware side, it's often difficult to easily obtain and process arbitrary custom files, significantly restricting the activation process and related data processing methods, and failing to meet the needs of different development stages for transferring and processing various file types. Simultaneously, traditional methods primarily operate on a single device at a time, which is not conducive to simultaneously activating multiple target devices on the same PC, making it difficult to adapt to batch debugging and parallel development scenarios, further hindering overall development efficiency. Summary of the Invention

[0005] To address the aforementioned issues, this invention provides an eMMC contactless UART card activation method, system, and electronic device, which effectively overcomes the shortcomings of existing technologies.

[0006] This invention is achieved through the following technical solution: a contactless UART card activation method for eMMC, applied to the process of a target processing platform activating an eMMC card, the method comprising: An execution switching flag is set in the ROM boot code of the target processing platform, and the first execution address corresponding to the ROM boot code, the second execution address corresponding to the card opening code, and the configuration storage address corresponding to the card opening configuration file are preset. The ROM boot code is restored to the first execution address via the debugging interface, the card activation code is restored to the second execution address, and the card activation configuration file is restored to the configuration storage address. The target processing platform is reset, causing it to execute the ROM boot code. The execution switching flag is modified through the debugging interface to cause the target processing platform to jump from the first execution address to the second execution address to execute the card opening code. During the execution of the card opening code, the UART input interrupt is enabled, and the card opening file is received via the UART serial port after receiving the preset start character; The received card activation file is parsed, and the parsing result is written into a code block to complete the eMMC card activation.

[0007] As a preferred technical solution, the target processing platform is the target platform in the FPGA development stage, the debugging interface is the JTAG interface of the FPGA, and the debugging interface is connected to an external ICE debugging device to perform file recovery and flag modification operations through the ICE debugging device.

[0008] As a preferred technical solution, the execution switching flag is a global variable set in the ROM boot code; when the execution switching flag is modified to a preset enable value, the target processing platform switches from executing the ROM boot code to jumping to the second execution address to execute the card opening code.

[0009] As a preferred technical solution, the first execution address is 0x0, the second execution address is 0x8000, and the configuration storage address is the DMU address; after the card activation configuration file is restored to the DMU address, it is copied by the firmware to the specified location required for card activation.

[0010] As a preferred technical solution, after the target processing platform executes the card opening code, it further includes configuring card opening pre-parameters and causing the UART input interrupt to enter a waiting reception state, so as to start the card opening file reception process after receiving the preset start character.

[0011] As a preferred technical solution, the preset start character is the character 'x'; before receiving the character 'x', the target processing platform remains in a waiting state; after receiving the character 'x', the serial port transmission process of the card opening file is started.

[0012] As a preferred technical solution, the process of receiving the card opening file via the UART serial port adopts a file transfer protocol, which is any one of the XMODEM, YMODEM, or ZMODEM protocols; the card opening file is a custom file, so that the firmware can obtain and parse any file according to usage requirements.

[0013] As a preferred technical solution, the process of receiving the card opening file via the UART serial port is triggered by a serial port tool script. The serial port tool script first sends the preset start character and then sends the card opening file. Multiple serial port windows can be opened on the same PC to simultaneously perform card opening file transmission and card opening operations on multiple target processing platforms.

[0014] The present invention provides an eMMC contactless UART card opening system, comprising a target processing platform, a debugging device, and a serial terminal; The target processing platform includes a ROM boot execution module, an execution switching module, a UART interrupt receiving module, a file parsing module, and a code block writing module; The debugging device is connected to the debugging interface of the target processing platform and is used to restore the ROM boot code to the first execution address, restore the card opening code to the second execution address, restore the card opening configuration file to the configuration storage address, and modify the execution switching flag. The serial terminal is connected to the UART serial port of the target processing platform for sending preset start characters and sending card opening files; The ROM boot execution module is used to execute ROM boot code after the target processing platform is reset; The execution switching module is used to cause the target processing platform to jump to the second execution address to execute the card opening code when the execution switching flag meets the switching conditions; The UART interrupt receiving module is used to enable UART input interrupt during the execution of the card opening code, and to receive the card opening file after receiving the preset start character; The file parsing module is used to parse the card opening file; The code block writing module is used to write code blocks according to the parsing results in order to complete the eMMC card activation.

[0015] An electronic device according to the present invention includes a memory and a processor, wherein the memory stores a computer program.

[0016] The beneficial effects of this invention are: by pre-restoring the ROM code, card opening code, and card opening configuration file in the target platform, and combining the execution switching flag control program to jump from the ROM boot process to the card opening execution process, the eMMC card opening operation can be completed without the need for a dedicated card opening fixture and card opening software, which significantly simplifies the traditional card opening process and reduces the difficulty of on-site deployment and debugging.

[0017] This invention enables contactless card opening through the cooperation of ICE and UART, reducing unnecessary manual wiring and frequent contact during the FPGA development stage. This helps to reduce the risk of FPGA device damage caused by static electricity and improves the safety and reliability of the development and debugging process.

[0018] This invention utilizes a UART serial port to complete startup triggering and card opening file transmission. The transmission method is simple, the implementation cost is low, and it does not rely on a fixed-format dedicated card opening tool file. It can transmit custom files according to actual usage needs, thereby improving the flexibility of firmware side to obtain and process files and broadening the scope of application of this solution.

[0019] This invention also supports opening multiple serial port windows on the same PC to perform card opening operations on multiple target devices simultaneously, thereby improving work efficiency in batch debugging and parallel development scenarios.

[0020] Furthermore, while completing the card activation, this invention can also hand over the transmitted file to the FPGA for parsing and processing, and write code blocks according to the file content to realize card activation. Therefore, it is not only applicable to eMMC initialization processing in the FPGA development stage, but can also be extended to file transmission and firmware processing scenarios in subsequent product stages, and has good versatility and promotional value. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a diagram showing the overall architecture of the eMMC contactless UART card opening system of the present invention.

[0023] Figure 2 This is a block diagram of the internal functional modules of the FPGA platform of the present invention.

[0024] Figure 3This is a flowchart of the eMMC contactless UART card opening method of the present invention. Detailed Implementation

[0025] All features disclosed in this specification, or all steps in all disclosed methods or processes, may be combined in any way, except for mutually exclusive features and / or steps.

[0026] Any feature disclosed in this specification (including any appended claims, abstract, and drawings) may be replaced by other equivalent or similar features for a similar purpose, unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is merely one example of a series of equivalent or similar features.

[0027] like Figures 1-3 As shown, this invention provides a contactless UART card opening method for eMMC. This method is mainly applied to the initial card opening, parameter initialization, and related file import processing of eMMC by a target processing platform. The target processing platform is preferably an FPGA platform in the development and debugging stage, but it is not limited to this; it can also be other programmable processing platforms or chip platforms with corresponding startup control capabilities, serial communication capabilities, and storage control capabilities. The target processing platform is connected to an eMMC storage device and is also configured with a debugging interface and a UART serial port interface. The debugging interface preferably uses a JTAG interface and is connected to an external ICE debugging device to directly restore program code and configuration files to a predetermined address within the target processing platform without using traditional card opening fixtures and dedicated card opening software, and to further modify execution control flags, thereby realizing a contactless card opening process. The UART serial port interface is connected to a PC host or other serial terminal to send trigger characters and transmit card opening files during the card opening process, allowing the target processing platform to autonomously complete file reception, file parsing, and card writing operations throughout the entire card opening process.

[0028] Specifically, in this embodiment, the boot system of the target processing platform includes a ROM boot code area, a card activation code area, and a configuration parameter storage area. The ROM boot code area stores the embedded ROM code or the boot program corresponding to the ROM boot logic, preferably configured at the first execution address. The card activation code area stores the card activation code specifically for performing card activation processing, preferably configured at the second execution address. The configuration parameter storage area stores the configuration file, parameter file, or control file required for card activation, preferably configured at the configuration storage address. For ease of description, in a preferred embodiment, the first execution address can be set to 0x0, the second execution address can be set to 0x8000, and the configuration storage address can be set to the DMU address, such as the DMU-related storage area corresponding to 0x20113000. Of course, in this invention, the above addresses are not the only limitation; any other address layout that can achieve ROM boot, execution jump, parameter reading, and card activation processing can be considered an equivalent implementation of this invention.

[0029] To enable conditional switching from the regular boot process to the card activation process, an execution switching flag is set in the ROM boot code. This execution switching flag is preferably a global variable, such as a global control variable like `g08UartMp flag`. This variable is disabled after the system is powered on or reset by default, in which case the target processing platform executes according to the regular ROM boot path. When the execution switching flag is modified to a preset enabled value through the debugging interface, the target processing platform, after reaching the predetermined judgment position, jumps from the ROM boot process corresponding to the first execution address to the card activation code process corresponding to the second execution address, thus entering the UART card activation mode. By setting this execution switching flag, this invention does not require changing the original basic boot logic of the target processing platform; it only requires rewriting the variable through an external debugging device to flexibly switch between the normal boot path and the dedicated card activation path. This not only simplifies the implementation but also facilitates debugging and verification during the development phase.

[0030] In this embodiment, the debugging interface is preferably the JTAG interface on the FPGA platform, and the ICE debugging device establishes a communication connection with the target processing platform through the JTAG interface. During the specific card opening preparation stage, the ICE debugging device first performs a file recovery operation, that is, by using debugging commands to restore the ROM boot code to the first execution address, the card opening code to the second execution address, and the card opening configuration file to the configuration storage address. Here, "recovery" can be understood as downloading, burning, loading, or writing the corresponding binary file, program image file, or configuration parameter file to the specified address space of the target processing platform. For example, ROM.bin can be restored to address 0x0, LlfCode.bin to address 0x8000, and BurnerFW.bin to the DMU-related address area. After the configuration file is restored to the DMU address, it can be copied by the subsequently running firmware program to the actual working address required for card opening, or directly read and used by the card opening code. In this way, after the target processing platform enters the card opening code execution state, it can perform subsequent processing based on the pre-restored program and parameter environment.

[0031] After the aforementioned files are restored, a reset operation is performed on the target processing platform. This reset operation can be a hardware reset, a software reset, or a system reset triggered by a debugging device. After the reset, the target processing platform first executes the ROM boot code starting from the first execution address. In this invention, the ROM boot code may include basic hardware initialization logic, clock configuration logic, memory access initialization logic, and execution switching flag detection logic. When the ROM boot code reaches a preset judgment node, the execution switching flag is read and judged; if the execution switching flag is still at its default value, the original boot process continues; if the execution switching flag is modified to a preset enable value by the ICE debugging device, the ROM boot code no longer executes along the original path, but instead controls the program counter to jump to the second execution address to execute the card opening code. Preferably, before the execution jump, necessary preparatory work such as register state saving, stack initialization, serial port clock enabling, and target memory controller basic initialization can be further completed to ensure that the system operating environment is stable and controllable after switching from the ROM process to the card opening process.

[0032] In this embodiment, the card activation code serves as the core program for executing contactless eMMC UART card activation. After execution, it first completes the configuration of pre-activation parameters. These pre-activation parameters may include serial communication baud rate, data bits, stop bits, parity bits, interrupt enable status, receive buffer address, file receive timeout, protocol type parameters, target eMMC control interface parameters, logical address mapping of the code block to be written, configuration file read address, and relevant exception handling thresholds. Completing these pre-activation parameter configurations provides a clear operational foundation for subsequent UART interrupt reception, file protocol parsing, and eMMC card activation / writing processes. In a preferred embodiment, after parameter configuration, the card activation code enables UART input interrupts and puts the UART receive state machine into a waiting-to-receive mode. In this mode, the target processing platform continuously monitors the data received by the UART receive port while maintaining internal variables related to card activation in their initial state to avoid errors in the file transfer process due to mis-triggered events or noise interference.

[0033] To clearly trigger the card opening file transmission process, a preset start character is set in this embodiment. The preset start character is preferably the character "x", but it is not limited to this; it can also be other single-character or multi-character control strings or specific frame header data, as long as it can be recognized by the target processing platform and used as a transmission start marker. When the target processing platform is in the UART waiting state, if it has not yet received the preset start character, the system continues to listen and does not execute the file receiving process. When the UART interrupt receiving module detects the receipt of the preset start character "x", it determines that the external serial terminal has issued a start command, and then switches to file receiving mode to prepare to receive the subsequently sent card opening file. During this process, the event of receiving the start character can be reported by the interrupt service routine, or it can be implemented by a combination of polling and interrupts. Dejitter processing, duplicate character filtering mechanisms, or reception validity verification mechanisms can be set to further improve the accuracy and stability of triggering the start.

[0034] In this embodiment, the card opening file is transmitted via a UART serial port. The preferred file transmission method is a serial file transmission protocol with packet segmentation, verification, acknowledgment, and retransmission mechanisms. Preferably, the file transmission protocol is the XMODEM protocol, but it can also be replaced with the YMODEM, ZMODEM, or other suitable file protocols for serial data transmission. Taking the XMODEM protocol as an example, the serial port tool or script program on the PC host first sends the start character "x," then divides the card opening file into several data blocks according to the XMODEM protocol format, and sends them sequentially to the target processing platform via the UART serial port. After receiving each data block, the target processing platform can perform frame header identification, block sequence number identification, data area extraction, checksum verification, and acknowledgment feedback for each data block. If the verification passes, the data is written to the receive buffer and an acknowledgment signal is returned; if the verification fails, the corresponding data block is requested to be retransmitted, thereby ensuring the integrity and reliability of the file transmission process. For protocols such as YMODEM or ZMODEM, implementation can also follow their respective message frame structures, packet segmentation methods, and error recovery mechanisms; this invention does not limit this.

[0035] Furthermore, the card activation file in this embodiment is preferably a custom file, meaning it is not limited to the fixed format file required by traditional card activation software. The custom file may contain configuration parameters required for card activation, eMMC initialization control information, logical partition information, erase / write strategies, verification parameters, boot sector write parameters, user area data, extended data that the firmware needs to read and process, or other data related to the target processing task. Since the target processing platform itself performs file parsing in this invention, the file format can be defined and extended according to actual project requirements. For example, a protocol identifier, version number, file length, parameter area offset, data area offset, verification information, etc., can be set in the file header; various control parameters can be defined in the parameter area; and the data content or script control commands to be written to the code block can be set in the data area. After receiving the complete file, the target processing platform can extract the file header information, parameter information, and data content sequentially based on preset parsing rules to support more flexible card activation processing and richer data delivery requirements.

[0036] After the file is received, the target processing platform enters the file parsing stage. Specifically, the file parsing module first determines whether the received file is complete, which can be confirmed by comparing the received length, comparing the end marker, and calculating the overall checksum. If the file is confirmed to be complete, the file header, parameter segment, and data segment are further parsed. If the file is found to be incomplete, the checksum fails, the format is abnormal, or the content is illegal, the current card activation process is terminated, and error codes, error messages, or status indicators can be transmitted back via UART so that the host computer can resend the file or perform troubleshooting. During the parsing process, the file parsing module can extract parameters related to eMMC card activation from the file, such as card activation mode selection parameters, target area address, data block length, erasure strategy, write count, initialization timing parameters, and checksum parameters, and generate corresponding card activation control instructions or write them to the task queue based on these parameters. If necessary, the card activation configuration file restored to the DMU address can also be copied to the specified working memory area and combined with the received card activation file content for parsing to form the final complete parameter set used for card activation execution.

[0037] In this embodiment, "writing code blocks according to parsing results to complete eMMC card activation" can be understood as follows: the target processing platform performs initialization writing, configuration writing, boot information writing, or control information writing on one or more preset storage blocks, logic blocks, or code blocks in the eMMC based on the parameters and data content obtained from file parsing, thereby enabling the eMMC to complete its initial usable configuration. Specifically, the card activation code calls the eMMC control interface to perform status detection, mode switching, necessary initialization command sending, and data writing operations on the target eMMC. For example, communication initialization can be performed on the eMMC first to confirm that the device is in an accessible state; then, the location and content of the code block to be written are determined based on the parsing results; if necessary, an erase or blank check is performed first, followed by data writing, and a readback verification or status confirmation is performed after writing is completed; if the verification is successful, the code block is marked as successfully written; if the verification fails, a retry mechanism is executed or a write failure is reported. Through the above method, after the eMMC completes the data writing required for card activation, it can enter the subsequent normal usage state. The code block mentioned here can be a control code block for initialization, a storage block for parameter configuration, or a data block required for subsequent identification and execution by the firmware. This invention does not impose any absolute limitation on this.

[0038] To improve operational convenience during the development phase, in this embodiment, the process of receiving the card opening file via the UART serial port is preferably triggered by a serial port tool script. The serial port tool can be general-purpose serial port software that supports script control and file transfer protocols, such as a tool that automatically sends characters, automatically calls XMODEM transmission commands, and automatically opens a specified serial port. When the script runs, it first sends the start character "x" to the target processing platform, then automatically sends the card opening file according to the selected protocol, and monitors the response status, retransmission status, completion status, and exception status during transmission. Since this invention uses the UART serial port as the card opening file transmission channel, multiple serial port windows or multiple serial port session instances can be opened simultaneously on a single PC host, connecting to multiple target processing platforms respectively, thereby achieving parallel file transfer and parallel card opening operations for multiple devices. For each serial port connection, the start character sending, file transfer, protocol interaction, status display, and exception reporting can be executed independently; this not only improves batch debugging efficiency but also avoids the efficiency bottleneck caused by traditional reliance on a single card opening fixture for one-to-one operation.

[0039] Regarding its contactless nature, the main difference between this invention and traditional solutions lies in the following: During the entire card opening process, there is no need for complex wiring between the target processing platform and the dedicated card opening fixture, nor is it necessary to manually load fixed-format files through a dedicated card opening software interface. Instead, the ICE debugging device completes program and configuration recovery, the UART serial port handles startup triggering and file transfer, and the target processing platform's internal program autonomously performs file parsing and eMMC writing. Therefore, operators do not need to frequently contact the FPGA board and its surrounding sensitive devices during the development phase, significantly reducing the risk of electrostatic discharge (ESD) damage, decreasing the probability of wiring errors, simplifying the test environment setup, and improving overall card opening efficiency and flexibility. Furthermore, since the target processing platform can receive any custom file conforming to parsing rules, this invention can be used not only for eMMC card opening but also for firmware upgrade files, parameter configuration files, debug data files, or other file transfer scenarios requiring serial port input to the target processing platform for processing, demonstrating excellent scalability at the application level.

[0040] At the system implementation level, this invention can also construct a contactless UART card opening system using eMMC. The system includes a target processing platform, a debugging device, and a serial terminal. The target processing platform internally includes a ROM boot execution module, an execution switching module, a UART interrupt receiving module, a file parsing module, and a code block writing module. The ROM boot execution module reads and executes the ROM boot code located at the first execution address after the target processing platform is reset. The execution switching module determines whether to switch the execution path based on the current state of the execution switching flag and controls the program to jump from the first execution address to the second execution address when the switching conditions are met. The UART interrupt receiving module configures serial port parameters, enables UART input interrupts, and receives the boot character and card opening file from the serial terminal after the card opening code runs. The file parsing module performs protocol layer and business layer parsing on the received card opening file and forms the card opening control result. The code block writing module calls the eMMC control logic to write the parsed target data into the corresponding area of ​​the eMMC to complete the card opening operation. The debugging device is connected to the debugging interface of the target processing platform and is used to restore the ROM boot code, card opening code, and card opening configuration file to the corresponding addresses, and modify the execution switching flag when necessary. The serial terminal is connected to the UART serial port of the target processing platform and is used to send preset boot characters and subsequent card opening files. Through the coordinated work of the above modules, the contactless UART card opening process of this invention can be completed.

[0041] Furthermore, in the implementation of the electronic device, the present invention can also be embodied as an electronic device including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the various steps of the aforementioned eMMC contactless UART card opening method. The memory can be on-chip memory, external memory, flash memory, RAM, ROM, or a combination thereof, and the processor can be an FPGA internal soft-core processor, hard-core processor, microcontroller, digital signal processor, or other executable instruction logic control unit. When the computer program is executed, the processor can perform functions such as execution switching flag detection, address jump control, UART interrupt reception, file protocol parsing, card opening parameter processing, and eMMC write control. Therefore, the present invention can be embodied as a specific method scheme, or as a system scheme and electronic device scheme for implementing the method, thus forming a relatively complete protection layer.

[0042] In a specific application example, the FPGA platform is first connected to the ICE debugging device, and debugging communication is established through the JTAG interface. Then, the ICE debugging device sequentially restores ROM.bin to address 0x0, LlfCode.bin to address 0x8000, and BurnerFW.bin to the DMU address. After restoration, the FPGA platform is reset, causing it to start running from the ROM boot code. During the execution of the ROM boot code, the ICE debugging device modifies the global variable g08UartMp flag to 1, making the program meet the jump condition, thus jumping from address 0x0 to address 0x8000 to execute the card opening code. After the card opening code runs, the UART interface is initialized and the UART input interrupt is enabled. Simultaneously, the pre-parameters required for card opening are configured, and the system enters a state waiting to receive the character "x". The PC host runs a serial port tool script, first sending the character "x" as a start command, and then sending the card opening file based on the XMODEM protocol. After receiving the complete file, the FPGA platform performs protocol and content parsing, and sends the corresponding code to the eMMC according to the parsed content. After the block writes the card activation data, it performs necessary verification and status feedback, thus completing the eMMC card activation process. If abnormal situations such as verification errors, reception timeouts, device unresponsiveness, or target area writing failures occur during file transfer or writing, the system can also return the corresponding error status and allow resending the file or re-executing the card activation process to improve the repeatability and reliability of the entire solution.

[0043] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions conceived without inventive effort should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.

Claims

1. A contactless UART card activation method for eMMC, characterized in that, The method, applied to the process of opening an eMMC card on a target processing platform, includes: An execution switching flag is set in the ROM boot code of the target processing platform, and the first execution address corresponding to the ROM boot code, the second execution address corresponding to the card opening code, and the configuration storage address corresponding to the card opening configuration file are preset. The ROM boot code is restored to the first execution address via the debugging interface, the card activation code is restored to the second execution address, and the card activation configuration file is restored to the configuration storage address. The target processing platform is reset, causing it to execute the ROM boot code. The execution switching flag is modified through the debugging interface to cause the target processing platform to jump from the first execution address to the second execution address to execute the card opening code. During the execution of the card opening code, the UART input interrupt is enabled, and the card opening file is received via the UART serial port after receiving the preset start character; The received card activation file is parsed, and the parsing result is written into a code block to complete the eMMC card activation.

2. The eMMC contactless UART card opening method according to claim 1, characterized in that: The target processing platform is the target platform in the FPGA development stage, the debugging interface is the JTAG interface of the FPGA, and the debugging interface is connected to an external ICE debugging device to perform file recovery and flag modification operations through the ICE debugging device.

3. The eMMC contactless UART card opening method according to claim 1, characterized in that: The execution switching flag is a global variable set in the ROM boot code; when the execution switching flag is modified to a preset enable value, the target processing platform switches from executing the ROM boot code to jumping to the second execution address to execute the card opening code.

4. The eMMC contactless UART card opening method according to claim 1, characterized in that: The first execution address is 0x0, the second execution address is 0x8000, and the configuration storage address is the DMU address; after the card activation configuration file is restored to the DMU address, it is copied by the firmware to the specified location required for card activation.

5. The eMMC contactless UART card opening method according to claim 1, characterized in that: After the target processing platform executes the card opening code, it also includes configuring card opening pre-parameters and causing the UART input interrupt to enter a waiting reception state, so as to start the card opening file reception process after receiving the preset start character.

6. The eMMC contactless UART card opening method according to claim 1, characterized in that: The preset start character is the character 'x'; before receiving the character 'x', the target processing platform remains in a waiting state; after receiving the character 'x', the serial port transmission process of the card opening file is started.

7. The eMMC contactless UART card opening method according to claim 1, characterized in that: The process of receiving the card opening file via the UART serial port adopts a file transfer protocol, which can be any one of the XMODEM, YMODEM, or ZMODEM protocols; the card opening file is a custom file, so that the firmware can obtain and parse any file according to usage requirements.

8. The eMMC contactless UART card opening method according to claim 1, characterized in that: The process of receiving the card opening file via the UART serial port is triggered and executed by the serial port tool script. The serial port tool script first sends the preset start character and then sends the card opening file. Multiple serial port windows can be opened on the same PC to simultaneously perform card opening file transfer and card opening operations on multiple target processing platforms.

9. A contactless UART card activation system for eMMC, characterized in that, This includes a target processing platform, debugging equipment, and a serial terminal; The target processing platform includes a ROM boot execution module, an execution switching module, a UART interrupt receiving module, a file parsing module, and a code block writing module; The debugging device is connected to the debugging interface of the target processing platform and is used to restore the ROM boot code to the first execution address, restore the card opening code to the second execution address, restore the card opening configuration file to the configuration storage address, and modify the execution switching flag. The serial terminal is connected to the UART serial port of the target processing platform for sending preset start characters and sending card opening files; The ROM boot execution module is used to execute ROM boot code after the target processing platform is reset; The execution switching module is used to cause the target processing platform to jump to the second execution address to execute the card opening code when the execution switching flag meets the switching conditions; The UART interrupt receiving module is used to enable UART input interrupt during the execution of the card opening code, and to receive the card opening file after receiving the preset start character; The file parsing module is used to parse the card opening file; The code block writing module is used to write code blocks according to the parsing results in order to complete the eMMC card activation.

10. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the eMMC contactless UART card opening method according to any one of claims 1 to 8.