Hello mullercw,
CSB seteup only had minmum value requirement, no maxmum value requirement. You could check SPI master and slave device from their data sheet.
I used GPIO to control CSB like this code:
int8_t SensorAPI_SPIx_Read(uint8_t slave_address7, uint8_t subaddress, uint8_t *pBuffer, uint16_t ReadNumbr) { slave_address7 = slave_address7; GTXBuffer[0] = subaddress | 0x80;
HAL_GPIO_WritePin(SPI_CS_GPIO_Port, SPI_CS_Pin, GPIO_PIN_RESET); // NSS low
HAL_SPI_TransmitReceive(&SPI_HANDLE, GTXBuffer, GRXBuffer, ReadNumbr+1, BUS_TIMEOUT); // timeout 1000msec; while(SPI_HANDLE.State == HAL_SPI_STATE_BUSY); // wait for xmission complete
HAL_GPIO_WritePin(SPI_CS_GPIO_Port, SPI_CS_Pin, GPIO_PIN_SET); // NSS high memcpy(pBuffer, GRXBuffer+1, ReadNumbr);
return 0; }
I captured the following SPI waveform, it worked well. I suggest you could capture SPI waveform to check if it works.
... View more