RZ/A1H CMSIS-RTOS RTX BSP for GR-PEACH.

Dependents:   GR-PEACH_Azure_Speech ImageZoomInout_Sample ImageRotaion_Sample ImageScroll_Sample ... more

Fork of R_BSP by Daiki Kato

SSIF

The SSIF driver implements transmission and reception functionality which uses the SSIF in the RZ/A Series.

Hello World!

Import program

00001 #include "mbed.h"
00002 #include "R_BSP_Ssif.h"
00003 #include "sine_data_tbl.h"
00004 
00005 //I2S send only, The upper limit of write buffer is 8.
00006 R_BSP_Ssif ssif(P4_4, P4_5, P4_7, P4_6, 0x80, 8, 0);
00007 
00008 static void callback_ssif_write_end(void * p_data, int32_t result, void * p_app_data) {
00009     if (result < 0) {
00010         printf("ssif write callback error %d\n", result);
00011     }
00012 }
00013 
00014 int main() {
00015     rbsp_data_conf_t   ssif_write_end_conf = {&callback_ssif_write_end, NULL};
00016     ssif_channel_cfg_t ssif_cfg;
00017     int32_t            result;
00018 
00019     //I2S Master, 44.1kHz, 16bit, 2ch
00020     ssif_cfg.enabled                = true;
00021     ssif_cfg.int_level              = 0x78;
00022     ssif_cfg.slave_mode             = false;
00023     ssif_cfg.sample_freq            = 44100u;
00024     ssif_cfg.clk_select             = SSIF_CFG_CKS_AUDIO_X1;
00025     ssif_cfg.multi_ch               = SSIF_CFG_MULTI_CH_1;
00026     ssif_cfg.data_word              = SSIF_CFG_DATA_WORD_16;
00027     ssif_cfg.system_word            = SSIF_CFG_SYSTEM_WORD_32;
00028     ssif_cfg.bclk_pol               = SSIF_CFG_FALLING;
00029     ssif_cfg.ws_pol                 = SSIF_CFG_WS_LOW;
00030     ssif_cfg.padding_pol            = SSIF_CFG_PADDING_LOW;
00031     ssif_cfg.serial_alignment       = SSIF_CFG_DATA_FIRST;
00032     ssif_cfg.parallel_alignment     = SSIF_CFG_LEFT;
00033     ssif_cfg.ws_delay               = SSIF_CFG_DELAY;
00034     ssif_cfg.noise_cancel           = SSIF_CFG_DISABLE_NOISE_CANCEL;
00035     ssif_cfg.tdm_mode               = SSIF_CFG_DISABLE_TDM;
00036     ssif_cfg.romdec_direct.mode     = SSIF_CFG_DISABLE_ROMDEC_DIRECT;
00037     ssif_cfg.romdec_direct.p_cbfunc = NULL;
00038     result = ssif.ConfigChannel(&ssif_cfg);
00039     if (result < 0) {
00040         printf("ssif config error %d\n", result);
00041     }
00042 
00043     while (1) {
00044         //The upper limit of write buffer is 8.
00045         result = ssif.write((void *)sin_data_44100Hz_16bit_2ch, 
00046                             sizeof(sin_data_44100Hz_16bit_2ch), &ssif_write_end_conf);
00047         if (result < 0) {
00048             printf("ssif write api error %d\n", result);
00049         }
00050     }
00051 }

API

Import library

Public Member Functions

R_BSP_Ssif (PinName sck, PinName ws, PinName tx, PinName rx, uint8_t int_level=0x80, int32_t max_write_num=16, int32_t max_read_num=16)
Constructor.
virtual ~R_BSP_Ssif ()
Destructor.
int32_t GetSsifChNo (void)
Get a value of SSIF channel number.
bool ConfigChannel (const ssif_channel_cfg_t *const p_ch_cfg)
Save configuration to the SSIF driver.
bool GetStatus (uint32_t *const p_status)
Get a value of SSISR register.
int32_t write (void *const p_data, uint32_t data_size, const rbsp_data_conf_t *const p_data_conf=NULL)
Write count bytes to the file associated.
int32_t read (void *const p_data, uint32_t data_size, const rbsp_data_conf_t *const p_data_conf=NULL)
Read count bytes to the file associated.

Protected Member Functions

void write_init (void *handle, void *p_func_a, int32_t max_buff_num=16)
Write init.
void read_init (void *handle, void *p_func_a, int32_t max_buff_num=16)
Read init.

Interface

See the Pinout page for more details


SCUX

The SCUX module consists of a sampling rate converter, a digital volume unit, and a mixer.
The SCUX driver can perform asynchronous and synchronous sampling rate conversions using the sampling rate converter. The SCUX driver uses the DMA transfer mode to input and output audio data.

Hello World!

Import program

00001 #include "mbed.h"
00002 #include "R_BSP_Scux.h"
00003 #include "USBHostMSD.h"
00004 
00005 R_BSP_Scux scux(SCUX_CH_0);
00006 
00007 #define WRITE_SAMPLE_NUM (128)
00008 #define READ_SAMPLE_NUM  (2048)
00009 
00010 const short sin_data[WRITE_SAMPLE_NUM] = {
00011  0x0000,0x0000,0x0C8C,0x0C8C,0x18F9,0x18F9,0x2528,0x2528
00012 ,0x30FB,0x30FB,0x3C56,0x3C56,0x471C,0x471C,0x5133,0x5133
00013 ,0x5A82,0x5A82,0x62F1,0x62F1,0x6A6D,0x6A6D,0x70E2,0x70E2
00014 ,0x7641,0x7641,0x7A7C,0x7A7C,0x7D89,0x7D89,0x7F61,0x7F61
00015 ,0x7FFF,0x7FFF,0x7F61,0x7F61,0x7D89,0x7D89,0x7A7C,0x7A7C
00016 ,0x7641,0x7641,0x70E2,0x70E2,0x6A6D,0x6A6D,0x62F1,0x62F1
00017 ,0x5A82,0x5A82,0x5133,0x5133,0x471C,0x471C,0x3C56,0x3C56
00018 ,0x30FB,0x30FB,0x2528,0x2528,0x18F9,0x18F9,0x0C8C,0x0C8C
00019 ,0x0000,0x0000,0xF374,0xF374,0xE707,0xE707,0xDAD8,0xDAD8
00020 ,0xCF05,0xCF05,0xC3AA,0xC3AA,0xB8E4,0xB8E4,0xAECD,0xAECD
00021 ,0xA57E,0xA57E,0x9D0F,0x9D0F,0x9593,0x9593,0x8F1E,0x8F1E
00022 ,0x89BF,0x89BF,0x8584,0x8584,0x8277,0x8277,0x809F,0x809F
00023 ,0x8001,0x8001,0x809F,0x809F,0x8277,0x8277,0x8584,0x8584
00024 ,0x89BF,0x89BF,0x8F1E,0x8F1E,0x9593,0x9593,0x9D0F,0x9D0F
00025 ,0xA57E,0xA57E,0xAECD,0xAECD,0xB8E4,0xB8E4,0xC3AA,0xC3AA
00026 ,0xCF05,0xCF05,0xDAD8,0xDAD8,0xE707,0xE707,0xF374,0xF374
00027 };
00028 
00029 #if defined(__ICCARM__)
00030 #pragma data_alignment=4
00031 short write_buff[WRITE_SAMPLE_NUM]@ ".mirrorram";
00032 #pragma data_alignment=4
00033 short read_buff[READ_SAMPLE_NUM]@ ".mirrorram";
00034 #else
00035 short write_buff[WRITE_SAMPLE_NUM] __attribute((section("NC_BSS"),aligned(4)));
00036 short read_buff[READ_SAMPLE_NUM] __attribute((section("NC_BSS"),aligned(4)));
00037 #endif
00038 
00039 void scux_setup(void);
00040 void write_task(void const*);
00041 void file_output_to_usb(void);
00042 
00043 int main(void) {
00044     // set up SRC parameters.
00045     scux_setup();
00046 
00047     printf("Sampling rate conversion Start.\n");
00048     // start accepting transmit/receive requests.
00049     scux.TransStart();
00050 
00051     // create a new thread to write to SCUX.
00052     Thread writeTask(write_task, NULL, osPriorityNormal, 1024 * 4);
00053 
00054     // receive request to the SCUX driver.
00055     scux.read(read_buff, sizeof(read_buff));
00056     printf("Sampling rate conversion End.\n");
00057 
00058     // output binary file to USB port 0.
00059     file_output_to_usb();
00060 }
00061 
00062 void scux_setup(void) {
00063     scux_src_usr_cfg_t src_cfg;
00064 
00065     src_cfg.src_enable           = true;
00066     src_cfg.word_len             = SCUX_DATA_LEN_16;
00067     src_cfg.mode_sync            = true;
00068     src_cfg.input_rate           = SAMPLING_RATE_48000HZ;
00069     src_cfg.output_rate          = SAMPLING_RATE_96000HZ;
00070     src_cfg.select_in_data_ch[0] = SELECT_IN_DATA_CH_0;
00071     src_cfg.select_in_data_ch[1] = SELECT_IN_DATA_CH_1;
00072 
00073     scux.SetSrcCfg(&src_cfg);
00074 }
00075 
00076 void scux_flush_callback(int scux_ch) {
00077     // do nothing
00078 }
00079 
00080 void write_task(void const*) {
00081     memcpy(write_buff, sin_data, sizeof(write_buff));
00082     // send request to the SCUX driver.
00083     scux.write(write_buff, sizeof(write_buff));
00084 
00085     // stop the acceptance of transmit/receive requests.
00086     scux.FlushStop(&scux_flush_callback);
00087 }
00088 
00089 void file_output_to_usb(void) {
00090     FILE * fp = NULL;
00091     int i;
00092 
00093     USBHostMSD msd("usb");
00094 
00095     // try to connect a MSD device
00096     for(i = 0; i < 10; i++) {
00097         if (msd.connect()) {
00098             break;
00099         }
00100         wait(0.5);
00101     }
00102 
00103     if (msd.connected()) {
00104         fp = fopen("/usb/scux_input.dat", "rb");
00105         if (fp == NULL) {
00106             fp = fopen("/usb/scux_input.dat", "wb");
00107             if (fp != NULL) {
00108                 fwrite(write_buff, sizeof(short), WRITE_SAMPLE_NUM, fp);
00109                 fclose(fp);
00110                 printf("Output binary file(Input data) to USB.\n");
00111             } else {
00112                 printf("Failed to output binary file(Input data).\n");
00113             }
00114         } else {
00115             printf("Binary file(Input data) exists.\n");
00116             fclose(fp);
00117         }
00118 
00119         fp = fopen("/usb/scux_output.dat", "rb");
00120         if (fp == NULL) {
00121             fp = fopen("/usb/scux_output.dat", "wb");
00122             if (fp != NULL) {
00123                 fwrite(read_buff, sizeof(short), READ_SAMPLE_NUM, fp);
00124                 fclose(fp);
00125                 printf("Output binary file(Output data) to USB.\n");
00126             } else {
00127                 printf("Failed to output binary file(Output data).\n");
00128             }
00129         } else {
00130             printf("Binary file(Output data) exists.\n");
00131             fclose(fp);
00132         }
00133     } else {
00134         printf("Failed to connect to the USB device.\n");
00135     }
00136 } 

