AnsweredAssumed Answered

Unable to Read from Nand Flash in TWRK70f120M

Question asked by Sneha Hegde on Jul 7, 2014
Latest reply on Jul 9, 2014 by Carlos_Musich

Hi Team,

 

PFB the code for Reading some of the parameters from Flash:

 

CWasherFormula *pPumpAMount=NULL;

    //for(BYTE byWasherId=0; byWasherId<MAX_WASHERS;byWasherId++)

    {

      //Location=0;

      //byBlockNum=(MAX_WASHERS*2)MAX_PUMPS1+byWasherId;

      pPumpAMount=m_argpDataMgr->GetWasherFormulaPtr(0);

      if(NULL!=pPumpAMount)

      {

 

        Location=(m_dwNumOfVirtPagesPerBlock*(76));

        fseek(mpFlashPtr, Location, IO_SEEK_SET);

 

        if(sizeof(CWasherFormula)==read(mpFlashPtr,pPumpAMount,sizeof(CWasherFormula)))

        {

          m_argpDataMgr->SetWasherFormulaConfig(0,pPumpAMount);

          printf("Check ");

        }

 

      }

}

 

I have written the parameters into 76th block of Flash and reading it from the same block. But I find that the control doesn't get into the if block, which is why I am unable to set the data that is read. Kindly let me know how the issue can be resolved.

 

Thanks and Regards,

Sneha Hegde

 

Outcomes