Thanks for the link, i will check your implementation and see if i forgot to add something to mine.
This component is still under development, so any feedback will be very welcome :D
Is it really necessary -- to read register via writing 0xFF to SPI?
Is writing 0xFF to SPI does reading from slave to receive buffer?
Why Pavloven's psoc4 (scb spi) implementation works without that, just reading from SPI?
I have to dig into SPI component, how it behaves when reading slave with empty transmit buffer.
To read the content of the nRF24 registers you need to send the command+register_address, and then a (dummy) byte to get the information from the chosen register. So the second byte can be 0xFF, or 0x20, or whatever 8bit number you want.
It has been like two months that i do not work on improving the component, i almost forgot everything about the nRF24 chip.
Will check pavloven implementation again next weekend.
payload reading is performed by separate SPI command, not by register. and while you read data, you are sending data via spi.
it's a little complicated from my point of view: payload data is stored into software (component local) buffer, then it is copied to the user's buffer.
what if to add OR gate on a MOSI line with a bit from control register? then it will be possible to read payload data directly, and to configure SPI to use less FIFO buffers (say, 4 instead of 32), which are in hardware. it may lead to more compact implementation.
Well, but this is the definition of the SPI protocol. For every bit you send you get a bit back, just within the same clock cycle. That is the reason why SPI could be made so fast.
Of course you may build your own communication component that is "alike" SPI and maybe it is a bit (or even a byte ;-) faster.