CROSS REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2006-320196 filed on Nov. 28, 2006 the entire contents of which are incorporated herein by reference. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The present invention relates to an apparatus and a method for mobile communication by using a non-volatile memory device, and in particular for avoiding a conflict occurring in the non-volatile memory device. 
         [0004]    2. Description of the Related Art 
         [0005]    Fragmentation is a phenomenon that leads to inefficiency in many forms of data storage of computers and other electronic devices. A NAND-type flash memory device to be used for secondary storage, e.g., may be fragmented while continuously being used. In such a case, the NAND-type flash memory device may not have contiguous free storage of a significant size, but may have free regions of storage of varying sizes at intervals. 
         [0006]    Assume, e.g., that a mobile communication apparatus capable of receiving television (TV) broadcast records a received TV program to a built-in NAND-type flash memory device. If the TV program data of high speed and large size are written to the NAND-type flash memory device which has been fragmented, some of the data may be unexpectedly lost due to a processing load being too heavy for the mobile communication apparatus as a processing system. 
         [0007]    Thus, the NAND-type flash memory device needs defragmentation or garbage collection so as to solve the fragmentation. A defragmentation or garbage collection process may need a certain amount of time to be performed, though. 
         [0008]    A communication apparatus (a mobile phone) configured to perform garbage collection without sacrificing operability is disclosed in Japanese Patent Publications of Unexamined Applications (Kokai), No. 2005-20540. More specifically, as disclosed in paragraphs 0013 and 0017 of JP 2005-20540, the mobile phone may perform garbage collection so as to reclaim unused regions of storage, to arrange the regions of storage in order and to form contiguous free storage while data files stored in a flash memory device are not being accessed. 
         [0009]    The mobile phone of JP 2005-20540 performs garbage collection while no data files stored in the flash memory device are accessed and a user of the mobile phone is unaware of the garbage collection being performed, by taking advantage of characteristics of the mobile phone such as: 
         [0000]    (1) while making a voice call;
 
(2) while processing a voice call arrival;
 
(3) during a voice call;
 
(4) while a folder is being closed in a case where the mobile phone is of a folder type,
 
(5) during a power-off process after power is turned off;
 
(6) during a power-on process after power is turned on;
 
(7) at a time, collectively, set by the user according to the user&#39;s way of use; or
 
