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

Confirmation required regarding nordic SPIM driver unable to handle multiple slave selects ss

Hi,

I figured that a slave select is configured in dts as:

/*
 * Copyright (c) 2019 Callender-Consulting, LLC
 *
 * SPDX-License-Identifier: Apache-2.0
 */

&spi1 {
	compatible = "nordic,nrf-spim";
	status = "okay";
	sck-pin = <41>;
	mosi-pin = <40>;
	miso-pin = <4>;
	cs-gpios = <&gpio0 23 0xff>;
};


However, when there is a need for multiple slave selects, slaves have to be managed  explicitly as informed in the ticket:

https://devzone.nordicsemi.com/f/nordic-q-a/58722/3-spi-slave-sharing-the-same-sck-miso-and-mosi#:~:text=configure%20all%20SS%20pins%20as%20output%20using%20nrf_gpio_cfg_output(pin_number)%2C%20and%20control%20the%20pins%20using%C2%A0nrf_gpio_pin_set(pin_number)/rf_gpio_pin_clear(pin_number)%20before%20and%20after%20each%20transfer.

Here my queries are 2:

1. Is it still so..? That multiple slaves have to be explicitly managed..?

2. While controlling ss explicitly, what should be set in zephyr's spi_config.cs = ..?

struct spi_config {
uint32_t frequency;
uint16_t operation;
uint16_t slave;

const struct spi_cs_control *cs;
};

Thanks,

 

Related