I'm confused about the 4-bit circular counter used in the RESPONSE register. Datasheet states that the counter is incremented after each (successful) command, but there's also stated that a NOP command should be issued prior to writing to the command register.
Description for the NOP command states that it will clear the counter and any error codes residing in the response register. So I wonder how the counter should worked with if it's always cleared by the NOP command which has to be issued...
In fact the above results in counter values of 0x00 and 0x01, but then there's no need for a counter. What am I missinterpreting?
The recommendation of issuing a NOP prior to another command is to clear the response register counter and have a known value in the counter. Another option instead of using the NOP is to read the counter and store its value, then look for that value to increment after a command. However, the counter will not increment if there is an error code in the response register. Instead of getting into these details in the datasheet, it was much simpler to just recommend a NOP to always have the counter at zero (a NOP is also the only way to clear an error in the response register).
then I'll rewrite it to check for return value of 0x01 (except of RESET command) - if it's not 0x01 I'll consider it as an error.
Thanks a lot.