Re: Zephyr nRF52840 USBD driver development: EPSTATUS vs EPDATASTATUS register


Sundar Subramaniyan
 

Hi Andrzej,

I'll make it read the EPDATASTATUS register alone for bulk/interrupt in that case.
Thanks for the clarification.

Sundar

On Mon, Jan 29, 2018 at 2:34 PM, Głąbek, Andrzej <Andrzej.Glabek@...> wrote:

Hi Sundar,

 

The EPDATASTATUS register is the one that you should examine after getting the EPDATA event (our USB expert has confirmed this).

nRF52840 documentation is a bit imprecise in this regard in section 51.10.2.

 

Best regards,

Andrzej

 

 

From: zephyr-devel-bounces@lists.zephyrproject.org [mailto:zephyr-devel-bounces@lists.zephyrproject.org] On Behalf Of Sundar Subramaniyan
Sent: Saturday, January 27, 2018 5:13 PM
To: zephyr-devel@lists.zephyrproject.org
Subject: [Zephyr-devel] Zephyr nRF52840 USBD driver development: EPSTATUS vs EPDATASTATUS register

 

Hi,

I'm developing a driver for USB device controller on nRF52840. I came across the BULK/INTERRUPT section in the datasheet and have some doubts.
My question is about the significance of EPSTATUS and EPDATASTATUS registers.

In Section 51.10.2 from the nRF52840 datasheet, it's mentioned that EPSTATUS register gets set when EPDATA event happens on one of the BULK/Interrupt OUT endpoint.

Here's the excerpt:
"Upon receiving the next OUT + DATA transaction, an ACK handshake
is returned to the host while a EPDATA event is sent (and EPSTATUS register flags set to indicate on which
endpoint this happened), and once the EasyDMA is prepared and enabled through writing the EPOUT[n]
registers and sending the STARTEPOUT[n] task, the incoming data will be transferred to Data RAM."

 

But according to section 51.13.23, EPSTATUS notifies only about the capture of EasyDMA registers. There's no mention about acknowledged data transfer on the USB bus.
Per section 51.13.24, the EPDATASTATUS register is the one that tells if there's an acknowledged DATA transfer on the USB bus.

So when a EPDATA event occurs, should I be reading EPSTATUS and EPDATASTATUS registers and infer which endpoint the event happened depending on the context/type of data exchange?
Could anyone please clarify?

Thanks in advance.

Sundar


Join devel@lists.zephyrproject.org to automatically receive all group messages.