(8) at a free time automatically determined based on data of sending and receiving voice calls and e-mails, e.g., stored for a last week.
 
         [0010]    By performing the garbage collection as described above, the mobile phone of JP 2005-20540 may immediately write data to the free storage of the flash memory device upon receiving a new e-mail. 
         [0011]    The mobile phone of JP 2005-20540 has been devised so that a period of time in which a data file stored in the flash memory device is accessed and a period of time in which the garbage collection is performed do not conflict with each other. In a mobile communication apparatus such as a mobile phone, however, an interrupt may occur at a timing that the user does not expect such as, e.g., writing data of an e-mail to the flash memory device after the e-mail is received, reading a ring tone from the flash memory device to play back the ring tone after an e-mail or a voice call arrives, or writing message data left on a built-in answering machine function to the flash memory device after a voice call arrives. 
         [0012]    One of the above interrupts, if occurring while the mobile phone is performing the garbage collection, conflicts with the garbage collection on the flash memory device. In such a case, there is a problem that the mobile phone more or less loses operability, as it is necessary to forbid one of the interrupt and the garbage collection. 
       SUMMARY OF THE INVENTION 
       [0013]    Accordingly, an object of the present invention is to provide a mobile communication apparatus configured to ordinarily access storage while performing garbage collection without causing a problem. 
         [0014]    To achieve the above object, according to one aspect of the present invention, a mobile communication apparatus configured to communicate with an opposite communication apparatus is provided. The mobile communication apparatus includes a transceiver configured to receive an incoming signal sent from the opposite communication apparatus. The transceiver is configured to produce an interrupt signal upon receiving the incoming signal. The mobile communication apparatus includes a first memory device and a non-volatile second memory device. The mobile communication apparatus includes a controller connected to the transceiver, the first memory device and the second memory device. The controller is configured to perform garbage collection of the second memory device, to load data stored in one of the first memory device and the second memory device into another of the first memory device and the second memory device, to access the first memory device if the transceiver produces the interrupt signal. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0015]      FIG. 1  is a block diagram of a main portion of a mobile communication apparatus of an embodiment of the present invention. 
           [0016]      FIG. 2  is an operational flow chart of a controller included in the mobile communication apparatus of the embodiment. 
           [0017]      FIG. 3  is an operational flow chart for interrupt processing of the controller included in the mobile communication apparatus of the embodiment. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0018]    An embodiment of the present invention will be described with reference to  FIGS. 1-3 .  FIG. 1  is a block diagram of a main portion of a mobile communication apparatus  100  of the embodiment. The mobile communication apparatus  100  has a controller  1 , an antenna  2 , a radio interface  3 , a transceiver  4 , a speaker  5 , a microphone  6 , an audio interface  7 , a display  8 , user controls  9 , a random access memory device (RAM)  10 , a NAND-type flash memory device  11  (shortened as NAND  11 ) and so on. 
         [0019]    The controller  1  totally controls the mobile communication apparatus  100 . The antenna  2  sends and receives radio waves to and from a base station (not shown) of a mobile communication network. The radio interface  3  provides the transceiver  4  with an incoming radio frequency (RF) signal received by the antenna  2 , and provides the antenna  2  with an outgoing RF signal provided by the transceiver  4  so that the outgoing RF signal is emitted from the antenna  2 . 
         [0020]    The transceiver  4  amplifies, down-converts and demodulates the incoming RF signal provided by the radio interface  3 , provides the audio interface  7  with a resultantly produced digital voice signal, and provides the controller  1  with a resultantly produced control signal. The transceiver  4  provides the controller  1  with an interrupt signal upon receiving a voice call arrival or an e-mail arrival. 
         [0021]    The transceiver  4  modulates, up-converts and amplifies a digital voice signal provided by the audio interface  7  and a control signal provided by the controller  1 , and provides the radio interface  3  with the outgoing RF signal thereby. 
         [0022]    The speaker  5  may be used for producing voice of an incoming voice call and so on. The microphone  6  may be used for picking up voice of an outgoing voice call and so on. 
         [0023]    The audio interface  7  converts the digital voice signal provided by the transceiver  4  into an analog voice signal, then amplifies and provides the speaker  5  with the analog voice signal for producing incoming voice. The audio interface  7  amplifies an analog voice signal provided by the microphone  6 , converts the analog voice signal into a digital voice signal which will be provided to the transceiver  4 . 
         [0024]    The display  8  may be used for displaying various kinds of information, and is formed by, e.g., a liquid crystal display (LCD) device. The user controls  9  may be used for various kinds of key operation inputs. 
         [0025]    The RAM  10  is a primary storage device for running programs. The NAND  11  is a secondary storage device formed by a non-volatile NAND-type flash memory device. The NAND  11  may be used for storing data of e-mails, ring tones, messages left on a built-in answering machine function of the mobile communication apparatus  100 , and so on. 
         [0026]      FIG. 2  is an operational flow chart of the controller  1  of the embodiment of the present invention. The controller  1  loads data of a ring tone into the RAM  10  before a timing of a forthcoming call arrival, e.g., just after the power is turned on (step S 2 ). The controller  1  starts garbage collection at any timing (step S 3 ). 
         [0027]    While performing the garbage collection, the controller  1  checks how many blocks are in a free region of storage of the NAND  11  (step S 4 ). The controller  1  determines if no less than n blocks are secured in the free region, where n is an integer and may be determined, e.g., according to a size of TV program data to be recorded so that the TV program data may be continuously recorded in the free region. 
         [0028]    If no less than n blocks are secured at the step S 4  (“YES” of step S 5 ), the controller  1  does not perform garbage collection of the NAND  11 . If less than n blocks are secured at the step S 4 , the controller  1  performs garbage collection of the NAND  11  so as to form a contiguous free region of storage (step S 6 ). As the above process of the garbage collection at the step S 6  requires a certain amount of time, the controller  1  checks if the garbage collection is finished (step S 7 ) and ends the flow (step S 8 ). 
         [0029]    A flow of processing an interrupt which occurs at a timing during the steps S 2 -S 8  described above and unexpected by a user of the mobile communication apparatus  100  will be described with reference to a next drawing.  FIG. 3  is an operational flow chart for interrupt processing of the controller  1 . An interrupt may be triggered by an e-mail or a voice call which arrives at a timing unexpected by the user, and may possibly conflict with the garbage collection being performed at the step S 6  shown in  FIG. 2 . 
         [0030]    If an interrupt occurs, triggered by an e-mail arrival or a voice call arrival, the controller  1  starts interrupt processing (step S 10 ). In any case where an e-mail or a voice call has arrived, the controller  1  reads the data of the ring tone which has been loaded into the RAM  10  at the step S 2  shown in  FIG. 2  in order to ring, provides the audio interface  7  with the data of the ring tone and plays back the ring tone from the speaker  5  (step S 11 ). 
         [0031]    Although the step S 11  may conflict with the step S 6  shown in  FIG. 2  where the garbage collection of the NAND  11  is being performed, not the NAND  11  but the RAM  10  is accessed at the step S 11 . Thus, the garbage collection of the NAND  11  at the step S 6  and ordinary access to the storage devices of the mobile communication apparatus  100  may be performed without competition. 
         [0032]    Then, the controller  1  checks by which kind of arrivals the interrupt has been triggered, an e-mail or a voice call (step S 12 ). If a voice call has arrived and a message left on the built-in answering machine function is to be recorded, arrived voice data of the message are written into the RAM  10  (step S 13 ). 
         [0033]    Although the step S 13  may conflict with the step S 6  shown in  FIG. 2  where the garbage collection of the NAND  11  is being performed, not the NAND  11  but the RAM  10  is accessed at the step S 13 . Thus, the garbage collection of the NAND  11  at the step S 6  and ordinary access to the storage devices of the mobile communication apparatus  100  may be performed without competition. 
         [0034]    Then, the controller  1  checks if the garbage collection (at the step S 6  shown in  FIG. 2 ) has been finished, or if the garbage collection is not being performed (step S 14 ). If the garbage collection has been finished, or if the garbage collection is not being performed, the controller  1  stores the arrived voice data written into the RAM  10  at the step S 13  to the NAND  11  (step S 15 ), and ends the flow. 
         [0035]    If an e-mail has arrived, arrived e-mail data are written into the RAM  10  (step S 16 ). Although the step S 16  may conflict with the step S 6  shown in  FIG. 2  where the garbage collection of the NAND  11  is performed, not the NAND  11  but the RAM  10  is accessed at the step S 16 . Thus, the garbage collection of the NAND  11  at the step S 6  and ordinary access to the storage devices of the mobile communication apparatus  100  may be performed without competition. 
         [0036]    Then, the controller  1  checks if the garbage collection (at the step S 6  shown in  FIG. 2 ) has been finished, or if the garbage collection is not being performed (step S 17 ). If the garbage collection has been finished, or if the garbage collection is not being performed, the controller  1  stores the arrived e-mail data written into the RAM  10  at the step S 16  to the NAND  11  (step S 18 ), and ends the flow. 
         [0037]    According to the embodiment of the present invention described above, the NAND  11  may be accessed without competition even if the garbage collection of the NAND  11  and the interrupt processing triggered by a voice call arrival or an e-mail arrival occurring at a timing unexpected by the user conflict with each other. Thus, there is no need to forbid one of the garbage collection of the NAND  11  and the interrupt processing, and operability of the mobile communication apparatus  100  may be improved thereby. 
         [0038]    The interrupt may not be limited to voice call or e-mail arrivals but may be another process occurring at a timing unexpected by the user. The mobile communication apparatus  100  may be a mobile phone, a personal handy phone (PHS), a personal digital assistant (PDA), or another portable device having no radio functions. 
         [0039]    Another way to avoid competition between garbage collection and interrupt processing may be that the mobile communication apparatus  100  refuses receiving an e-mail while performing the garbage collection, as the e-mail may be retrieved later from a server of a network. In a case of a voice call arrival, the mobile communication apparatus  100  may forbid recording messages left on the built-in answering machine function while performing the garbage collection. 
         [0040]    The particular hardware or software implementation of the pre-sent invention may be varied while still remaining within the scope of the present invention. It is therefore to be understood that within the scope of the appended claims and their equivalents, the invention may be practiced otherwise than as specifically described herein.
A mobile communication apparatus configured to communicate with an opposite communication device is provided. The mobile communication apparatus includes a transceiver configured to receive an incoming signal sent from the opposite communication device. The transceiver is configured to produce an interrupt signal upon receiving the incoming signal. The mobile communication apparatus includes a first memory device and a non-volatile second memory device. The mobile communication apparatus includes a controller connected to the transceiver, the first memory device and the second memory device. The controller is configured to perform garbage collection of the second memory device, to load data stored in one of the first memory device and the second memory device into another of the first memory device and the second memory device, to access the first memory device if the transceiver produces the interrupt signal.