API

Import library

Public Member Functions

R_BSP_Scux ( scux_ch_num_t channel, uint8_t int_level=0x80, int32_t max_write_num=16, int32_t max_read_num=16)
Constructor: Initializes and opens the channel designated by the SCUX driver.
virtual ~R_BSP_Scux (void)
Destructor: Closes the channel designated by the SCUX driver and exits.
bool TransStart (void)
Sets up the SCUX HW and starts operation, then starts accepting write/read requests.
bool FlushStop (void(*const callback)(int32_t))
Stops accepting write/read requests, flushes out all data in the SCUX that is requested for transfer, then stops the HW operation.
bool ClearStop (void)
Discards all data in the SCUX that is requested for transfer before stopping the hardware operation and stops accepting write/read requests.
bool SetSrcCfg (const scux_src_usr_cfg_t *const p_src_param)
Sets up SRC parameters.
bool GetWriteStat (uint32_t *const p_write_stat)
Obtains the state information of the write request.
bool GetReadStat (uint32_t *const p_read_stat)
Obtains the state information of the read request.
int32_t write (void *const p_data, uint32_t data_size, const rbsp_data_conf_t *const p_data_conf=NULL)
Write count bytes to the file associated.
int32_t read (void *const p_data, uint32_t data_size, const rbsp_data_conf_t *const p_data_conf=NULL)
Read count bytes to the file associated.

Protected Member Functions

void write_init (void *handle, void *p_func_a, int32_t max_buff_num=16)
Write init.
void read_init (void *handle, void *p_func_a, int32_t max_buff_num=16)
Read init.

Write request state transition diagram

/media/uploads/dkato/scux_write_state_transition.png

Read request state transition diagram

/media/uploads/dkato/scux_read_state_transition.png

Files at this revision

API Documentation at this revision

Comitter:
dkato
Date:
Tue Aug 18 04:00:49 2015 +0000
Parent:
4:7318d8e553a4
Child:
6:aa1fc6a5cc2a
Commit message:
Update BSP V.203

Changed in this revision

RenesasBSP/drv_inc/bsp_drv_cmn.h Show annotated file Show diff for this revision Revisions of this file
RenesasBSP/drv_inc/misratypes.h Show annotated file Show diff for this revision Revisions of this file
RenesasBSP/drv_inc/posix_types.h Show annotated file Show diff for this revision Revisions of this file
RenesasBSP/drv_src/dma/dma.c Show annotated file Show diff for this revision Revisions of this file
RenesasBSP/drv_src/dma/dma.h Show annotated file Show diff for this revision Revisions of this file
RenesasBSP/drv_src/dma/dma_if.c Show annotated file Show diff for this revision Revisions of this file
RenesasBSP/drv_src/dma/dma_ver.c Show annotated file Show diff for this revision Revisions of this file
RenesasBSP/drv_src/ioif/aioif.c Show annotated file Show diff for this revision Revisions of this file
RenesasBSP/drv_src/ssif/ssif.c Show annotated file Show diff for this revision Revisions of this file
RenesasBSP/drv_src/ssif/ssif_cfg.c Show annotated file Show diff for this revision Revisions of this file
RenesasBSP/drv_src/ssif/ssif_dma.c Show annotated file Show diff for this revision Revisions of this file
RenesasBSP/drv_src/ssif/ssif_ver.c Show annotated file Show diff for this revision Revisions of this file
RenesasBSP/version.txt Show annotated file Show diff for this revision Revisions of this file
api/R_BSP_Ssif.h Show annotated file Show diff for this revision Revisions of this file
common/R_BSP_Ssif.cpp Show annotated file Show diff for this revision Revisions of this file
tools/ssif_api.c Show annotated file Show diff for this revision Revisions of this file
--- a/RenesasBSP/drv_inc/bsp_drv_cmn.h	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/drv_inc/bsp_drv_cmn.h	Tue Aug 18 04:00:49 2015 +0000
@@ -22,8 +22,8 @@
 *******************************************************************************/
 /**************************************************************************//**
 * @file          bsp_drv_cmn.h
-* $Rev: 891 $
-* $Date:: 2014-06-27 10:40:52 +0900#$
+* $Rev: 1667 $
+* $Date:: 2015-05-29 14:01:37 +0900#$
 * @brief         BSP Section settings
 ******************************************************************************/
 
@@ -32,10 +32,14 @@
 
 #if(1) /* mbed */
 #else
+#if defined (__CC_ARM)          /* ARM Compiler */
+
 #pragma arm section code="CODE_RDRV"
 #pragma arm section rodata="CONST_RDRV"
 #pragma arm section rwdata="DATA_RDRV"
 #pragma arm section zidata="BSS_RDRV"
+
+#endif /* __CC_ARM */
 #endif
 
 #endif /* BSP_DRV_CMN_H */
--- a/RenesasBSP/drv_inc/misratypes.h	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/drv_inc/misratypes.h	Tue Aug 18 04:00:49 2015 +0000
@@ -24,8 +24,8 @@
 /******************************************************************************
  *
  *  V. 2.03.00
- * $Rev: 891 $
- * $Date:: 2014-06-27 10:40:52 +0900#$
+ * $Rev: 1667 $
+ * $Date:: 2015-05-29 14:01:37 +0900#$
  *
  * Description : Types for MISRA compliant C code.
  *
@@ -105,12 +105,12 @@
 
 Return value:   Passed in argument.
 ***********************************************************************************/
-#if(1) /* mbed */
-static inline const void* unused_arg(const void* const var)
-#else
+#if   defined (__CC_ARM)
 #pragma inline unused_arg
+#elif defined (__ICCARM__)
+#pragma inline =forced
+#endif
 static const void* unused_arg(const void* const var)
-#endif
 {
     return var;
 }
@@ -127,12 +127,12 @@
 Return value:   Non-zero if the value is an error code
 ***********************************************************************************/
 
-#if(1) /* mbed */
-static inline bool_t iserror(const int32_t ser)
-#else
+#if   defined (__CC_ARM)
 #pragma inline iserror
+#elif defined (__ICCARM__)
+#pragma inline =forced
+#endif
 static bool_t iserror(const int32_t ser)
