Hello Everyone,
I would like to know that how many slave devices can be connected to the one QSPI?.
I would like to know that how many slave devices can be connected to the one QSPI?.
It depends how many ENABLE lines you can control with your microcontroller plus glue-logic. The spi device on a line is only listening to instructions if the enable pin is active.Hello Everyone,
I would like to know that how many slave devices can be connected to the one QSPI?.
Hi,It depends how many ENABLE lines you can control with your microcontroller plus glue-logic. The spi device on a line is only listening to instructions if the enable pin is active.
In general without knowing controller specific QSPI, SPI datasheet or driver details.Hi,
I have 6 slave devices (of ADC's) in my application. So, I need to connect those 6 slaves on the single QSPI channel. Here, I'm using the QSPI for faster data throughput.
On the Microcontroller side, I have 1-QSPI and 2-SPI channels.
Since I have only 1-QCS (Chip Select) for QSPI channels, and I have 8-NPCS_0,1,2,3 (4 Chip Selects for each SPI channels; 4x2=8) for SPI. Here, I have a question, can I use those SPI chip selection pins (NPCS) for the selection of 6 slave devices on the QSPI since I have only one chip selection on QSPI?. If not, then, Can I use GPIO pins as a chip selection of the QSPI channel?.
And also, Is it a good idea to use 6 slaves on a single QSPI channel?.
Thank you for the quick response, MrSalts!.
/*
* enable BMA490L CS and set flags
*/
bool imu_cs(imu_cmd_t * imu)
{
if (imu) {
switch (imu->device) {
case 0:
default:
imu->run = true;
IMU_CS_Clear();
// set SPI receive complete callback
SPI2_CallbackRegister(imu_cs_cb, (uintptr_t) imu);
break;
}
return true;
} else {
return false;
}
}
/*
* force BMA490L CS disabled
*/
void imu_cs_disable(imu_cmd_t * imu)
{
if (imu) {
switch (imu->device) {
case 0:
default:
imu->run = false;
IMU_CS_Set();
break;
}
}
}
/*
* SPI interrupt completed callback
* disables BMA490L CS and sets flags
*/
void imu_cs_cb(uintptr_t context)
{
imu_cmd_t * imu = (void*) context;
if (imu) {
switch (imu->device) {
case 0:
default:
IMU_CS_Set();
imu->run = false;
break;
}
}
}
by Jake Hertz
by Aaron Carman
by Duane Benson