Recent Posts

Pages: [1] 2 3 ... 10
1
USB / Re: Interfacing NAND Flash to USB Driver
« Last post by Jan Axelson on March 23, 2017, 01:50:59 pm »
I'm not sure I understand your question.

A SCSI READ command will request a number of bytes. In the data transport phase, the device returns the data, using as many transactions as needed. Each transaction begins with an IN token packet from the host, and the device responds with data or NAK if new data isn't yet ready to send. The amount of data in each transaction depends on the MaxPacketSize specified in the endpoint's descriptor.
2
USB / Re: Interfacing NAND Flash to USB Driver
« Last post by Harish on March 23, 2017, 09:24:04 am »
It means can I send the data of 10kb in terms of 2kb, after 10kb sent send acknowledge.
Will it work like this?

Or any easy method to do it.
3
USB / Re: Interfacing NAND Flash to USB Driver
« Last post by Jan Axelson on March 22, 2017, 12:07:42 pm »
A bulk IN endpoint should be set to return NAK at all times except when there is new data ready to go out in the endpoint's buffer. On receiving NAK, the host will try again, multiple times if needed.

So yes, if the host sends a SCSI command to request data, the device should accept the command and prepare the IN endpoint to send the data. Typically, the device triggers an interrupt AFTER the IN endpoint sends data so it can prepare to refill the buffer if needed.

4
USB / Re: Interfacing NAND Flash to USB Driver
« Last post by Harish on March 22, 2017, 09:29:41 am »
As SCSI states are called from Interrupt and If reading flash is taking more time interrupt will halt other tasks.
I thought we can send NAK and get another interrupt from host but its not working.

Can you help me in how to handle this situation?

In a way i have to get the logical address and length first and exit the ISR.
Later when I read the NAND flash for that data. I have to respond host.
5
USB / Re: Interfacing NAND Flash to USB Driver
« Last post by Jan Axelson on March 21, 2017, 11:44:38 am »
How to configure the endpoints is specific to the device architecture.

See section 15.6.3 in the user guide you linked to in your original question.
6
USB / Re: Interfacing NAND Flash to USB Driver
« Last post by Harish on March 21, 2017, 12:36:14 am »
Reading from NAND Flash takes lot of time. To read 1 page it takes 250micro seconds and to get the length of 64kbytes it takes 7.6ms.
So when host asks for data, I would like to send NACK (say data is not ready) then when data is ready I send data and then ACK.

I would like to know how to send NAK to host from device?

Thank you!!
7
USB / Re: HID. Severale issues
« Last post by Jan Axelson on March 16, 2017, 10:46:45 am »
One reason why a device doesn't enumerate every time is timing issues with the control requests.

Assuming USB 2.0, the control endpoint MUST return ACK in the Setup stage, and must return data, ACK, NAK, or NYET as appropriate in the Data and Status stages that follow (or STALL for unsupported request).

A hardware-based protocol analyzer will show any errors. If you don't have a protocol analyzer, use whatever debugging tools you have to try to determine if the control endpoint is responding to every received token packet.

The same is true for IN and OUT endpoints.   

When this is the case, the fault is not with the host or hub, but with device firmware that is not complying with the spec.

8
USB / Re: HID. Severale issues
« Last post by bpaddock on March 16, 2017, 08:58:21 am »
Does your test machine have any hubs made by different manufactures?
Does the device behave differently on different hub?

I've personally run into having AVR sample code work fine on an Intel hub and be flaky on NEC hub both in the same PC.

Someone recently reported this on the NXP Kinetis forum:

"It is actually not OS related but it seems that the KL27Z has
issues with certain PC host hubs. Specifically, the KL27Z seems to
always work with Intel 8 C220 host hubs (across multiple OS's) and it
never works with the KL27Z on Intel 6 C200 host hubs. However, it
always to connects if I go through an unpowered USB hub, regardless of
the PC's host hub."

Jan, do you have an insight to these kind of problems?

9
USB / HID. Severale issues
« Last post by puppdn on March 15, 2017, 01:57:49 pm »
Hi Jan!
Well I need help again.
Now my device recognize by Windows 7 x64 but sometimes it's not.
1 of  5 attempt is succesful. Otherwise Windows cant't recognize device (In device manager - unknown device) or Windows recognize device, but device manger appears that: "This device cannot start." (error Code 10).

And second.
If device succesfull recognized I can read and write data. (Find device, get handle by createfile(), then readfile() and writefile())
After approximate 20+ successfull attempt to writefile()-readfile() client program is hang  OR whole OS Windows is hang. Mouse not move, ctrl+alt+del not working. Only RESET is helpful. USB host conroller goes crazy& Why&

10
USB / Re: WinUSB device with DFU and bulk
« Last post by Jan Axelson on March 10, 2017, 08:43:10 pm »
DFU support has no relation to the number and type of endpoints an interface can support in runtime mode.

Pages: [1] 2 3 ... 10