-#endif
 {
     uint32_t er = (uint32_t) ser;
     return er >= 0xffffff80u;
@@ -149,12 +149,12 @@
 
 Return value:   Error code converted to a pointer
 ***********************************************************************************/
-#if(1) /* mbed */
-static inline void *error_to_ptr(const int32_t er)
-#else
+#if   defined (__CC_ARM)
 #pragma inline error_to_ptr
+#elif defined (__ICCARM__)
+#pragma inline =forced
+#endif
 static void *error_to_ptr(const int32_t er)
-#endif
 {
     return (void*) er;
 }
@@ -169,12 +169,12 @@
 
 Return value:   Functino pointer as a FP
 ***********************************************************************************/
-#if(1) /* mbed */
-static inline funcptr_t to_fp_function(void (*val)(int32_t))
-#else
+#if   defined (__CC_ARM)
 #pragma inline to_fp_function
+#elif defined (__ICCARM__)
+#pragma inline =forced
+#endif
 static funcptr_t to_fp_function(void (*val)(int32_t))
-#endif
 {
     /* QA-C will generate an error for this line as we are casting
      * between different function pointer types.
--- a/RenesasBSP/drv_inc/posix_types.h	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/drv_inc/posix_types.h	Tue Aug 18 04:00:49 2015 +0000
@@ -24,8 +24,8 @@
 /******************************************************************************
  *
  *  V. 2.03.00
- * $Rev: 891 $
- * $Date:: 2014-06-27 10:40:52 +0900#$
+ * $Rev: 1560 $
+ * $Date:: 2015-03-16 10:39:54 +0900#$
  *
  * Description : POSIX types
  *
@@ -37,9 +37,7 @@
 /***********************************************************************************
  System Includes
 ***********************************************************************************/
-#if defined (__CC_ARM)
-#include    <time.h>
-#endif
+
 
 /***********************************************************************************
  User Includes
@@ -113,6 +111,7 @@
     time_t and clock_t                  shall be integer or real-floating types.
 */
 
+#if(1) /* mbed */
 #if defined (__CC_ARM)
 #if !defined(__cplusplus) && defined(__STRICT_ANSI__)
 typedef unsigned long size_t;
@@ -126,12 +125,31 @@
 typedef int             gid_t;
 typedef int             dev_t;
 typedef int             ssize_t;
-
 #elif defined (__GNUC__)
 #include <stdio.h>
 typedef long time_t;    /* Time in seconds. */
 typedef unsigned int mode_t;
 #endif
+#else
+typedef int fsid_t;
+typedef long time_t;    /* Time in seconds. */
+typedef long long off_t;
+typedef unsigned int mode_t;
+typedef unsigned int ino_t;
+typedef int nlink_t;
+typedef int uid_t;
+typedef int gid_t;
+typedef int dev_t;
+typedef int ssize_t;
+
+#if !defined(__cplusplus) && defined(__STRICT_ANSI__)
+#if defined (__GNUC__)
+typedef unsigned int size_t;
+#else /*__GNUC__*/
+typedef unsigned long size_t;
+#endif/*__GNUC__*/
+#endif
+#endif
 
 #ifdef __cplusplus
 }
--- a/RenesasBSP/drv_src/dma/dma.c	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/drv_src/dma/dma.c	Tue Aug 18 04:00:49 2015 +0000
@@ -23,8 +23,8 @@
 
 /**************************************************************************//**
 * @file         dma.c
-* $Rev: 1133 $
-* $Date:: 2014-09-08 14:33:59 +0900#$
+* $Rev: 1674 $
+* $Date:: 2015-05-29 16:35:57 +0900#$
 * @brief        DMA Driver internal functions
 ******************************************************************************/
 
@@ -41,7 +41,6 @@
 #include "aioif.h"
 #include "iodefine.h"
 #include "gic.h"
-#include "bsp_util.h"
 
 /******************************************************************************
 Private global driver management information
@@ -51,31 +50,6 @@
 static dma_info_drv_t gb_info_drv;
 
 /******************************************************************************
-Private global channel semaphore information
-******************************************************************************/
-
-/* driver semaphore name define */
-/* ->MISRA 8.8, 8.10, IPA M2.2.2 There is no problem in the description of declaration of 
-OS resource itself */
-osSemaphoreDef(sem_dma_ch0);
-osSemaphoreDef(sem_dma_ch1);
-osSemaphoreDef(sem_dma_ch2);
-osSemaphoreDef(sem_dma_ch3);
-osSemaphoreDef(sem_dma_ch4);
-osSemaphoreDef(sem_dma_ch5);
-osSemaphoreDef(sem_dma_ch6);
-osSemaphoreDef(sem_dma_ch7);
-osSemaphoreDef(sem_dma_ch8);
-osSemaphoreDef(sem_dma_ch9);
-osSemaphoreDef(sem_dma_ch10);
-osSemaphoreDef(sem_dma_ch11);
-osSemaphoreDef(sem_dma_ch12);
-osSemaphoreDef(sem_dma_ch13);
-osSemaphoreDef(sem_dma_ch14);
-osSemaphoreDef(sem_dma_ch15);
-/* <-MISRA 8.8, 8.10, IPA M2.2.2 */
-      
-/******************************************************************************
 Private function define (interrupt handler)
 ******************************************************************************/
 
@@ -145,17 +119,13 @@
 * Description : Initialize DMA driver.
 * Arguments : *p_dma_init_param -
 *                  Pointer of init parameters.
-*             sem_drv -
-*                  Driver semaphore ID.
 * Return Value : ESUCCESS -
 *                  Operation successful.
 *                OS error num -
 *                  Registering handler failed.
-*                ENOMEM -
-*                  Making semaphore failed.
 ******************************************************************************/
 
-int_t DMA_Initialize(const dma_drv_init_t * const p_dma_init_param, const osSemaphoreId sem_drv)
+int_t DMA_Initialize(const dma_drv_init_t * const p_dma_init_param)
 {
     int_t    retval = ESUCCESS;
     int_t    ch_count;
@@ -268,33 +238,9 @@
           DMAINT15_IRQn
         };
         
-    /* driver semaphore table define */
-    static const osSemaphoreDef_t *p_gb_semdef_ch[DMA_CH_NUM] = 
-        { 
-          osSemaphore(sem_dma_ch0),
-          osSemaphore(sem_dma_ch1),
-          osSemaphore(sem_dma_ch2),
-          osSemaphore(sem_dma_ch3),
-          osSemaphore(sem_dma_ch4),
-          osSemaphore(sem_dma_ch5),
-          osSemaphore(sem_dma_ch6),
-          osSemaphore(sem_dma_ch7),
-          osSemaphore(sem_dma_ch8),
-          osSemaphore(sem_dma_ch9),
-          osSemaphore(sem_dma_ch10),
-          osSemaphore(sem_dma_ch11),
-          osSemaphore(sem_dma_ch12),
-          osSemaphore(sem_dma_ch13),
-          osSemaphore(sem_dma_ch14),
-          osSemaphore(sem_dma_ch15)
-        };
-    
     /* element of p_dma_init_param is copied to element of gb_info_drv */
     gb_info_drv.p_err_aio = p_dma_init_param->p_aio;
     
-    /* set driver semaphore ID */
-    gb_info_drv.sem_drv = sem_drv;
-    
     /* set DMA error interrupt number */
     gb_info_drv.err_irq_num = DMAERR_IRQn;
     
@@ -365,27 +311,6 @@
        set round robin mode */
     gb_info_drv.info_ch[HIGH_COMMON_REG_OFFSET].p_dma_common_reg->DCTRL_0_7 = DCTRL_INIT_VALUE;
     
-    /* making channel semaphore */
-    init_check_flag = false;
-    ch_count = 0;
-    while (false == init_check_flag)
-    {
-        /* make semaphore */
-        gb_info_drv.info_ch[ch_count].sem_ch = osSemaphoreCreate(p_gb_semdef_ch[ch_count], 1);
-        if (NULL == gb_info_drv.info_ch[ch_count].sem_ch)
-        {
-            /* set error return value */
-            retval = ENOMEM;
-            init_check_flag = true;
-        }
-        
-        if ((DMA_CH_NUM - 1) == ch_count)
-        {
-            init_check_flag = true;
-        }
-        ch_count++;
-    }
-    
     if (ESUCCESS == retval)
     {
         /* DMA end interrupt handler register */
@@ -469,8 +394,7 @@
 * Return Value : ESUCCESS -
 *                  Operation successful.
 *                OS error num -
-*                  Unregistering handler failed,
-*                  or Semaphore release failed.
+*                  Unregistering handler failed
 ******************************************************************************/
 
 int_t DMA_UnInitialize(void)
@@ -478,7 +402,6 @@
     int_t            retval = ESUCCESS;
     int_t            ch_count;
     uint32_t         error_code;
-    osStatus         sem_status;
     bool_t           uninit_check_flag;
 
     /* init DMA registers */
@@ -540,29 +463,6 @@
 
     if (ESUCCESS == retval)
     {
-        /* delete channel semaphore */
-        ch_count = 0;
-        uninit_check_flag = false;
-        while (false == uninit_check_flag)
-        {
-            /* semaphore delete */
-            sem_status = osSemaphoreDelete(gb_info_drv.info_ch[ch_count].sem_ch);
-            if (osOK != sem_status)
-            {
-                /* set error return value */
-                retval = (int_t)sem_status;
-                uninit_check_flag = true;
-            }
-            if ((DMA_CH_NUM - 1) == ch_count)
-            {
-                uninit_check_flag = true;
-            }
-            ch_count++;
-        }
-    }
-    
-    if (ESUCCESS == retval)
-    {
         /* set channel status to DMA_CH_UNINIT */
         for (ch_count = 0; ch_count < DMA_CH_NUM; ch_count++)
         {
@@ -607,10 +507,8 @@
 * Return Value :   channel -
 *                     Open channel number.
 *                  error code -
-*                     OS error num : Semaphore release failed.
-*                     EMFILE : When looking for a free channel, but a free channel
-*                              didn't exist.
-*                     EFAULT:  Wait semaphore failed.
+*                     EMFILE : When looking for a free channel, but a free
+*                              channel didn't exist.
 ******************************************************************************/
 
 int_t DMA_GetFreeChannel(void)
@@ -618,8 +516,6 @@
     int_t           retval = EFAULT;
     dma_info_ch_t   *dma_info_ch;
     int_t           ch_alloc;
-    int_t           sem_wait_status;
-    osStatus        sem_release_status;
     bool_t          ch_stat_check_flag;
     
     /* looking for free channel */
@@ -628,21 +524,6 @@
     while (false == ch_stat_check_flag)
     {
         dma_info_ch = DMA_GetDrvChInfo(ch_alloc);
-        /* start semaphore wait forever */
-        /* check carrying out on the task (0) */
-        if (0 == R_ExceptionalMode())
-        {
-            /* ->MISRA 10.6, osWaitForever is defined by the header got from related section*/ 
-            sem_wait_status = osSemaphoreWait(dma_info_ch->sem_ch, osWaitForever);
-            /* <-MISRA 10.6 */
-            /* semaphore error check */
-            if ((-1) == sem_wait_status)
-            {
-                /* set error return value */
-                retval = EFAULT;
-                ch_stat_check_flag = true;
-            }
-        }
                         
         if (false == ch_stat_check_flag)
         {
@@ -650,36 +531,8 @@
             {
                 DMA_OpenChannel(ch_alloc);
                 retval = ch_alloc;
-                /* semaphore release */
-                /* check carrying out on the task (0) */
-                if (0 == R_ExceptionalMode())
-                {
-                    sem_release_status = osSemaphoreRelease(dma_info_ch->sem_ch);
-                    /* semaphore error check */
-                    if (osOK != sem_release_status)
-                    {
-                        /* set error return value */
-                        retval = (int_t)sem_release_status;
-                    }
-                }   
                 ch_stat_check_flag = true;
             }
-            else
-            {
-                /* semaphore release */
-                /* check carrying out on the task (0) */
-                if (0 == R_ExceptionalMode())
-                {
-                    sem_release_status = osSemaphoreRelease(dma_info_ch->sem_ch);
-                    /* semaphore error check */
-                    if (osOK != sem_release_status)
-                    {
-                        /* set error return value */
-                        retval = (int_t)sem_release_status;
-                        ch_stat_check_flag = true;
-                    }
-                }
-            }
             if (false ==  ch_stat_check_flag)
             {
                 ch_alloc++;
@@ -709,37 +562,19 @@
 * Return Value :   channel -
 *                     Open channel number.
 *                  error code -
-*                     OS error num : Semaphore release failed.
 *                     EBUSY : It has been allocated already in channel.
 *                     ENOTSUP : Channel status is DMA_CH_UNINIT.
 *                     EFAULT: Channel status is besides the status definded in 
 *                             dma_stat_ch_t.
-*                             Wait semaphore failed.
 ******************************************************************************/
 
 int_t DMA_GetFixedChannel(const int_t channel)
 {
     int_t           retval = ESUCCESS;
     dma_info_ch_t   *dma_info_ch;
-    int_t           sem_wait_status;
-    osStatus        sem_release_status;
     
     /* allocate the specified number */
     dma_info_ch = DMA_GetDrvChInfo(channel);
-    /* start semaphore wait forever */
-    /* check carrying out on the task (0) */
-    if (0 == R_ExceptionalMode())
-    {
-        /* ->MISRA 10.6, osWaitForever is defined by the header got from related section*/ 
-        sem_wait_status = osSemaphoreWait(dma_info_ch->sem_ch, osWaitForever);
-        /* <-MISRA 10.6 */
-        /* semaphore error check */
-        if ((-1) == sem_wait_status)
-        {
-            /* set error return value */
-            retval = EFAULT;
-        }
-    }
             
     if (ESUCCESS == retval)
     {
@@ -769,18 +604,6 @@
                                     
             }
         }
-        /* semaphore release */
-        /* check carrying out on the task (0) */
-        if (0 == R_ExceptionalMode())
-        {
-            sem_release_status = osSemaphoreRelease(dma_info_ch->sem_ch);
-            /* semaphore error check */
-            if (osOK != sem_release_status)
-            {
-                /* set error return value */
-                retval = (int_t)sem_release_status;
-            }
-        }
     }
     
     return retval;
@@ -801,18 +624,9 @@
 
 void DMA_CloseChannel(const int_t channel)
 {
-    int_t  was_masked;
-    
-    /* disable all irq */
-    was_masked = __disable_irq();
     /* clear DMARS register */
     *(gb_info_drv.info_ch[channel].p_dma_dmars_reg) &= gb_info_drv.info_ch[channel].mask_dmars;
-    if (0 == was_masked)
-    {
-        /* enable all irq */
-        __enable_irq();
-        
-    }
+
     /* set channel status to DMA_CH_INIT */
     gb_info_drv.info_ch[channel].ch_stat = DMA_CH_INIT;
     
@@ -842,7 +656,6 @@
 {
     uint32_t  chcfg_sel;
     uint32_t  value_dmars;
-    int_t     was_masked;
     
     /* set DMA transfer parameter to DMA channel infomation */
     gb_info_drv.info_ch[channel].resource =  p_ch_setup->resource;
@@ -853,19 +666,12 @@
     gb_info_drv.info_ch[channel].dst_cnt =   p_ch_setup->dst_cnt;
     gb_info_drv.info_ch[channel].p_end_aio = p_ch_setup->p_aio;
     
-    /* disable all irq */
-    was_masked = __disable_irq();
     /* set DMARS value and protect non change bit */
     value_dmars = *(gb_info_drv.info_ch[channel].p_dma_dmars_reg);
     value_dmars = ((value_dmars & gb_info_drv.info_ch[channel].mask_dmars) |
                    (uint32_t)(p_ch_cfg->dmars << gb_info_drv.info_ch[channel].shift_dmars)); 
     /* set DMARS register value */
     *(gb_info_drv.info_ch[channel].p_dma_dmars_reg) = value_dmars;
-    if (0 == was_masked)
-    {
-        /* enable all irq */
-        __enable_irq();
-    }
         
     /* set CHCFG regsiter */
     if (channel < HIGH_COMMON_REG_OFFSET)
@@ -1642,10 +1448,17 @@
 __inline static void R_DMA_EndHandlerProcess(const int_t channel)
 {
     bool_t   store_next_dma_flag;
+    int_t    was_masked;
     
     if (NULL != gb_info_drv.info_ch[channel].p_end_aio)
     {
-    
+        /* disable all irq */
+#if defined (__ICCARM__)
+        was_masked = __disable_irq_iar();
+#else
+        was_masked = __disable_irq();
+#endif
+
         /* store next_dma_flag */
         store_next_dma_flag = gb_info_drv.info_ch[channel].next_dma_flag;
     
@@ -1689,16 +1502,21 @@
         /* clear TC, END bit */
         gb_info_drv.info_ch[channel].p_dma_ch_reg->CHCTRL_n = (CHCTRL_SET_CLRTC | CHCTRL_SET_CLREND);
 
+        if (0 == was_masked)
+        {
+            __enable_irq();
+        }
+
         /* call back to the module function which called DMA driver */
         ahf_complete(NULL, gb_info_drv.info_ch[channel].p_end_aio);
-        
     }
     else
     {
         ;
         /* NON_NOTICE_ASSERT:<callback pointer is NULL> */
     }
-    
+
+    return;
 }
 
 /******************************************************************************
--- a/RenesasBSP/drv_src/dma/dma.h	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/drv_src/dma/dma.h	Tue Aug 18 04:00:49 2015 +0000
@@ -23,8 +23,8 @@
 
 /**************************************************************************//**
 * @file         dma.h
-* $Rev: 1317 $
-* $Date:: 2014-12-04 10:43:59 +0900#$
+* $Rev: 1616 $
+* $Date:: 2015-04-21 19:00:08 +0900#$
 * @brief        DMA Driver internal headers
 ******************************************************************************/
 
@@ -197,7 +197,6 @@
 {
     int_t              ch;                /* Channel Number */
     dma_stat_ch_t      ch_stat;           /* Channel Status */
-    osSemaphoreId      sem_ch;            /* Channel Semaphore */
     dma_res_select_t   resource;          /* DMA Transfer Resource */
     dma_req_dir_t      direction;         /* DMA Transfer Direction */
     dma_unit_size_t    src_width;         /* DMA Transfer Unit Size (Source) */
@@ -226,7 +225,6 @@
 {
     dma_stat_drv_t  drv_stat;            /* DRV Status */
     AIOCB           *p_err_aio;          /* set callback function (DMA error interrupt) */
-    osSemaphoreId   sem_drv;             /* Driver Semaphore */
     IRQn_Type       err_irq_num;         /* DMA error interrupt number */
     dma_info_ch_t   info_ch[DMA_CH_NUM]; /* Enable Channel */
 } dma_info_drv_t;
@@ -246,7 +244,7 @@
 
 dma_info_drv_t *DMA_GetDrvInstance(void);
 dma_info_ch_t  *DMA_GetDrvChInfo(const int_t channel);
-int_t DMA_Initialize(const dma_drv_init_t * const p_dma_init_param, const osSemaphoreId sem_drv);
+int_t DMA_Initialize(const dma_drv_init_t * const p_dma_init_param);
 int_t DMA_UnInitialize(void);
 int_t DMA_GetFreeChannel(void);
 int_t DMA_GetFixedChannel(const int_t channel);
--- a/RenesasBSP/drv_src/dma/dma_if.c	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/drv_src/dma/dma_if.c	Tue Aug 18 04:00:49 2015 +0000
@@ -23,8 +23,8 @@
 
 /**************************************************************************//**
 * @file         dma_if.c
-* $Rev: 1317 $
-* $Date:: 2014-12-04 10:43:59 +0900#$
+* $Rev: 1674 $
+* $Date:: 2015-05-29 16:35:57 +0900#$
 * @brief        DMA Driver interface functions
 ******************************************************************************/
 
@@ -38,26 +38,15 @@
 *******************************************************************************/
 
 #include "dma.h"
-#include "bsp_util.h"
 
 /******************************************************************************
 Private global tables
 ******************************************************************************/
 
 /******************************************************************************
-Private global driver semaphore information
-******************************************************************************/
-
-/* driver semaphore define */
-/* ->MISRA 8.8, 8.10, IPA M2.2.2 There is no problem in the description of declaration of 
-OS resource itself */
-osSemaphoreDef(sem_dma_drv);
-/* <-MISRA 8.8, 8.10, IPA M2.2.2 */
-
-/******************************************************************************
 * Function Name: R_DMA_Init
 * Description : Init DMA driver.
-*               Making driver semaphore and check parameter in this function.
+*               Check parameter in this function.
 * Arguments : *p_dma_init_param -
 *                  Point of driver init parameter.
 *             *p_errno-
@@ -65,7 +54,6 @@
 *                  When pointer is NULL, it isn't set error code.
 *                  error code -
 *                     OS error num : Registering handler failed.
-*                     ENOMEM : Making semaphore failed.
 *                     EPERM : Pointer of callback function which called in DMA 
 *                             error interrupt handler is NULL.
 *                     EFAULT : dma_init_param is NULL.
@@ -81,10 +69,9 @@
 {
     int_t         retval = ESUCCESS;
     int_t         result_init;
-    osSemaphoreId sem_drv_create_id;
+    int_t         was_masked;
     
     DMA_SetErrCode(ESUCCESS, p_errno);
-    sem_drv_create_id = NULL;
     
     if (NULL == p_dma_init_param)
     {
@@ -105,22 +92,16 @@
         }
     }
     
+    /* disable all irq */
+#if defined (__ICCARM__)
+    was_masked = __disable_irq_iar();
+#else
+    was_masked = __disable_irq();
+#endif    
+
     if (ESUCCESS == retval)
     {
-        /* makeing driver semaphore */
-        /* make semaphore */
-        sem_drv_create_id = osSemaphoreCreate(osSemaphore(sem_dma_drv), 1);
-        if (NULL == sem_drv_create_id)
-        {
-            /* set error return value */
-            retval = (EERROR);
-            DMA_SetErrCode(ENOMEM, p_errno);
-        }
-    }
-    
-    if ((ESUCCESS == retval) && (NULL != sem_drv_create_id))
-    {
-        result_init = DMA_Initialize(p_dma_init_param, sem_drv_create_id);
+        result_init = DMA_Initialize(p_dma_init_param);
         if (ESUCCESS != result_init)
         {
             /* set error return value */
@@ -129,6 +110,11 @@
         }
     }
     
+    if (0 == was_masked)
+    {
+        __enable_irq();
+    }
+
     return retval;
 }
 
@@ -139,19 +125,16 @@
 /******************************************************************************
 * Function Name: R_DMA_UnInit
 * Description : UnInit DMA driver.
-*               Delete driver semaphore and check parameter in this function.
+*               Check parameter in this function.
 * Arguments : *p_errno-
 *                  Pointer of error code.
 *                  When pointer is NULL, it isn't set error code.
 *                  error code -
 *                     OS error num : Unegistering handler failed.
-*                     OS error num : Semaphore release failed.
-*                     OS error num : Semaphore delete failed.
 *                     EACCES : Driver status isn't DMA_DRV_INIT.
 *                     EBUSY : It has been allocated already in channel.
-*                     EFAULT : Wait semaphore failed.
-*                              Channel status is besides the status definded in 
-*                              dma_stat_ch_t.
+*                     EFAULT : Channel status is besides the status definded
+*                              in dma_stat_ch_t.
 * Return Value : ESUCCESS -
 *                  Operation successful.
 *                EERROR -
@@ -167,25 +150,20 @@
     dma_info_drv_t *dma_info_drv;
     dma_info_ch_t  *dma_info_ch;
     int_t          ch_count;
-    int32_t        sem_wait_status;
-    osStatus       sem_status;
     bool_t         ch_stat_check_flag;
+    int_t          was_masked;
     
     DMA_SetErrCode(ESUCCESS, p_errno);
 
     dma_info_drv = DMA_GetDrvInstance();
     
-    /* start semaphore wait forever */
-    /* ->MISRA 10.6, osWaitForever is defined by the header got from related section*/ 
-    sem_wait_status = osSemaphoreWait(dma_info_drv->sem_drv, osWaitForever);
-    /* <-MISRA 10.6 */
-    /* semaphore error check */
-    if ((-1) == sem_wait_status)
-    {
-        retval = EERROR;
-        DMA_SetErrCode(EFAULT, p_errno);
-    }
-    
+    /* disable all irq */
+#if defined (__ICCARM__)
+    was_masked = __disable_irq_iar();
+#else
+    was_masked = __disable_irq();
+#endif    
+
     /* check driver status */
     if (ESUCCESS == retval)
     {
@@ -242,28 +220,13 @@
                 DMA_SetErrCode(result_uninit, p_errno);
             }
         }
-        /* semaphore release */
-        sem_status = osSemaphoreRelease(dma_info_drv->sem_drv);
-        if (osOK != sem_status)
-        {
-            /* set error return value */
-            retval = EERROR;
-            DMA_SetErrCode((int_t)sem_status, p_errno);
-        }
-        
-        if ((osOK == sem_status) && (ESUCCESS == retval))
-        {
-            /* semaphore delete */
-            sem_status = osSemaphoreDelete(dma_info_drv->sem_drv);
-            if (osOK != sem_status)
-            {
-                /* set error return value */
-                retval = EERROR;
-                DMA_SetErrCode((int_t)sem_status, p_errno);
-            }
-        }
     }
     
+    if (0 == was_masked)
+    {
+        __enable_irq();
+    }
+
     return retval;
 }
 
@@ -282,7 +245,6 @@
 *                  Pointer of error code.
 *                  When pointer is NULL, it isn't set error code.
 *                  error code -
-*                     OS error num : Semaphore release failed.
 *                     EINVAL : Value of the ch is outside the range of 
 *                              DMA_ALLOC_CH(-1) <= ch < DMA_CH_NUM.
 *                     EACCES : Driver status isn't DMA_DRV_INIT.
@@ -292,7 +254,6 @@
 *                     ENOTSUP : Channel status is DMA_CH_UNINIT.
 *                     EFAULT: Channel status is besides the status definded in 
 *                             dma_stat_ch_t.
-*                             Wait semaphore failed.
 * Return Value : ESUCCESS -
 *                  Operation successful.
 *                EERROR -
@@ -307,28 +268,20 @@
     int_t           ercd = ESUCCESS;
     int_t           get_ch_num;
     dma_info_drv_t  *dma_info_drv;
-    int_t           sem_wait_status;
-    osStatus        sem_release_status;
+    int_t           was_masked;
 
     DMA_SetErrCode(ESUCCESS, p_errno);
 
     /* check driver status */
     dma_info_drv = DMA_GetDrvInstance();
     
-    /* start semaphore wait forever */
-    /* check carrying out on the task (0) */
-    if (0 == R_ExceptionalMode())
-    {
-        /* ->MISRA 10.6, osWaitForever is defined by the header got from related section*/ 
-        sem_wait_status = osSemaphoreWait(dma_info_drv->sem_drv, osWaitForever);
-        /* <-MISRA 10.6 */
-        /* semaphore error check */
-        if ((-1) == sem_wait_status)
-        {
-            ercd = EFAULT;
-        }
-    }
-    
+    /* disable all irq */
+#if defined (__ICCARM__)
+    was_masked = __disable_irq_iar();
+#else
+    was_masked = __disable_irq();
+#endif    
+
     if (ESUCCESS == ercd)
     {
         if (DMA_DRV_INIT != dma_info_drv->drv_stat)
@@ -368,17 +321,6 @@
                 ercd =  EINVAL;
             }
         }
-        /* semaphore release */
-        /* check carrying out on the task (0) */
-        if (0 == R_ExceptionalMode())
-        {
-            sem_release_status = osSemaphoreRelease(dma_info_drv->sem_drv);
-            if (osOK != sem_release_status)
-            {
-                /* set error return value */
-                ercd = (int_t)sem_release_status;
-            }
-        }
     }
     
     /* occured error check */
@@ -388,6 +330,11 @@
         DMA_SetErrCode(ercd, p_errno);
     }
     
+    if (0 == was_masked)
+    {
+        __enable_irq();
+    }
+
     return retval;
 }
 
@@ -405,7 +352,6 @@
 *                  Pointer of error code.
 *                  When pointer is NULL, it isn't set error code.
 *                  error code -
-*                     OS error num : Semaphore release failed.
 *                     EBADF : Channel status is DMA_CH_INIT.
 *                     EINVAL : Value of the ch is outside the range of 
 *                              (-1) < ch < (DMA_CH_NUM + 1).
@@ -414,7 +360,6 @@
 *                     ENOTSUP : Channel status is DMA_CH_UNINIT.
 *                     EFAULT: Channel status is besides the status definded in 
 *                             dma_stat_ch_t.
-*                             Wait semaphore failed.
 * Return Value : ESUCCESS -
 *                  Operation successful.
 *                EERROR -
@@ -428,54 +373,30 @@
     int_t           retval = ESUCCESS;
     dma_info_drv_t  *dma_info_drv;
     dma_info_ch_t   *dma_info_ch;
-    int_t           sem_wait_status;
-    osStatus        sem_release_status;
     int_t           error_code;
+    int_t           was_masked;
     
     DMA_SetErrCode(ESUCCESS, p_errno);
 
+    /* disable all irq */
+#if defined (__ICCARM__)
+    was_masked = __disable_irq_iar();
+#else
+    was_masked = __disable_irq();
+#endif    
+
     /* check channel of argument */
     if ((0 <= channel) && (channel < DMA_CH_NUM))
     {
          /* check driver status */
         dma_info_drv = DMA_GetDrvInstance();
         
-        /* start semaphore wait forever */
-        /* check carrying out on the task (0) */
-        if (0 == R_ExceptionalMode())
-        {
-            /* ->MISRA 10.6, osWaitForever is defined by the header got from related section*/ 
-            sem_wait_status = osSemaphoreWait(dma_info_drv->sem_drv, osWaitForever);
-            /* <-MISRA 10.6 */
-            /* semaphore error check */
-            if ((-1) == sem_wait_status)
-            {
-                retval = EERROR;
-                DMA_SetErrCode(EFAULT, p_errno);
-            }
-        }
-        
         if (ESUCCESS == retval)
         {
             /* check driver status */
             if (DMA_DRV_INIT == dma_info_drv->drv_stat)
             {
                 dma_info_ch = DMA_GetDrvChInfo(channel);
-                /* start semaphore wait forever */
-                /* check carrying out on the task (0) */
-                if (0 == R_ExceptionalMode())
-                {
-                    /* ->MISRA 10.6, osWaitForever is defined by the header got from related section*/ 
-                    sem_wait_status = osSemaphoreWait(dma_info_ch->sem_ch, osWaitForever);
-                    /* <-MISRA 10.6 */
-                    /* semaphore error check */
-                    if ((-1) == sem_wait_status)
-                    {
-                        /* set error return value */
-                        retval = EERROR;
-                        DMA_SetErrCode(EFAULT, p_errno);
-                    }
-                }
                 
                 if (ESUCCESS == retval)
                 {
@@ -507,19 +428,6 @@
                         }
                         DMA_SetErrCode(error_code, p_errno);
                     }
-                    /* semaphore release */
-                    /* check carrying out on the task (0) */
-                    if (0 == R_ExceptionalMode())
-                    {
-                        sem_release_status = osSemaphoreRelease(dma_info_ch->sem_ch);
-                        /* semaphore error check */
-                        if (osOK != sem_release_status)
-                        {
-                            /* set error return value */
-                            retval = EERROR;
-                            DMA_SetErrCode((int_t)sem_release_status, p_errno);
-                        }
-                    }
                 }
             }
             else
@@ -529,18 +437,6 @@
                 DMA_SetErrCode(EACCES, p_errno);
             
             }
