Hi,
Thanks for your reply. I implemented my code using the sample code given. PFB the code which I have used to open the Nand Flash.
OOL CFlashMemory::OpenFlashMemory(void)
{
intinstall_unexpected_isr();
BOOL bStatus=FALSE;
char_ptr name="nandflash:";
mpFlashPtr=NULL;
mpFlashPtr=fopen(name,NULL);
if(mpFlashPtr!=NULL)
{
//Erasing the chip before writing
//if(MQX_OK == ioctl(mpFlashPtr, NANDFLASH_IOCTL_ERASE_CHIP,NULL))
//return;
bStatus=TRUE;
m_dwBlockSize=GetBlockSize();
m_dwVirtPageSize=GetVirtPageSize();
m_dwNumOfVirtPagesPerBlock=m_dwBlockSize/m_dwVirtPageSize;
}
return bStatus;
Please let me know if I am missing out on anything. Also I would like to know if I should call the install driver function before opening the Nand Flash.
Thanks and Regards,
Sneha