Question
STM32H7 HAL SPI too slow for my application
I'm using HAL SPI drivers to read some MCP23S17 expander chips. I am sending a 2 byte command and receiving a 6 byte response. The trouble is there is 6 mS of delay between the write and read. Code:
// read encoder expander chips for encoder button data
HAL_GPIO_WritePin(GPIOG, ENC_CS1_Pin, GPIO_PIN_RESET); // enable selector output
// do the transaction
HAL_SPI_Transmit(&hspi1, tx_data, 2, HAL_MAX_DELAY);
HAL_SPI_Receive(&hspi1, RawEncData1, 6, HAL_MAX_DELAY);
// disable selector output
HAL_GPIO_WritePin(GPIOG, ENC_CS1_Pin, GPIO_PIN_SET); // enable selector output
I am using software NSS lines. Are there tricks to make the receive command happen faster? Or is there another driver besides HAL that runs faster?
-- Tim Ressel
