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

nRF8001 Data Credit System Details

I wrote my own ACI interfacing code, so I have questions about some details of the data credit system that most devs may be insulated from by the Nordic SDK.

Section 25 of the nRF8001 Product Specification (page 133, Revision 1.2) lists 5 "data commands": SetLocalData, SendData, SendDataAck, RequestData, and SendDataNack. But of these, only SendData and SendDataNack list a DataCreditEvent as a possible return packet in their "Returned events" sections. Presumably, the remaining 3 "data commands" that cannot return data credits should NOT have credits charged against them on transmission. Is that correct?

I'm a bit suspicious of the accuracy of the documentation. In particular, it seems strange that SendDataNack would consume a credit while SendDataAck does not. And RequestData presumably involves a radio transmission as well; does it not consume a data credit?

Alone among the data commands, SetLocalData returns a regular CommandResponseEvent. And if I understand its function correctly, it cannot trigger any radio communication. Is it fair to say that SetLocalData is really just a regular command and should in no way be treated as a "data command"? That is, not only should it not be charged a data credit, but it should also block all other non-data commands until the CommandResponseEvent is received?

Parents
  • I agree that the documentation can be improved. I will add a task in the project to have a better way to communicate this and re-phrase some of the currently restrictive text.

  • I am looking into problems with my radio communication related to dropped command responses to setLocalData commands. And I found this thoughtful discussion. Like Garth, I am trying to understand exactly how the radio works so my code can be totally reliable. And while the documentation is very good considering, it doesn't answer all questions. I totally agree with Garth's point that the docs indicate system commands have to be single threaded. And it's not clear how setLocalData fits with that because it's listed as a Data command but doesn't use credits like the others. Tuning up some of these discussions in the reference manual to be clearer would be helpful. But, overall, thanks for the good documentation.

Reply
  • I am looking into problems with my radio communication related to dropped command responses to setLocalData commands. And I found this thoughtful discussion. Like Garth, I am trying to understand exactly how the radio works so my code can be totally reliable. And while the documentation is very good considering, it doesn't answer all questions. I totally agree with Garth's point that the docs indicate system commands have to be single threaded. And it's not clear how setLocalData fits with that because it's listed as a Data command but doesn't use credits like the others. Tuning up some of these discussions in the reference manual to be clearer would be helpful. But, overall, thanks for the good documentation.

Children
No Data
Related