This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

spi Config register

Hello !

When i was trying to configur my SPI, I observed that there is a difference between the position field announced in the nrf51 reference manual v2.1 and the nRF51_bitfields :

nRF51_bitfields says : /* Register: SPI_CONFIG / / Description: Configuration register. */

/* Bit 2 : Serial clock (SCK) polarity. */ .......

/* Bit 1 : Serial clock (SCK) phase. */ .........

but the nrf51 reference manual v2.1 says the opposite :

B RW CPOL Serial clock (SCK) polarity // B => 1

C RW CPHA Serial clock (SCK) phase // C=> 2

can you please verify this and tell me whitch is correct ?

Thank you

  • Hi

    I observe that the SDK and the nRF51 Series Reference Manual v2.1 are in sync. I look in the nRF51 Series Reference Manual v2.1, section 26.5.11 and it says:

    B CPHA Serial clock (SCK) phase. C CPOL Serial clock (SCK) polarity.

    Are you sure you are looking at v2.1?

  • Yes I'm. just take a look at the nRF51_bitfields.h and compare the positions annonced there and the other one annonced at the nRF51 Series Reference Manual v2.1 and you'll see what I'm talking about !

  • Sorry for the confusion. Clearly I was looking at the CONFIG register for the SPI slave, where the definition for the CPHA and CPOL bits is correct. So the conclusion is that the nRF51 Series reference manual v2.1, section 25.2.7, which describes the CONFIG register of the SPI master, is incorrect. In section 25.2.7, the CPOL bit should be bit C and CPHA should be bit B.

Related