    uint8_t temp_id[2];
    nand_read_id(temp_id);
    NRF_LOG_INFO("Read Id %x %x",temp_id[0],temp_id[1]);
//    ////nand_sw_init(&toshiba);
    NRF_LOG_INFO("Read Page");
 //   nand_page_to_cache(&toshiba,56);
//    uint8_t page_buff[NAND_PAGE_SIZE];
//    nand_read_cache(&toshiba,0,NAND_PAGE_SIZE,page_buff);
    int ok = 0, bad =0;
//    for(int i = 0;i < NAND_PAGE_SIZE;i++)
//    {
//      if(page_buff[i] != 0xFF)
//        bad++;
//      else 
//          ok++;
//        
//    }
//    NRF_LOG_INFO("Ok %d Bad %d", ok, bad);
//    nand_scan_bad_block(&toshiba);
    dhara_nand_init(&dhara_toshiba);
    uint8_t page_buff[4096];
    memset(page_buff,'a',4096);
    //Check buffer write
    nand_write_enable(&toshiba);
    nand_program_load(&toshiba,4096,page_buff);
    nand_program_execute(&toshiba,673);
    memset(page_buff,0,4096);
    nand_page_to_cache(&toshiba,673);
    nand_read_cache(&toshiba,0,4096,page_buff);
    for(int i = 0; i< 4096;i++)
        {
          if(page_buff[i]=='a')
            ok++;
          else
            bad++;
        }
     NRF_LOG_INFO("Ok %d, Bad %d",ok, bad);
//    ok =0;
//     bad = 0;
//     //Check Block Erase
//     nand_reset(&toshiba);
//nand_wait_for_flash_ready(&toshiba,1000000);
//  nand_write_enable(&toshiba);
//   int status = nand_block_erase(&toshiba,45);
// Check BL bits
uint8_t feature;
 //   nand_get_feature(&toshiba,0xA0,&feature);
   // nand_get_feature(&toshiba,0xB0,&feature);
   // feature = 0x00;
  //  nand_set_feature(&toshiba,0xA0,&feature);
  //  feature = 0xFF;
  //   nand_get_feature(&toshiba,0xA0,&feature);
  //   nand_block_erase(&toshiba,45);


//    for(int i = 0; i< dhara_toshiba.num_blocks;i++)
//    {
//      if(dhara_nand_is_bad(&dhara_toshiba,i))
//      {
//          NRF_LOG_INFO("Dhara Bad Block at %d",i);
//      }
//    }
//    dhara_nand_erase(&dhara_toshiba,26,&err);
//    uint8_t page_buff[4096];
//    memset(page_buff,'b',4096);
//    dhara_nand_prog(&dhara_toshiba,12345,page_buff,&err);
//    memset(page_buff,0,4096);
//    dhara_nand_copy(&dhara_toshiba,12345,1,&err);
//    dhara_nand_read(&dhara_toshiba,1,0,4096,page_buff,&err);
    if(dhara_nand_is_free(&dhara_toshiba,1))
      NRF_LOG_INFO("Page 1 is free");
    if(dhara_nand_is_free(&dhara_toshiba,23))
    {
      NRF_LOG_INFO("23 is free");
      }
    else
    {
      NRF_LOG_INFO("23 is not free");
      }

    for (uint32_t retries = 3; retries && disk_state; --retries)
    {
        disk_state = disk_initialize(DEV_NAND);
    }
    if (disk_state)
    {
        NRF_LOG_INFO("Disk initialization failed.");
        //return;
    }
    else
    {
        NRF_LOG_INFO("Disk initialization Success.");
        //return;
    }
//    DWORD buff;
 //   disk_ioctl(DEV_NAND,GET_BLOCK_SIZE,&buff);
   //  disk_ioctl(DEV_NAND,GET_SECTOR_COUNT,&buff);
     // disk_ioctl(DEV_NAND,GET_SECTOR_SIZE,&buff);