Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
MESC TOOL NEWS: MESCT-MR32R-990501D

MR32R Precaution

Please take note of the following problem in using real-time OS MR32R for the M32R family of microcomputers.


Problem in Using System Call "twai_flg"
  1. Versions Concerned
    The versions from MR32R V.2.00 Release 1 to MR32R V.3.00 Release 1

  2. Description
    When the twai_flg system call is used with the following three conditions satisfied, issuing a set_flg or iset_flg system call may not release tasks from the wait even if these tasks satisfy the wait conditions (the system operates normally if twai_flg not used).
      (1)Several tasks are present which are waiting for event flags.
      (2)A system clock interrupt is requested while a set_flg or iset_flg system call is serviced.
      (3)Tasks that have been placed in the wait condition by twai_flg during the above-mentioned system clock interrupt are released from the wait by timeout.

  3. Workaround
    Disable interrupts before the description of the set_flg or iset_flg system call, and enable them after the description.
         [Example]
          ---------------------------------------------------------------------
         |
         |   void task1(void)
         |   {
         |
         |                       :
         |                       :
         |           asm(" mvfc      R0,PSW");
         |           asm(" and3      R0,R0,#0xFFBF");
         |           asm(" mvtc      R0,PSW");
         |
         |           set_flg(ID_flg1,(UINT)0xff00ff00);
         |
         |           asm(" mvfc      R0,PSW");
         |           asm(" or3       R0,R0,#0x0040");
         |           asm(" mvtc      R0,PSW");
         |                       :
         |                       :
         |  }
         |
          ---------------------------------------------------------------------
    
Problem in Using Each Function of Event Flag, Semaphore, Mail Box, Fixed-Length Memory Pool, Rendezvous, and Message Buffer
  1. Version Concerned
    MR32R V.3.00 Release 1

  2. Description
    When system calls are issued with the ID number of each object given a multiple of 32, the following two improper operations may be effected in each of the event flag, semaphore, mail box, fixed-length memory pool, rendezvous, and message buffer functions.
      (1)Where the error code E_NOEXS should normally be returned, the object concerned is handled as if it exists.
      (2)Where the object concerned should be handled normally, the error code E_NOEXS is returned.

  3. Workaround
    When the ID number of the object is a multiple of 32, assume this number as a dummy, and designate the subsequent number (33, 65, 97, etc.) or later as the ID number at using system calls. If ID numbers are defined in the configuration file, they must be in series, not discrete. Therefore, dummy numbers are necessary even if not used in static definition. On the contrary, dummy numbers are not required in dynamic definition using such system calls as cre.flg and cre.sem.
Problem in Setting Initial Values of System Time and Setting Start Time of Alarm Handlers in Configuration File
  1. Version Concerned
    MR32R V.3.00 Release 1

  2. Description
    At the settings of the initial values of the system time and the start time of the alarm handlers in the configuration file, if the lower 16 bits of a time representation is not given in 4 digits (in hexadecimal notation), the configurator outputs the value to the sys_rom.inc file without adding 0s necessary to make the 4-digit number.
         [Example]
          ---------------------------------------------------------------------
         |
         | [Descriptions in configuration file]
         |
         |   alarm_hand[1]{
         |       time               = 0:0x100:0xab5;
         |       entry_address      = alh1();
         |   };
         |
         |
         | [Result outputted to sys_rom.inc]
         |
         |   __D_AHCB_TIM_L:
         |                 .DATA.W H'100ab5
         |
         |
         | [Result to be output normally]
         |
         |   __D_AHCB_TIM_L:
         |                 .DATA.W H'1000ab5
         |
          ---------------------------------------------------------------------
    
  3. Workaround
    Modify the description in the sys_rom.inc file by adding 0s necessary to make the lower 16 bits concerned a 4-digit number. Note that the sys_rom.inc file is rewritten each time the configurator is executed, so the file should be modified after each rewriting.

    (1)Setting of start time of alarm handlers
            [Example]
             ------------------------------------------------------------------
            |
            | [Descriptions in configuration file]
            |
            |   alarm_hand[1]{
            |       time            = 0:0x100:0xab5;
            |       entry_address   = alh1();
            |   };
            |
            |
            | [Result of editing sys_rom.inc]
            |
            |   __D_AHCB_TIM_L:     Modify the description introduced by this label
            |                 .DATA.W H'100ab5
            |                   
            |            -->  .DATA.W H'1000ab5     Place a 0 between 100 and ab5
            |                                       to make the ab5 portion of the
            |                                       lower 16 bits a 4-digit number
            |
             ------------------------------------------------------------------
            [Note] The configurator outputs the data of each alarm handler in
                   its starting order after the __D_AHCB_TIM_L label.
                   For example, at the fifth position from the __D_AHCB_TIM_L label, 
                   the data of the fifth alarm handler in starting order is output, 
                   not of the fifth one in the order of ID numbers.
    

    (2)Setting of initial values of system timer
            [Example]
             ------------------------------------------------------------------
            |
            | [Descriptions in configuration file]
            |
            |   clock{
            |           mpu_clock           = 16.6MHz;
            |           IPL                 = 3;
            |           unit_time           = 100ms;
            |           mode                = MSA2000;
            |           initial_time        = 0x100:0x2000:0xcc;
            |   };
            |
            |
            | [Result of editing sys_rom.inc]
            |
            |   ; +--------------------------------------+
            |   ; |     Initial count of System clock    |
            |   ; +--------------------------------------+
            |         .ALIGN      4
            |         .GLOBAL     __D_Sys_TIME_H,__D_Sys_TIME_L
            |   __D_Sys_TIME_L:   .DATA.W H'2000CC        Modify the description 
            |                                             introduced by this label
            |                            
            |                -->  .DATA.W H'200000CC     Place two 0s between 2000
            |                                            and CC to make the CC
            |                                            portion of the lower 16 
            |                                            bits a 4-digit number
             ------------------------------------------------------------------
    





© 2008. Renesas Technology Corp., All rights reserved. Privacy | Legal