Cycone V SOC NAND FLASH READ API issue
Hello,
This is Pushpa...
I am working on cyclone V SOC with NAND flash boot Baremetal application development. NAND boot is happening fine. I have a requirement to read NAND flash and compute the checksum of the image.
I am using the API's provided for NAND flash interface, below are the functions used by me in my program.
unsigned int WRITE_BUFFER[4096], READ_BUFFER[4096];
alt_nand_flash_init(false,false,NULL,NULL);
alt_nand_flash_page_write(0x00800000,1,WRITE_BUFFER,2048);
alt_nand_flash_page_read(0x00800000,1,READ_BUFFER,2048);
I am writing known 32 bytes checksum value into the above address and trying to read back the same. Program is going in interrupt polling loop when its executing the below function inside alt_nand_flash_page_read() function. It is getting stuck inside interrupt polling and not coming out of it and even sometimes if it comes out of this interrupt polling function also read values are 0x00 or 0xFF not the expected values.
res=alt_nand_poll_for_status_register(interrupt_status_register, ALT_NAND_INT_STATUS_TIME_OUT | ALT_NAND_INT_STATUS_LOAD_COMP);
Anything is missing out in our program???, need guidance on the same. Requesting you to provide any example for NAND flash read and write using the altera API's which may help us in resolving the issue soon.