Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor II
1,377 Views

Need mrra SPI CS ("Chip Select") configured to "active high"

There does not appear to be an MRAA API call to configure the SPI Chip Select to: "active high". T

The default for Chip Select is active low (~Enable - as shown below).

Note: MISO was not connected (floating)

Configuration:

570X

BIOS 161

Ostro 12/2016

SPI 1:

Bus 0 MOSI = 4 MISO = 2 CS = 6 CLK = 10

SpiDev Documentation

Member:

cshigh Description: Property that gets / sets if the CS is active high.

Is there another clean way to set "Chip Select" for SPI to be "active high"?

0 Kudos
4 Replies
Highlighted
Community Manager
45 Views

Hi Floydg,

 

 

Thanks for your interest in the Intel® Joule Platform.

 

 

I appreciate all the information provided. I have been looking for Mraa APIs to change the Chip Select, and as you have mentioned there is no API to do it. However, you could use a GPIO as Chip Select line, I would like to know if it could be an option for you.

 

 

Regards,

 

-Yermi A.
0 Kudos
Highlighted
New Contributor II
45 Views

Yermi,

yes a GPIO could be used as the chip select (instead of the "built in"/dedicated" chip select as a work around,

Cons

The API should allow chip select to be active high or low. This work around could be potentially less efficient, with a CPU performance hit.

6SPP1FS0GPIO SPI
0 Kudos
Highlighted
Community Manager
45 Views

Hi Floydg,

 

 

The Chip Select is usually used as active low that is the case as Mraa is using it, however, I'm not sure how that pin could be configured as active high, so I would like to investigate a little bit more in order to give you a more accurate answer. I'll appreciate your patience during the meantime.

 

 

Regards,

 

-Yermi A.

 

0 Kudos
Highlighted
Community Manager
45 Views

Hi Floydg,

 

 

Thanks for your patience. I have been investigating and the MRAA library is used to interface with the spidev driver. By default the spidev driver is active low. The source code can be found on https://ostroproject.org/ https://ostroproject.org/, you can take the source code and modify it to meet your needs. Another option is to use an inverter on the chip select signal.

 

 

Hope this information helps.

 

 

Regards,

 

-Yermi A.

 

0 Kudos