# US 12,222,856 B2 · Memory controller and method for controlling output of debug messages

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,222,856 B2
- Document ID: US12222856B2
- Status: Granted
- Kind: B2
- Application number: 18/213,899
- Filed: 2023-06-26
- Published: 2024-01-25
- Granted: 2025-02-11
- Earliest claimed: 2022-07-25
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion, Inc.
- Inventors: Hong-Ren Fang; Hao-Hsuan Wang
- Web page: https://patentgrep.com/patent/US12222856B2

## CPC

- G06F 11/36: Prevention of errors by analysis, debugging or testing of software
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 13/1668: {Details of memory controller}
- G06F 13/24: using interrupt (G06F13/32 takes precedence)
- G06F 2212/7204: Capacity control, e.g. partitioning, end-of-life degradation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A memory controller coupled to a memory device for accessing the memory device and includes a Universal Asynchronous Receiver/Transmitter (UART) and a microprocessor. The microprocessor is coupled to the UART and configured to control access operations of the memory device. The microprocessor is configured to perform an interrupt service routine in response to an interrupt. When performing the interrupt service routine, the microprocessor is configured to determine whether a predetermined signal has been received by a specific pin and when determining that the predetermined signal has been received by the specific pin, the microprocessor is configured to output a debug message through a transmitting terminal of the UART.

## Claims

### Claim 1

A memory controller, coupled to a memory device for accessing the memory device, comprising:
a Universal Asynchronous Receiver/Transmitter (UART); and
a microprocessor, coupled to the UART and configured to control access operations of the memory device, wherein the microprocessor is configured to perform an interrupt service routine in response to an interrupt, and
when performing the interrupt service routine, the microprocessor is configured to determine whether a predetermined signal has been received by a specific pin of the memory controller and when determining that the predetermined signal has been received by the specific pin, the microprocessor is configured to output a debug message through a transmitting terminal of the UART,
wherein the microprocessor is configured to set or switch a triggering source of the interrupt in response to a predetermined command.

### Claim 2 (depends on 1)

The memory controller of claim 1, wherein the specific pin is a vendor specific function option pin and the predetermined signal is a ground voltage signal.

### Claim 3 (depends on 1)

The memory controller of claim 1, wherein the specific pin is a pin corresponding to a receiving terminal of the UART and the microprocessor determines whether the predetermined signal has been received by the specific pin by determining whether content of a message received at the receiving terminal of the UART conforms to a predetermined pattern.

### Claim 4 (depends on 3)

The memory controller of claim 3, wherein the interrupt is triggered in response to a reception of the message at the receiving terminal.

### Claim 5 (depends on 1)

The memory controller of claim 1, further comprising:
a timer, wherein the interrupt is triggered in response to an expiration of the timer.

### Claim 6 (depends on 1)

The memory controller of claim 1, wherein the debug message comprises information regarding at least one of a value registered by a register, a record of command history and content stored in a stack memory.

### Claim 7

A method for controlling output of debug messages, for a data storage device coupled to a host device, wherein the host device issues commands to the data storage device to access the data storage device, the method for controlling output of debug messages is performed by a memory controller of the data storage device when the host device determines that an error has occurred in the data storage device and comprises:
entering an interrupt service routine in response to an interrupt; and
performing the interrupt service routine,
wherein step of performing the interrupt service routine further comprises:
determining whether a predetermined signal has been received by a specific pin of the memory controller; and
outputting a debug message through a transmitting terminal of the UART of the memory controller when determining that the predetermined signal has been received by the specific pin, and
wherein the method for controlling output of debug messages further comprises:
setting or switching a triggering source of the interrupt in response to a predetermined command.

### Claim 8 (depends on 7)

The method of claim 7, wherein the specific pin is a vendor specific function option pin of the memory controller and the predetermined signal is a ground voltage signal.

### Claim 9 (depends on 7)

The method of claim 7, wherein the specific pin is a pin corresponding to a receiving terminal of the UART and whether the predetermined signal has been received by the specific pin is determined by determining whether content of a message received at the receiving terminal of the UART conforms to a predetermined pattern.

### Claim 10 (depends on 9)

The method of claim 9, wherein the interrupt is triggered in response to a reception of the message at the receiving terminal.

### Claim 11 (depends on 7)

The method of claim 7, wherein the interrupt is triggered in response to an expiration of a timer of the memory controller.

### Claim 12 (depends on 7)

The method of claim 7, wherein the debug message comprises information regarding at least one of a value registered by a register of the memory controller, a record of command history of the memory controller and content stored in a stack memory of the memory controller.
