This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

[Bug] nrf_qspi_cinstrdata_get didn't collect data from both CINSTRDAT1 and CINSTRDAT0

The function nrf_qspi_cinstrdata_get has logic bug that didn't combine data from both register

https://github.com/NordicSemiconductor/nrfx/blob/master/hal/nrf_qspi.h#L702

e.g if the length = 6, it will go into the first switch, get the first byte from CINSTRDAT1. The next switch that got data from CINSTRDAT0 will never executed since the length is 6 (out of all cases).

Parents
  • Hi,

    Thank you for notifying us about this. It is highly appreciated! Yes, it looks like a bug, and I have registered it in our internal tracker.

    If you have a look at the corresponding ..._set() function you will see that there everything is in the same switch block, with the change of the "reg" variable halfway through the cases. I think most likely that approach would be correct for the ..._get() as well, and if not there should at least be a comment explaining why.

    Regards,
    Terje

Reply
  • Hi,

    Thank you for notifying us about this. It is highly appreciated! Yes, it looks like a bug, and I have registered it in our internal tracker.

    If you have a look at the corresponding ..._set() function you will see that there everything is in the same switch block, with the change of the "reg" variable halfway through the cases. I think most likely that approach would be correct for the ..._get() as well, and if not there should at least be a comment explaining why.

    Regards,
    Terje

Children
Related