I'm still trying to finish a custom component for the nRF24 radios , i wanted to use the component on all the possible PSoCs, so i had to made it work with UDB and SCB blocks.
To test the component i did three projects (attached):
* using PSoC5LP (kit CY8CKIT-059) and SPI based on UDB blocks
* using PSoC4 (kit CY8CKIT-043) and SPI based on UDB blocks
* using PSoC4 (kit CY8CKIT-043) and SPI based on SCB blocks
So far i have no problems with the UDB projects (see nrf_udb image attached), but i'm having troubles with the SCB implementation (see nrf_scb attached image) the /SS line asserts between transfers.
I'm writing 2 bytes, the first byte contains the COMMAND + REGISTER and the second byte contains the DATA i want to write to the nRF REGISTER.
Here is the function i use to write to the nRF registers, on the top you can see the UDB version and below the SCB implementation:
void nRF24_WriteRegister(const NRF_REGISTER_t reg, const uint8_t data)
#if !defined(CY_SCB_SPI_H) // UDB Block
SPI_WriteTxData(NRF_W_REGISTER_CMD | reg);
while(0 == (SPI_ReadTxStatus() & SPI_STS_SPI_IDLE));
#else // SCB Block
SPI_SpiUartWriteTxData(NRF_W_REGISTER_CMD | reg);
while( SPI_SpiIsBusBusy() );
In the example projects both SPI peripherals have a 32 byte TX-FIFO, i'm not familiar enough with the SPI based on the PSoC4 SCB blocks so maybe i'm missing something very obvious, feel free to look into the code and let me know if i'm doing something silly :/ .
Thanks in advance
PD: If you want to check the most up to date implementation you can find it here: