cyusb3014+nandflash---->u disk

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

你好,我想利用CYUSB3014加上一块NANDflash做一款U盘,遇到了一些麻烦。我将DQ0-DQ1设置为数据地址复用线,第一,我需要向flash写入8byte的命令,FX3 API中有相关函数吗?第二,我想利用GPIF状态机进行FIFO读和FIFO写,对FLASH的扇区进行读写操作,怎么控制GPIF一次进行读写512byte?第三,我应该如何设置DMA通道,既能既能解析来自HOST的UFI命令,又能进行数据的传输?
期待您能回复。

0 Likes
5 Replies
Anonymous
Not applicable

Hi,

   

For transferring 8 byte commands, you may use the GPIF register read write APIs such as CyU3PGpifWriteDataWords. Also, in order to send 512 bytes, you need to have your DMA Buffers configured for 512 bytes, Please create a Tech Support case for more guidance.

   

Regards,

   

-Madhu Sudhan

0 Likes
Anonymous
Not applicable

你好,

   

   我在开发过程中遇到了问题。我创建了一个 GPIF TO USB 的DMA通道,并设置了DMA回调函数,当数据发送完毕后,进行一些操作,然后返回继续执行程序。可是我在一个函数中void CyFxMscSendCsw () 调用了apiRetStatus = CyU3PDmaChannelSetupSendBuffer (&glChHandleMscOut, &dmaMscOutBuffer)函数后,数据发送成功,并且当数据发送完毕后进入了CyFxMscApplnDmaCb()函数执行,但是当执行完这个函数后,程序就没有再往下执行,没有返回void CyFxMscSendCsw ()这个函数继续运行。我想知道这是为什么?

   

祝好!

0 Likes
Anonymous
Not applicable

你好,

   

我已经把上面的问题解决了。dma回调函数执行完毕后不返回的原因是我设置了太多的CyU3PDebugPrint语句,串口打印速度太慢,导致程序死掉了。

0 Likes
Anonymous
Not applicable

Hi,
I want to send 8 bits command to NANDflash via GPIF, You suggest me to use CyU3PGpifWriteDataWords() function, but i note that in the FX3 firmware API Guide, it says "Please note that each data word in the buffer is expected to be padded to 32 bits. "  How can i do ? Can you give me a example code? Besides, the parameter "numWords" means how many times of 32 bits or how many times of 16 bits?
Looking forward to get a reply.
Regards,
-Feng Li

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello,
Another question I want to consult you. I want to write or read NANDflash 512 bytes every time via GPIF state machine. But I don't know how to control state machine very well. The picture is my configuration of GPIF state machine. I want to use CyU3PGpifSMSwitch() function to realize it. Is it right? How can I set the parameters to control state machine to transfer 512 bytes every time? Can you give me the example code?
Looking forward to get a reply.
Thank you very much!
Regards,
-Feng Li

0 Likes