-            /* semaphore release */
-            /* check carrying out on the task (0) */
-            if (0 == R_ExceptionalMode())
-            {
-                sem_release_status = osSemaphoreRelease(dma_info_drv->sem_drv);
-                if (osOK != sem_release_status)
-                {
-                    /* set error return value */
-                    retval = EERROR;
-                    DMA_SetErrCode((int_t)sem_release_status, p_errno);
-                }
-            }
         }
     }
     else
@@ -550,6 +446,11 @@
         DMA_SetErrCode(EINVAL, p_errno);
     }
     
+    if (0 == was_masked)
+    {
+        __enable_irq();
+    }
+
     return retval;
 }
 
@@ -569,7 +470,6 @@
 *                  Pointer of error code.
 *                  When pointer is NULL, it isn't set error code.
 *                  error code -
-*                     OS error num : Semaphore release failed.
 *                     EBADF : Channel status is DMA_CH_INIT.
 *                     EINVAL : Value of the ch is outside the range of 
 *                              (-1) < ch < (DMA_CH_NUM + 1).
@@ -579,7 +479,6 @@
 *                     EFAULT: Channel status is besides the status definded in 
 *                             dma_stat_ch_t.
 *                             p_ch_setup is NULL.
-*                             Wait semaphore failed.
 * Return Value : ESUCCESS -
 *                  Operation successful.
 *                EERROR -
