How to determine that the read operation has been completed

Post Reply
shengwenLiang
Posts: 46
Joined: Thu Jul 06, 2017 12:57 pm

How to determine that the read operation has been completed

Post by shengwenLiang » Tue May 15, 2018 5:31 am

Hi,
Recently, I add a command to firmware, the command aims to read data from NAND flash to the specified address of dram. and now I find when I send this command to OpenSSD, but I can't determine that the read operation has been completed. I only compute this time by using the throughout of NAND flash channel(171MB/s), but from my test, I find this method not always work.
So, could you tell me how to determine that read operation has been completed?
Thanks.

KibinPark
Posts: 47
Joined: Thu Mar 30, 2017 9:25 am

Re: How to determine that the read operation has been completed

Post by KibinPark » Tue May 15, 2018 2:33 pm

You can poll a status of the NAND way via ReadStatus command or the completion via reading a completion field given with ReadPageTransfer command.

ref:
V2FReadPageTransferAsync(V2FMCRegisters* dev, int way, void* pageDataBuffer, void* spareDataBuffer, unsigned int* errorInformation, unsigned int* completion, unsigned int rowAddress);

Check whether (*completion & 1) is 1.

shengwenLiang
Posts: 46
Joined: Thu Jul 06, 2017 12:57 pm

Re: How to determine that the read operation has been completed

Post by shengwenLiang » Wed May 16, 2018 1:09 am

KibinPark wrote:
Tue May 15, 2018 2:33 pm
You can poll a status of the NAND way via ReadStatus command or the completion via reading a completion field given with ReadPageTransfer command.

ref:
V2FReadPageTransferAsync(V2FMCRegisters* dev, int way, void* pageDataBuffer, void* spareDataBuffer, unsigned int* errorInformation, unsigned int* completion, unsigned int rowAddress);

Check whether (*completion & 1) is 1.
Thanks for your reply, and now, in my project, I take this method. when I push the V2FCommand_ReadPageTrigger command to ReqQueue, than I execute the EmptyReqQ() function.

handle_nvme_vendor_process(nvmeCmd->cmdSlotTag, nvmeIOCmd);
EmptyReqQ();

The first line similar to read operation process.

I wonder if there is any problem that I take this method.

Thanks

KibinPark
Posts: 47
Joined: Thu Mar 30, 2017 9:25 am

Re: How to determine that the read operation has been completed

Post by KibinPark » Wed May 16, 2018 1:36 am

I think there is no problem at all.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests