Abstract:
The invention is a method of managing data in a portable electronic device comprising first and second controllers. The first controller comprises a first microprocessor and a first non volatile memory. The first microprocessor comprises a first piece of code. The second controller comprises a second microprocessor and a second non volatile memory. The second non volatile memory comprises a first executable data. The method comprises the following steps of: a) loading and activating the first piece of code in the first microprocessor, b) sending by the first controller a first request for retrieving the first executable data from the second non volatile memory, c) loading the first executable data into the first controller, and d) executing the first executable data by the first microprocessor.

Description:
FIELD OF THE INVENTION 
       [0001]    The present invention relates to methods of managing data in a portable electronic device comprising a plurality of controllers. It relates particularly to methods of managing data in a portable electronic device comprising at least a controller with an embedded non volatile memory. 
       PRIOR ART 
       [0002]    Portable electronic devices may comprise several controllers. In particular, portable electronic devices may have two controllers providing specific features. Such devices are based on a dual architecture. For example, a portable electronic device may comprise a smart card controller and a second controller compliant with SD (also named Secure Digital®), MMC (also named Multi Media Card®), or USB (also named Universal Serial Bus®) standards. Such a dual architecture could be met in portable devices providing radio frequency communication features like NFC, Bluetooth, Zigbee or any other contactless channels. 
         [0003]    Very often, at least one controller of a dual architecture comprises a ROM which has a limited size. The software code dedicated to such a controller is partly stored in its ROM and partly stored in an external non volatile memory. In this case, the non volatile memory component is distinct from the controller. The non volatile memory may be of EEPROM, flash NOR or Flash NAND type. In this case the non volatile memory is dedicated to the controller and is managed by the controller. When the controller is powered on the boot sequence is started. The code part stored in the ROM is directly accessible by the controller then the complementary part is loaded from the non volatile memory to the RAM of the controller. Thus, in a dual architecture, two controllers and two external non volatile memories are required. The price of a non volatile memory component is not negligible for a dual architecture device. A problem is to optimize the cost of a portable electronic device having a plurality of controllers. 
       SUMMARY OF THE INVENTION 
       [0004]    An object of the invention is to solve the above mentioned technical problems. The invention provides a solution for allowing the portable electronic device to work without any external non volatile memory component. 
         [0005]    The object of the present invention is a portable electronic device comprising first and second controllers. The first controller comprises a first microprocessor, a first non volatile memory and a first interface. The second controller comprises a second microprocessor, a second non volatile memory and a second interface. The first and second interfaces are linked. The second non volatile memory comprises a first executable data intended to be run by the first microprocessor. The first controller comprises a first means which is capable of loading the first executable data from the second non volatile memory to the first controller. The first controller comprises a second means which is capable of starting execution of the first executable data by the first microprocessor. 
         [0006]    In a preferred embodiment the first non volatile memory is a read-only memory. 
         [0007]    Advantageously, the first controller may comprise a third means capable of requesting a write operation of second data in the second non volatile memory. 
         [0008]    The second non volatile memory may comprise a third data and the first controller may comprise fourth means capable of retrieving the third data from the second non volatile memory to the first controller. 
         [0009]    Advantageously, the second microprocessor may run an application which is intended to access the first controller through first and second interfaces. 
         [0010]    In a preferred embodiment the second controller is a smart card controller. 
         [0011]    Advantageously, the second interface may be capable of communicating according to ISO-7816 standard or SWP protocol. 
         [0012]    The first controller may comprise a third interface able to communicate through a contact channel. The third interface may be able to communicate through SD, MMC or USB protocol. 
         [0013]    Alternatively, the first controller may comprise a third interface able to communicate through a contactless channel, a vocal channel or a visual channel. 
         [0014]    In another embodiment the first and second interfaces may be linked via an interface chip. 
         [0015]    Another object of the invention is a method of managing data in a portable electronic device. The portable electronic device comprises first and second controllers. The first controller comprises a first microprocessor and a first non volatile memory. The first microprocessor comprises a first piece of code. The second controller comprises a second microprocessor and a second non volatile memory. The second non volatile memory comprises a first executable data. The method comprises the following steps: 
         [0016]    a) loading and activating the first piece of code in the first microprocessor, 
         [0017]    b) sending by the first controller a first request for retrieving the first executable data from the second non volatile memory, 
         [0018]    c) loading the first executable data into the first controller, and 
         [0019]    d) executing the first executable data by the first microprocessor. 
         [0020]    Advantageously, the method may comprise the further step of sending by the first controller a second request for writing a second data in the second non volatile memory. 
         [0021]    The method may also comprise the further steps: 
         [0022]    f) sending by the first controller a third request for retrieving a third data from the second non volatile memory, 
         [0023]    g) loading the third data into the first controller. 
         [0024]    The first, second and third requests of the method may be exchanged through an interface chip. 
         [0025]    Advantageously, the method may be carried out with a second controller of smart card type and with a second interface that may communicates according to ISO-7816 standard or SWP protocol. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0026]    Other characteristics and advantages of the present invention will emerge more clearly from a reading of the following description of a number of preferred embodiments of the invention with reference to the corresponding accompanying drawings in which: 
           [0027]      FIG. 1  depicts schematically an example of a first embodiment of a portable electronic device according to the invention; 
           [0028]      FIG. 2  depicts schematically an example of a second embodiment of a portable electronic device according to the invention; 
           [0029]      FIG. 3  is a flow chart showing a boot sequence of a controller in a portable electronic device; and 
           [0030]      FIG. 4  is a flow chart showing how data may be managed by a controller into the memory of another controller. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0031]    The present invention is well-suited for portable electronic devices having a controller with limited memory resources. In particular, the invention is useful when one of the controllers has no writable memory and only a small ROM. 
         [0032]    An advantage of the invention is to avoid requiring an external non volatile memory component dedicated to one of the controllers of the portable electronic device. 
         [0033]    According to the invention, a first controller provides access to its own embedded non volatile memory to another controller into a portable electronic device. 
         [0034]    The invention may apply to any types of portable electronic device comprising at least two controllers. In particular, the invention may apply to portable electronic devices comprising a smart card controller and another controller. 
         [0035]    An advantage of the invention is to provide a method for extending the memory available for a controller in a multi-controller architecture device. The extended memory may be used for storing executable code required for the booting step of a controller. 
         [0036]    Advantageously, the extended memory may be used for storing any kind of data managed by the controller with limited memory resources. 
         [0037]    Advantageously, the invention may allow a secured storage of data managed by the controller that uses memory of another controller. 
         [0038]      FIG. 1  shows an example of portable electronic device comprising two controllers. 
         [0039]    The portable electronic device PED comprises a first controller C 1  and a second controller C 2 . The first controller C 1  comprises a working memory WM 1 , a non volatile memory MEM 1 , a microprocessor MP 1  and two communication interfaces INT 1  and INT 3 . The communication interface INT 1  is linked to the second controller C 2 . The communication interface INT 3  is designed for communication of SD type. The working memory WM 1  is of RAM type and the non volatile memory MEM 1  is of ROM type. 
         [0040]    The second controller C 2  comprises a working memory WM 2 , a non volatile memory MEM 2 , a microprocessor MP 2  and one communication interface INT 2 . The communication interface INT 2  is linked to the communication interface INT 1  of the first second controller C 1 . The second controller C 2  is of smart card type and the communication interface INT 2  is designed for communication according to ISO-7816 standard. The working memory WM 2  is of RAM type and the non volatile memory MEM 2  is of EEPROM type. 
         [0041]    Alternatively, the non volatile memory MEM 2  may be a Flash NAND or Flash NOR for example. 
         [0042]    The non volatile memory MEM 2  comprises a first executable data D 1  which is intended to be run by the first microprocessor MP 1 . The executable data D 1  is a part of the booting software code required for starting the microprocessor MP 1  up. 
         [0043]    The non volatile memory MEM 1  of the first controller C 1  comprises four means M 1  to M 4  which are implemented by four pieces of software. The first means M 1  is a piece of software code able to load the executable data D 1  into the first controller C 1 . The second means M 2  is a piece of software code able to start execution of the loaded executable data D 1  by the microprocessor MP 1 . 
         [0044]    Thus the boot operation of the microprocessor MP 1  may be carried out through the successive use of a first booting part stored in the non volatile memory MEM 1  and an additional booting part stored in the non volatile memory MEM 2 . In other words, the first means M 1  has a function of bootstrap toward the memory of another controller and via an ISO-7816 link. 
         [0045]    Alternatively, the link may be implemented through the SWP protocol. The SWP protocol is defined in ETSI, in particular in the ETSI TS 102 613 v7.1.0 (2008-02). 
         [0046]    The third means M 3  is a piece of software code able to request a write operation of data D 2  in the non volatile memory MEM 2  of the second controller C 2 . 
         [0047]    The fourth means M 4  is a piece of software code able to retrieve a data D 3  stored in the second non volatile memory MEM 2 . 
         [0048]    Thanks to third and fourth means M 3  and M 4 , the controller C 1  is capable of managing read and write data in the non volatile memory MEM 2  of the second controller C 2 . Thus the non volatile memory MEM 2  of the smart card controller C 2  can be managed as an extension of the available non volatile memory of the controller C 1 . The communication interface INT 1  of the controller C 1  is designed for exchanging data according to the ISO-7816 standard. 
         [0049]    Advantageously, the controller C 1  may comprise a security data D 5  which is used for establishing a secured communication channel with the smart card C 2 . 
         [0050]    Alternatively, the four means M 1  to M 4  may be implemented by one or a plurality of pieces of software. 
         [0051]    Advantageously, the controller C 2  comprises an application AP 1  which is intended to be run by the microprocessor MP 2 . Said application AP 1  may be intended to access the controller C 1  through the two interfaces INT 1  and INT 2 . In this case, data exchanges generated by the application AP 1  and data exchanges generated by the means M 1 , M 3  and M 4  may be mixed on the communication interfaces INT 1  and INT 2 . 
         [0052]      FIG. 2  shows a second example of portable electronic device comprising two controllers. In this second embodiment, an interface chip IC is placed between the two controllers C 1  and C 2 . The interface chip IC comprises two communication interfaces  14  en  15 . The communication interface  14  is designed for communication according to ISO-7816 standard and the communication interface  15  is designed for communicating with interface I 1 . In this case, both communication interfaces INT 1  and I 5  may be compliant with UART (Universal Asynchronous Receiver Transmitter) bus, SPI (Serial Peripheral Interface) bus or I2C (Inter Integrated Circuit) bus. In the example of  FIG. 2 , the interface chip IC provides ISO-7816 reader capability to the controller C 1 . 
         [0053]      FIG. 3  shows an example of step sequence for booting the microprocessor MP 1  of the controller C 1 . The sequence starts at step S 0  when the portable electronic device PED is powered. Then the piece of software M 1  is loaded and activated into the microprocessor MP 1  at step S 1 . The piece of software M 1  may perform a first set of initialization operations. At step S 2 , the means M 1  generates a request R 1  which is sent to the controller C 2 . The request R 1  aims at retrieving executable data D 1  from the non volatile memory MEM 2  of the controller C 2 . The request R 1  may correspond to a set of several APDU commands intended to be sent to the smart card C 2 . Then the controller C 2  sends the requested data D 1  to the controller C 1 . At step S 3 , the controller C 1  loads data D 1  in the working memory WM 1 . Then the data D 1  is run by the microprocessor MP 1  in order to complete the boot sequence at step S 4 . 
         [0054]    In the above-described example, the communication interface INT 1  is able to send and receive data to/from the controller C 2  as a smart card reader. 
         [0055]      FIG. 4  shows an example of step sequences where the controller C 1  uses the non volatile memory of the controller C 2 . The sequence starts at step S 10  where a full booting of the controller C 1  is assumed to be performed. The booting of C 1  may be carried out according to the sequence described at  FIG. 3 . The microprocessor MP 1  sends a request R 2  to the controller C 2  at step S 11 . The request R 2  aims at writing a data D 2  to the non volatile memory MEM 2  of the controller C 2 . The request R 2  may correspond to a set of several APDU commands intended to be sent to the smart card C 2 . The writing operation may correspond to the writing of a new data D 2  or to the overwriting of a previously existing value of data D 2 . Then at step S 12 , the microprocessor MP 1  sends a request R 3  to the controller C 2 . The request R 3  aims at retrieving a data D 3  from the non volatile memory MEM 2 . The request R 3  may correspond to a set of several APDU commands intended to be sent to the smart card C 2 . Then the controller C 2  sends the requested data D 3  to the controller C 1 . At step S 13 , the data D 3  is loaded into the controller C 1  and used by the microprocessor MP 1 . 
         [0056]    Thanks to the present invention, the microprocessor MP 1  is able to write and read any kinds of data in the memory MEM 2  of the second controller C 2 . In particular, the microprocessor MP 1  is able to build and manage a file system in the memory MEM 2 . 
         [0057]    Advantageously, all exchanges between the two controllers C 1  and C 2  may be protected by a secure mechanism. Such secure mechanisms are well known of a person skilled in the art of smart card.