@@ -593,13 +492,12 @@
 {
     int_t            retval = ESUCCESS;
     dma_info_ch_t    *dma_info_ch;
-    int_t            sem_wait_status;
-    osStatus         sem_release_status;
     int_t            error_code;
     uint32_t         cfg_table_count;
     dma_ch_cfg_t     ch_cfg_set_table;
     uint32_t         set_reqd;
     bool_t           check_table_flag;
+    int_t            was_masked;
     
     /* Resouce Configure Set Table */
     static const dma_ch_cfg_t ch_cfg_table[DMA_CH_CONFIG_TABLE_NUM] =
@@ -635,23 +533,23 @@
         {DMA_RS_IEBBTD,     CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_EDGE,  CHCFG_SET_REQD_SRC  },
         {DMA_RS_IEBBTV,     CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_EDGE,  CHCFG_SET_REQD_SRC  },
         {DMA_RS_IREADY,     CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
-        {DMA_RS_FLDT,       CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_REQD_UNDEFINED},
+        {DMA_RS_FLDT,       CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_REQD_UNDEFINED},
         {DMA_RS_SDHI_0T,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
         {DMA_RS_SDHI_0R,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
         {DMA_RS_SDHI_1T,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
         {DMA_RS_SDHI_1R,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
         {DMA_RS_MMCT,       CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
         {DMA_RS_MMCR,       CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
-        {DMA_RS_SSITXI0,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
-        {DMA_RS_SSIRXI0,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
-        {DMA_RS_SSITXI1,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
-        {DMA_RS_SSIRXI1,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
-        {DMA_RS_SSIRTI2,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_REQD_UNDEFINED},
-        {DMA_RS_SSITXI3,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
-        {DMA_RS_SSIRXI3,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
-        {DMA_RS_SSIRTI4,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_REQD_UNDEFINED},
-        {DMA_RS_SSITXI5,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
-        {DMA_RS_SSIRXI5,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
+        {DMA_RS_SSITXI0,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
+        {DMA_RS_SSIRXI0,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
+        {DMA_RS_SSITXI1,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
+        {DMA_RS_SSIRXI1,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
+        {DMA_RS_SSIRTI2,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_REQD_UNDEFINED},
+        {DMA_RS_SSITXI3,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
+        {DMA_RS_SSIRXI3,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
+        {DMA_RS_SSIRTI4,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_REQD_UNDEFINED},
+        {DMA_RS_SSITXI5,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
+        {DMA_RS_SSIRXI5,    CHCFG_SET_AM_BUS_CYCLE, CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
         {DMA_RS_SCUTXI0,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
         {DMA_RS_SCURXI0,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_SRC  },
         {DMA_RS_SCUTXI1,    CHCFG_SET_AM_LEVEL,     CHCFG_SET_LVL_LEVEL, CHCFG_SET_REQD_DST  },
@@ -826,24 +724,16 @@
                 }
             }
             
+            /* disable all irq */
+#if defined (__ICCARM__)
+            was_masked = __disable_irq_iar();
+#else
+            was_masked = __disable_irq();
+#endif    
+
             if (ESUCCESS == retval)
             {
                 dma_info_ch = DMA_GetDrvChInfo(channel);
-                /* start semaphore wait forever */
-                /* check carrying out on the task (0) */
-                if (0 == R_ExceptionalMode())
-                {
-                    /* ->MISRA 10.6, osWaitForever is defined by the header got from related section*/ 
-                    sem_wait_status = osSemaphoreWait(dma_info_ch->sem_ch, osWaitForever);
-                    /* <-MISRA 10.6 */
-                    /* semaphore error check */
-                    if ((-1) == sem_wait_status)
-                    {
-                        /* set error return value */
-                        retval = EERROR;
-                        DMA_SetErrCode(EFAULT, p_errno);
-                    }
-                }
                 
                 if (ESUCCESS == retval)
                 {
@@ -876,21 +766,13 @@
                         }
                         DMA_SetErrCode(error_code, p_errno);
                     }
-                    /* semaphore release */
-                    /* check carrying out on the task (0) */
-                    if (0 == R_ExceptionalMode())
-                    {
-                        sem_release_status = osSemaphoreRelease(dma_info_ch->sem_ch);
-                        /* semaphore error check */
-                        if (osOK != sem_release_status)
-                        {
-                            /* set error return value */
-                            retval = EERROR;
-                            DMA_SetErrCode((int_t)sem_release_status, p_errno);
-                        }
-                    }
                 }
             }
+
+            if (0 == was_masked)
+            {
+                __enable_irq();
+            }
         }
         else
         {
@@ -907,7 +789,6 @@
     }
     
     return retval;
-    
 }
 
 /******************************************************************************
@@ -926,7 +807,6 @@
 *                  Pointer of error code.
 *                  When pointer is NULL, it isn't set error code.
 *                  error code -
-*                     OS error num : Semaphore release failed.
 *                     EBADF : Channel status is DMA_CH_INIT.
 *                     EINVAL : Value of the ch is outside the range of 
 *                              (-1) < ch < (DMA_CH_NUM + 1).
@@ -936,7 +816,6 @@
 *                     EFAULT: Channel status is besides the status definded in 
 *                             dma_stat_ch_t.
 *                             p_dma_data is NULL.
-*                             Wait semaphore release.
 * Return Value : ESUCCESS -
 *                  Operation successful.
 *                EERROR -
@@ -950,12 +829,18 @@
 {
     int_t          retval = ESUCCESS;
     dma_info_ch_t  *dma_info_ch;
-    int_t          sem_wait_status;
-    osStatus       sem_release_status;
     int_t          error_code;
+    int_t          was_masked;
     
     DMA_SetErrCode(ESUCCESS, p_errno);
     
+    /* disable all irq */
+#if defined (__ICCARM__)
+    was_masked = __disable_irq_iar();
+#else
+    was_masked = __disable_irq();
+#endif    
+
     /* check channel of argument */
     if ((0 <= channel) && (channel < DMA_CH_NUM))
     {
@@ -973,21 +858,6 @@
             if (ESUCCESS == retval)
             {
                 dma_info_ch = DMA_GetDrvChInfo(channel);
-                /* start semaphore wait forever */
-                /* check carrying out on the task (0) */
-                if (0 == R_ExceptionalMode())
-                {
-                    /* ->MISRA 10.6, osWaitForever is defined by the header got from related section*/ 
-                    sem_wait_status = osSemaphoreWait(dma_info_ch->sem_ch, osWaitForever);
-                    /* <-MISRA 10.6 */
-                    /* semaphore error check */
-                    if ((-1) == sem_wait_status)
-                    {
-                        /* set error return value */
-                        retval = EERROR;
-                        DMA_SetErrCode(EFAULT, p_errno);
-                    }
-                }
                 
                 if (ESUCCESS == retval)
                 {
@@ -1025,19 +895,6 @@
                         }
                         DMA_SetErrCode(error_code, p_errno);
                     }
-                    /* semaphore release */
-                    /* check carrying out on the task (0) */
-                    if (0 == R_ExceptionalMode())
-                    {
-                        sem_release_status = osSemaphoreRelease(dma_info_ch->sem_ch);
-                        /* semaphore error check */
-                        if (osOK != sem_release_status)
-                        {
-                            /* set error return value */
-                            retval = EERROR;
-                            DMA_SetErrCode((int_t)sem_release_status, p_errno);
-                        }
-                    }
                 }
             }
         }
@@ -1055,8 +912,12 @@
         DMA_SetErrCode(EINVAL, p_errno);        
     }
     
+    if (0 == was_masked)
+    {
+        __enable_irq();
+    }
+
     return retval;
-    
 }
 
 /******************************************************************************
@@ -1075,7 +936,6 @@
 *                  Pointer of error code.
 *                  When pointer is NULL, it isn't set error code.
 *                  error code -
-*                     OS error num : Semaphore release failed.
 *                     EBADF : Channel status is DMA_CH_INIT.
 *                     EINVAL : Value of the ch is outside the range of 
 *                              (-1) < ch < (DMA_CH_NUM + 1).
@@ -1085,7 +945,6 @@
 *                     EFAULT: Channel status is besides the status definded in 
 *                             dma_stat_ch_t.
 *                             p_dma_data is NULL.
-*                             Wait semaphore failed.
 * Return Value : ESUCCESS -
 *                  Operation successful.
 *                EERROR -
@@ -1099,12 +958,18 @@
 {
     int_t          retval = ESUCCESS;
     dma_info_ch_t  *dma_info_ch;
-    int_t          sem_wait_status;
-    osStatus       sem_release_status;
     int_t          error_code;
+    int_t          was_masked;
     
     DMA_SetErrCode(ESUCCESS, p_errno);
     
+    /* disable all irq */
+#if defined (__ICCARM__)
+    was_masked = __disable_irq_iar();
+#else
+    was_masked = __disable_irq();
+#endif    
+
     /* check channel of argument */
     if ((0 <= channel) && (channel < DMA_CH_NUM))
     {
@@ -1122,21 +987,6 @@
             if (ESUCCESS == retval)
             {
                 dma_info_ch = DMA_GetDrvChInfo(channel);
-                /* check carrying out on the task (0) */
-                if (0 == R_ExceptionalMode())
-                {
-                    /* start semaphore wait forever */
-                    /* ->MISRA 10.6, osWaitForever is defined by the header got from related section*/ 
-                    sem_wait_status = osSemaphoreWait(dma_info_ch->sem_ch, osWaitForever);
-                    /* <-MISRA 10.6 */
-                    /* semaphore error check */
-                    if ((-1) == sem_wait_status)
-                    {
-                        /* set error return value */
-                        retval = EERROR;
-                        DMA_SetErrCode(EFAULT, p_errno);
-                    }
-                }
                     
                 if (ESUCCESS == retval)
                 {
@@ -1175,20 +1025,6 @@
                         }
                         DMA_SetErrCode(error_code, p_errno);
                     }
-
-                    /* check carrying out on the task (0) */
-                    if (0 == R_ExceptionalMode()) 
-                    {
-                        /* semaphore release */
-                        sem_release_status = osSemaphoreRelease(dma_info_ch->sem_ch);
-                        /* semaphore error check */
-                        if (osOK != sem_release_status)
-                        {
-                            /* set error return value */
-                            retval = EERROR;
-                            DMA_SetErrCode((int_t)sem_release_status, p_errno);
-                        }
-                    }
                 }
             }
         }
@@ -1206,8 +1042,12 @@
         DMA_SetErrCode(EINVAL, p_errno);        
     }
     
+    if (0 == was_masked)
+    {
+        __enable_irq();
+    }
+
     return retval;
-    
 }
 
 /******************************************************************************
@@ -1226,7 +1066,6 @@
 *                  Pointer of error code.
 *                  When pointer is NULL, it isn't set error code.
 *                  error code -
-*                     OS error num : Semaphore release failed.
 *                     EBADF : Channel status is DMA_CH_INIT or DMA_CH_OPEN.
 *                             (DMA stopped)
 *                     EINVAL : Value of the ch is outside the range of 
@@ -1235,7 +1074,6 @@
 *                     EFAULT: Channel status is besides the status definded in 
 *                             dma_stat_ch_t.
 *                             p_remain is NULL.
-*                             Wait semaphhore failed.
 * Return Value : ESUCCESS -
 *                  Operation successful.
 *                EERROR -
@@ -1248,12 +1086,18 @@
 {
     int_t          retval = ESUCCESS;
     dma_info_ch_t  *dma_info_ch;
-    int_t          sem_wait_status;
-    osStatus       sem_release_status;
     int_t          error_code;
+    int_t          was_masked;
     
     DMA_SetErrCode(ESUCCESS, p_errno);
     
+    /* disable all irq */
+#if defined (__ICCARM__)
+    was_masked = __disable_irq_iar();
+#else
+    was_masked = __disable_irq();
+#endif    
+
     /* check channel of argument */
     if ((0 <= channel) && (channel < DMA_CH_NUM))
     {
@@ -1262,21 +1106,6 @@
         {
             dma_info_ch = DMA_GetDrvChInfo(channel);
             
-            if (0 == R_ExceptionalMode())
-            {
-                /* start semaphore wait forever */
-                /* ->MISRA 10.6, osWaitForever is defined by the header got from related section*/ 
-                sem_wait_status = osSemaphoreWait(dma_info_ch->sem_ch, osWaitForever);
-                /* <-MISRA 10.6 */
-                /* semaphore error check */
-                if ((-1) == sem_wait_status)
-                {
-                    /* set error return value */
-                    retval = EERROR;
-                    DMA_SetErrCode(EFAULT, p_errno);
-                }
-            }
-            
             if (ESUCCESS == retval)
             {
                 if (DMA_CH_TRANSFER == dma_info_ch->ch_stat)
@@ -1308,19 +1137,6 @@
                     }
                     DMA_SetErrCode(error_code, p_errno);
                 }
-                
-                if (0 == R_ExceptionalMode())
-                {
-                    /* semaphore release */
-                    sem_release_status = osSemaphoreRelease(dma_info_ch->sem_ch);
-                    /* semaphore error check */
-                    if (osOK != sem_release_status)
-                    {
-                        /* set error return value */
-                        retval = EERROR;
-                        DMA_SetErrCode((int_t)sem_release_status, p_errno);
-                    }
-                }
             }
         }
         else
@@ -1337,6 +1153,11 @@
         DMA_SetErrCode(EINVAL, p_errno);
     }
     
+    if (0 == was_masked)
+    {
+        __enable_irq();
+    }
+
     return retval;
 }
 
--- a/RenesasBSP/drv_src/dma/dma_ver.c	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/drv_src/dma/dma_ver.c	Tue Aug 18 04:00:49 2015 +0000
@@ -22,8 +22,8 @@
 *******************************************************************************/
 /**************************************************************************//**
 * @file         dma_ver.c
-* $Rev: 1070 $
-* $Date:: 2014-08-21 14:04:31 +0900#$
+* $Rev: 1645 $
+* $Date:: 2015-05-21 10:35:06 +0900#$
 * @brief        DMA Driver get verion function
 ******************************************************************************/
 
@@ -39,7 +39,7 @@
 
 /* Ex. V2.12 -> MAJOR=2, MINOR=12 */
 #define DMA_DRV_VER_MAJOR  (2u)
-#define DMA_DRV_VER_MINOR  (1u)
+#define DMA_DRV_VER_MINOR  (2u)
 
 #define DMA_DRV_VER_MASK   (0xFFu)
 #define DMA_DRV_VER_SHIFT  (8u)
--- a/RenesasBSP/drv_src/ioif/aioif.c	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/drv_src/ioif/aioif.c	Tue Aug 18 04:00:49 2015 +0000
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- * $Rev: 891 $
+ * $Rev: 1674 $
  * $Date: 2012-12-18 11:09:19 +0900#$
  *
  * Description : ITRON support functions for IOIF Asynchronous I/O header file
@@ -23,6 +23,10 @@
 #endif
 #include <misratypes.h>
 #include "bsp_drv_cmn.h"
+#if defined (__ICCARM__)
+#include <intrinsics.h>
+#include "Renesas_RZ_A1.h"
+#endif
 
 /*************************************************************************
  OS Resources
@@ -43,7 +47,11 @@
     }
     else if (ahf->flags & AHF_LOCKINT)
     {
+#if defined (__ICCARM__)
+        ahf->saved_int_mask = __disable_irq_iar();
+#else
         ahf->saved_int_mask = __disable_irq();
+#endif
     }
     else
     {
@@ -85,6 +93,9 @@
 {
     osMutexDef_t* p_mutex_def;
     uint32_t*     p_mutex_data;
+#if defined (__GNUC__)
+    int_t was_masked;
+#endif/*__GNUC__*/
 
     if (ahf == NULL)
     {
@@ -98,15 +109,48 @@
     /* create the mutex if required */
     if (f & AHF_CREATESEM)
     {
+#if defined (__GNUC__)
+        /* disable all irq */
+        was_masked = __disable_irq();
+#endif/*__GNUC__*/
         p_mutex_def = calloc(1, sizeof(osMutexDef_t));
+#if defined (__GNUC__)
+        if (0 == was_masked)
+        {
+            /* enable all irq */
+            __enable_irq();
+        }
+#endif/*__GNUC__*/
         if ( NULL == p_mutex_def )
         {
             return ENOMEM;
         }
+#if defined (__GNUC__)
+        /* disable all irq */
+        was_masked = __disable_irq();
+#endif/*__GNUC__*/
         p_mutex_data = calloc(3, sizeof(uint32_t));
+#if defined (__GNUC__)
+        if (0 == was_masked)
+        {
+            /* enable all irq */
+            __enable_irq();
+        }
+#endif/*__GNUC__*/
         if ( NULL == p_mutex_data )
         {
+#if defined (__GNUC__)
+            /* disable all irq */
+            was_masked = __disable_irq();
+#endif/*__GNUC__*/
             free(p_mutex_def);
+#if defined (__GNUC__)
+            if (0 == was_masked)
+            {
+                /* enable all irq */
+                __enable_irq();
+            }
+#endif/*__GNUC__*/
             return ENOMEM;
         }
         p_mutex_def->mutex = p_mutex_data;
@@ -114,8 +158,19 @@
         ahf->semid = osMutexCreate (p_mutex_def);
         if ( NULL == ahf->semid )
         {
+#if defined (__GNUC__)
+            /* disable all irq */
+            was_masked = __disable_irq();
+#endif/*__GNUC__*/
             free(p_mutex_data);
             free(p_mutex_def);
+#if defined (__GNUC__)
+            if (0 == was_masked)
+            {
+                /* enable all irq */
+                __enable_irq();
+            }
+#endif/*__GNUC__*/
             return ENOMEM;
         }
     }
@@ -136,6 +191,10 @@
 ***********************************************************************************/
 void ahf_destroy (AHF_S const * const ahf)
 {
+#if defined (__GNUC__)
+    int_t was_masked;
+#endif/*__GNUC__*/
+
     if (ahf == NULL)
     {
         return; 
@@ -144,8 +203,19 @@
     if (ahf->flags & AHF_CREATESEM)
     {
         osMutexDelete (ahf->semid);
+#if defined (__GNUC__)
+        /* disable all irq */
+        was_masked = __disable_irq();
+#endif/*__GNUC__*/
         free(ahf->p_cmtx->mutex);
         free(ahf->p_cmtx);
+#if defined (__GNUC__)
+        if (0 == was_masked)
+        {
+            /* enable all irq */
+            __enable_irq();
+        }
+#endif/*__GNUC__*/
     }
 }
 
--- a/RenesasBSP/drv_src/ssif/ssif.c	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/drv_src/ssif/ssif.c	Tue Aug 18 04:00:49 2015 +0000
@@ -23,8 +23,8 @@
 
 /*******************************************************************************
 * File Name   : ssif.c
-* $Rev: 891 $
-* $Date:: 2014-06-27 10:40:52 +0900#$
+* $Rev: 1674 $
+* $Date:: 2015-05-29 16:35:57 +0900#$
 * Description : SSIF driver functions
 ******************************************************************************/
 
@@ -242,6 +242,7 @@
     int_t ercd = ESUCCESS;
     int_t was_masked;
     uint32_t ssif_ch;
+    volatile uint8_t dummy_buf;
 
     if (NULL == p_info_ch)
     {
@@ -278,11 +279,16 @@
             /* enable the SSIF clock */
             if (ESUCCESS == ercd)
             {
+#if defined (__ICCARM__)
+                was_masked = __disable_irq_iar();
+#else
                 was_masked = __disable_irq();
+#endif
 
                 /* ->IPA R2.4.2 : This is implicit type conversion that doesn't have bad effect on writing to 8bit register. */
                 CPGSTBCR11 &= (uint8_t)~((uint8_t)gb_cpg_stbcr_bit[ssif_ch]);
                 /* <-IPA R2.4.2 */
+                dummy_buf = CPGSTBCR11;
 
                 if (0 == was_masked)
                 {
@@ -360,7 +366,11 @@
             g_ssireg[ssif_ch]->SSISR = 0u; /* ALL CLEAR */
 
             /* disable ssif clock */
+#if defined (__ICCARM__)
+            was_masked = __disable_irq_iar();
+#else
             was_masked = __disable_irq();
+#endif
 
             /* ->IPA R2.4.2 : This is implicit type conversion that doesn't have bad effect on writing to 8bit register. */
             CPGSTBCR11 |= (uint8_t)gb_cpg_stbcr_bit[ssif_ch];
@@ -863,7 +873,11 @@
 
         SSIF_DisableErrorInterrupt(ssif_ch);
 
+#if defined (__ICCARM__)
+        was_masked = __disable_irq_iar();
+#else
         was_masked = __disable_irq();
+#endif
 
         /* delete the tx queue */
         ahf_cancelall(&p_info_ch->tx_que);
@@ -1043,7 +1057,11 @@
         g_ssireg[ssif_ch]->SSITDMR = ((uint32_t)(p_info_ch->tdm_mode) << SSIF_TDMR_SHIFT_TDM);
 
         /* change SNCR register: enter exclusive */
+#if defined (__ICCARM__)
+        was_masked = __disable_irq_iar();
+#else
         was_masked = __disable_irq();
+#endif
 
         if ((SSIF_CFG_ENABLE_NOISE_CANCEL == p_info_ch->noise_cancel)
             && (false != p_info_ch->slave_mode))
@@ -1402,7 +1420,11 @@
     };
 
     /* change register: enter exclusive */
+#if defined (__ICCARM__)
+    was_masked = __disable_irq_iar();
+#else
     was_masked = __disable_irq();
+#endif
 
     /* SW Reset ON */
     /* ->IPA R2.4.2 : This is implicit type conversion that doesn't have bad effect on accessing to 8bit register. */
--- a/RenesasBSP/drv_src/ssif/ssif_cfg.c	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/drv_src/ssif/ssif_cfg.c	Tue Aug 18 04:00:49 2015 +0000
@@ -23,8 +23,8 @@
 
 /*******************************************************************************
 * File Name   : ssif_cfg.c
-* $Rev: 891 $
-* $Date:: 2014-06-27 10:40:52 +0900#$
+* $Rev: 1674 $
+* $Date:: 2015-05-29 16:35:57 +0900#$
 * Description : SSIF driver userown functions
 ******************************************************************************/
 
@@ -108,7 +108,11 @@
     int_t ercd = ESUCCESS;
     int_t was_masked;
 
+#if defined (__ICCARM__)
+    was_masked = __disable_irq_iar();
+#else
     was_masked = __disable_irq();
+#endif
 
     /* -> IPA R2.4.2 : This is implicit type conversion that doesn't have bad effect on writing to 16bit register. */
     switch (ssif_ch)
--- a/RenesasBSP/drv_src/ssif/ssif_dma.c	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/drv_src/ssif/ssif_dma.c	Tue Aug 18 04:00:49 2015 +0000
@@ -23,8 +23,8 @@
 
 /*******************************************************************************
 * File Name   : ssif_dma.c
-* $Rev: 891 $
-* $Date:: 2014-06-27 10:40:52 +0900#$
+* $Rev: 1645 $
+* $Date:: 2015-05-21 10:35:06 +0900#$
 * Description : SSIF driver DMA functions
 ******************************************************************************/
 
--- a/RenesasBSP/drv_src/ssif/ssif_ver.c	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/drv_src/ssif/ssif_ver.c	Tue Aug 18 04:00:49 2015 +0000
@@ -22,8 +22,8 @@
 *******************************************************************************/
 /**************************************************************************//**
 * @file         ssif_ver.c
-* $Rev: 1070 $
-* $Date:: 2014-08-21 14:04:31 +0900#$
+* $Rev: 1645 $
+* $Date:: 2015-05-21 10:35:06 +0900#$
 * @brief        SSIF Driver get verion function
 ******************************************************************************/
 
--- a/RenesasBSP/version.txt	Tue Jul 21 01:48:39 2015 +0000
+++ b/RenesasBSP/version.txt	Tue Aug 18 04:00:49 2015 +0000
@@ -1,1 +1,1 @@
-V2.02
\ No newline at end of file
+V2.03
\ No newline at end of file
--- a/api/R_BSP_Ssif.h	Tue Jul 21 01:48:39 2015 +0000
+++ b/api/R_BSP_Ssif.h	Tue Aug 18 04:00:49 2015 +0000
@@ -58,6 +58,14 @@
      */
     virtual ~R_BSP_Ssif();
 
+    /** Get a value of SSIF channel number
+     *
+     * @return SSIF channel number
+     */
+    int32_t GetSsifChNo(void) {
+        return ssif_ch;
+    };
+
     /** Save configuration to the SSIF driver
      *
      * @param p_ch_cfg SSIF channel configuration parameter
--- a/common/R_BSP_Ssif.cpp	Tue Jul 21 01:48:39 2015 +0000
+++ b/common/R_BSP_Ssif.cpp	Tue Aug 18 04:00:49 2015 +0000
@@ -52,7 +52,7 @@
         ssif_cfg.serial_alignment       = SSIF_CFG_DATA_FIRST;
         ssif_cfg.parallel_alignment     = SSIF_CFG_LEFT;
         ssif_cfg.ws_delay               = SSIF_CFG_DELAY;
-        ssif_cfg.noise_cancel           = SSIF_CFG_DISABLE_NOISE_CANCEL;
+        ssif_cfg.noise_cancel           = SSIF_CFG_ENABLE_NOISE_CANCEL;
         ssif_cfg.tdm_mode               = SSIF_CFG_DISABLE_TDM;
         ssif_cfg.romdec_direct.mode     = SSIF_CFG_DISABLE_ROMDEC_DIRECT;
         ssif_cfg.romdec_direct.p_cbfunc = NULL;
--- a/tools/ssif_api.c	Tue Jul 21 01:48:39 2015 +0000
+++ b/tools/ssif_api.c	Tue Aug 18 04:00:49 2015 +0000
@@ -90,12 +90,10 @@
     {P3_7   , 1    , 3},
     {P7_3   , 1    , 6},
     {P10_14 , 1    , 2},
-    {P10_14 , 1    , 2},
     {P7_7   , 2    , 6},  /* SSIDATA2 */
     {P9_7   , 2    , 3},  /* SSIDATA2 */
     {P4_14  , 3    , 6},
     {P7_10  , 3    , 2},
-    {P7_10  , 3    , 2},
     {P6_1   , 4    , 6},  /* SSIDATA4 */
     {P7_14  , 4    , 2},  /* SSIDATA4 */
     {P8_14  , 4    , 8},  /* SSIDATA4 */