This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMDXRM57LHDK: Understanding CSNR in SPI1

Part Number: TMDXRM57LHDK

I am currently working with a RM57 Hercules Development kit. I am attempting to complete an SPI transfer, and I am confused about the value for CSNR. In the reference manual in figure 27-25, it lists the values for CSNR, but these do not seem to correspond to the values of the spiChipSelect enum in code. I am using SPI1 in compatibility mode with Chip Select 0. The figure in question says that to use CS_0, a value of 1 is needed for CSNR, but the enum specifies CSNR to be 0xFE. Am I misunderstanding the figure in the reference manual, or is this an issue? Thank you. 

  • Hello Jacob,

    If you want to use the CS0, the CSNR should be 0xFE rather than 0x01.
  • QJ, thank you for the response. I now understand that I have to use 0xFE, but I am trying to understand why. Does the CSNR chart define “chip select active” as chip select value being equal to 1? In this case, do the x’s in the chart boxes corrispond to high values, and the empty boxes corrispond to low values for the chip select? Thank you.

  • Hello Jacob,

    CSNR defines the chip select pins that will be activated during the data transfer. CSNR is a bit-mask that controls all chip select pins. SPI Default Chip Select Register (SPIDEF) defines the chip select default pattern. If SPIDEF=0xFF, the SPICS=0 is active to transfer data. If SPIDEF=0x00, the SPICS=1 is active to transfer data.