SPI interfacing with U-Blox GNSS receiver
Hello,
I am doing a project in which I have to receive bytes via SPI from a U-Blox GNSS receiver, specifically the NEO-M9N. I am using the STM32F0308 Discovery development board.
For the NEO-M9N to constantly send information, it must receive a continuous SPI clock.
I have tried to implement an SPI communication using block mode and another with interruptions. In both I have obtained the same result, I do not receive data from the GNSS chip.
In the case of interruptions mode, I call the function in 'main' for the first time: HAL_SPI_Receive_IT (& hspi1, spiRxDataBuff, 82).
In the callback function:
void HAL_SPI_RxCpltCallback (SPI_HandleTypeDef * hspi)
{
HAL_UART_Transmit (& huart2, spiRxDataBuff, 82, HAL_MAX_DELAY);
HAL_SPI_Receive_IT (& hspi1, spiRxDataBuff, 82);
}
That way I get to transmit the buffer via UART and call the SPI reception function again so that data is constantly received via SPI (supposedly).
UART works perfectly. Observing the different lines with the oscilloscope, I have observed that the SPI clock is discontinuous. There is a separation between the reception of each buffer. This causes the NEO-M9N to malfunction and not send data over MISO.
Is there a way to create a constant SPI communication where the clock is constant?
Thanks in advance.
