Some working notes regarding using bcm2835 for SPI control, as the CE1 line is used as an I/O line the following lines need to be commented out to prevent it being taken out of service;
File bcm2835.h;
line 329 => //BCM2835_SPI_CS1 = 1, ///< Chip Select 1
line 330 => //BCM2835_SPI_CS2 = 2, ///< Chip Select 2 (ie pins CS1 and CS2 are asserted)
File bcm2835.c;
line 330 => //bcm2835_gpio_fsel(RPI_GPIO_P1_26, BCM2835_GPIO_FSEL_ALT0); // CE1
line 347 => //bcm2835_gpio_fsel(RPI_GPIO_P1_26, BCM2835_GPIO_FSEL_INPT); // CE1
I'll add instructions when this has been tested fully. There may be a more elegant way of implementing this.
I need to check and see if the option to setup with (BCM2835_SPI_CS_NONE) and then call CS manually in the code would be an alternative.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.