Usb Tx succes event missed in Nordic's SDK stack

Vlad230596 gravatar image

asked 2017-06-19 16:23:56 +0100

updated 2017-06-27 15:23:41 +0100

Hi, Nordic! I have used NRF52840 and SDK 13.0.0. From Errata:

3.18 [104] USBD: EPDATA event is not always generated


Use the USB stack provided in Nordic's SDK.

We have used USB stack from latest SDK. But event "Tx success" is missed sometimes. In host side the last packet present.

What can You tell about this problem? Is this will be present in serial chips?

Update: In attachment a modified example from SDK.

  1. Open serial port in terminal.

  2. Push button 1 for begin tx transfer.

  3. Send some data from host to device.(I have pressed any key in Putty by minute)

  4. When tx transers stopped press again button 1 and look in log.(TxSuccess = TxRequested - 1; in host we can see all TxRequested transfers)

My results:tx missed event


Update 2: Rx transfer event can also missed.

edit retag flag offensive close delete report spam


Could you explain a bit more? How are you testing this? How can we reproduce it here?

Petter Myhre ( 2017-06-20 14:15:08 +0100 )editconvert to answer

On controller:

  1. start usb tx transaction

  2. in onUsbTxSuccessEvent start usb tx transaction

On host:

  1. readUsbPacket

  2. onUsbRxEvent readUsbPacket

Packets after some time are not transmitted. For example, I have made 1000 tx request and I have only 999 txSuccessEvents. If at this time make tx and rx transaction, working time decrease less then 1 minute.

Vlad Mokhnachov ( 2017-06-21 15:03:33 +0100 )editconvert to answer

Pan 104 would be corrected in the final product (actually it is corrected in the current netlist). It is really a lot of tricks inside the library to restore missed events and it was made to make it usable. During the tests we was doing rather huge amount of transfers and did not detect the situation that anything is lost (transfers up to 64 MB). Did you not disable the NRF_DRV_USBD_PROTO1_FIX_DEBUG definition from nrf_drv_usbd.c somehow?

Radosław Koppel ( 2017-06-23 09:22:59 +0100 )editconvert to answer

My defines:


Debug defenition only makes log information. If I have made only transfers from NRF to Host, it works up to 30 minutes. If I add simultaneous tx and rx transfers, it works maximum few minutes.

Vlad Mokhnachov ( 2017-06-23 10:13:04 +0100 )editconvert to answer

I have to admit I am not sure if we did test such scenario where tx and rx transfers are processed simultaneously. I would investigate it further but good information is that anyway there would not be such problem in the final chip.

Radosław Koppel ( 2017-06-23 15:50:17 +0100 )editconvert to answer

1 answer

Sort by » oldest newest most voted
Radoslaw Koppel gravatar image

answered 2017-07-17 14:00:06 +0100

I have tested the program with the newest netlist (internal pre production). After the transmission from the device was started I was able to send 50 MB of data without hang, while in the sampled chip it hangs during sending 300 KB.

I believe it was proven that the problem would not be present in final production production chip. I would leave internal task for that problem but it would have low priority and would be solved if there would be time for that.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower


Asked: 2017-06-19 16:23:56 +0100

Seen: 107 times

Last updated: juli 17 '17