Posts: 4
Registered: ‎09-08-2017
Accepted Solution

Moving from BCM2835 to CP213x

Hi all,


I'm trying to convert original Raspberry PI code using the BCM2835 to the Silicon Labs CP213x.


I was naively hoping for a one 2 one conversion, but I'm getting wiser :-)


Using the SLAB_USB_SPI interface I miss a method for setting the SPI mode. In the BCM2835 I specify the mode as:


// BCM2835_SPI_MODE3 = 3, // CPOL = 1, CPHA = 1, Clock idle high, data is clocked in on rising, edge output data (change) on falling edge


How do I do that in the  CP213x ?


Anyone know if the byte order is the same for the BCM2835 and CP213x ?



Posts: 2,326
Registered: ‎10-14-2014

Re: Moving from BCM2835 to CP213x

take a look on CP213x_SetSpiControlByte() which was documented in AN792.