Reading from Nand Flash in TWRK70F120M

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Reading from Nand Flash in TWRK70F120M

1,424件の閲覧回数
snehahegde
Contributor I

Hi Team,

I have a set of below parameters which I am saving into the respective blocks:

Parameter1 : Block 0

Parameter 2: Block 1 to Block 6

Parameter 3: Block 111

Parameter 4: Block 156 into Block 161

The problem I am facing here is that only when I save the parameters starting from the 4th to 1st, I am able to read them correctly on start up, else it fails to read the parameters. Please suggest the probable reason and the way this problem could be solved.

Thanks and Regards,

Sneha Hegde

0 件の賞賛
返信
2 返答(返信)

1,272件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Do you refer Freescale provides NFC demo for TWR-K70F120M board? The demo could be found at below link:

KINETIS_120MHZ_SC  : Kinetis 120MHz bare metal sample code

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=TWR-K70F120M&fpsp=1&tab=Design_Tools_...

If it is available, could you post your NFC related code here?  I could do a test on my site.


Wish it helps.
best regards
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,271件の閲覧回数
snehahegde
Contributor I

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

0 件の賞賛
返信