Read error with RZA1H from microphone

Here is the code I am using to read the data from the microphone using SSI

 

#include "mbed.h"
#include "R_BSP_Ssif.h"
#include "sine_data_tbl.h"

//I2S send only, The upper limit of write buffer is 8.
R_BSP_Ssif ssif(P2_4, P2_5, P2_7, P2_6);

static uint32_t mydata[1000];
static void callback_ssif_read_end(void * p_data, int32_t result, void * p_app_data) {
printf("reading the bits\n");
if (result < 0) {
printf("ssif write callback error %d\n", result);
}
}

int main() {
rbsp_data_conf_t ssif_read_end_conf = {&callback_ssif_read_end, NULL};
ssif_channel_cfg_t ssif_cfg;
int32_t result;
int32_t result1;
//I2S Master, 44.1kHz, 16bit, 2ch
ssif_cfg.enabled = true;
ssif_cfg.int_level = 0x78;
ssif_cfg.slave_mode = true;
ssif_cfg.sample_freq = 3000000u;
ssif_cfg.clk_select = SSIF_CFG_CKS_AUDIO_CLK;
ssif_cfg.multi_ch = SSIF_CFG_MULTI_CH_1;
ssif_cfg.data_word = SSIF_CFG_DATA_WORD_32;
ssif_cfg.system_word = SSIF_CFG_SYSTEM_WORD_32;
//ssif_cfg.bclk_pol = SSIF_CFG_FALLING;
ssif_cfg.ws_pol = SSIF_CFG_WS_LOW;
ssif_cfg.padding_pol = SSIF_CFG_PADDING_LOW;
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.tdm_mode = SSIF_CFG_DISABLE_TDM;
// ssif_cfg.romdec_direct.mode = SSIF_CFG_DISABLE_ROMDEC_DIRECT;
//ssif_cfg.romdec_direct.p_cbfunc = NULL;
result1 = ssif.ConfigChannel(&ssif_cfg);

printf("ssif configured\n");
printf("ssif configured\n");
printf("ssif configured\n");
printf("ssif configured\n");

printf("ssif configured\n");
printf("ssif configured\n");
printf("ssif configured\n");
printf("ssif configured\n");
printf("ssif configured\n");
printf("ssif configured\n");

printf("ssif configured\n");
printf("ssif configured\n");
if (result1 < 0) {
printf("ssif config error %d\n", result);
}

while (1) {
//The upper limit of write buffer is 8.
result = ssif.read((void *)mydata,
sizeof(mydata), &ssif_read_end_conf);

printf("mydata: %d \n",&mydata);
printf("result: %d",&result);
printf("result1: %d",&result1);
if (result < 0) {
printf("ssif READ api error %d\n", result);
}
}
}

 

 

CAN SOMEBODY HELP ME WHERE AM I GOING WRONG while reading the data ?, I get error no: -74 (which is a read error)ERROR_EIO .

 

Thanks in advance