nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs

NRF5340 USB SIZE.EPOUT[n] value not stable

Hi All,

I observed strange anomaly on NRF5340 (PCA10095 0.11.0 2020.52.xxxxxxxxx).

Same behavior seen on NRF52840 (PCA10056).

Value of register SIZE.EPOUT[n] does not reflect data that was received in endpoint.

Several consecutive reads from same register yield different values.

It looks like EasyDMA transfer that is in progress on different endpoint  causes problems reading unrelated SIZE.EPOUT[n] register.

Register value is valid before DMA on other endpoint is started then after DMA starts, value of register is usually 0 but sometimes some other random value that does not corresponds to any transfer.

After a while (I suspect that after DMA finishes) SIZE.EPOUT[n] is valid again.

Product specification does not mentions this behavior. I did not find any errata on that.

Do any one knows about such case?

Is there any recommendation on accessing SIZE.EPOUT registers?

Thanks for any help

Jerzy

Parents Reply
  • Thanks Håkon,

    NRFX version indeed prepares whole DMA transaction (including read from SIZE.EPOUT) after previous DMA has finished.

    Code could be written that way even if only restriction was: 'single EasyDMA transfer at a time'.

    Currently I'm just seeking confirmation about which registers can't be accessed while DMA is in progress.

    Surely some registers are not affected by running DMA but which ones can be read without problem?

    best regards

    Jerzy

Children
Related