Question
How do I convert a SPI register from a STM32F103 to a STM32L412?
Hi All,
I'm trying to convert deividAlfa's LCD library to use on a L412 micro but I'm having an issue that I don't understand.
He has a routine in the LCD.C file:
static void setSPI_Size(int8_t size){
if(config.spi_sz!=size){
__HAL_SPI_DISABLE(&LCD_HANDLE);
config.spi_sz=size;
if(size==mode_16bit){
LCD_HANDLE.Init.DataSize = SPI_DATASIZE_16BIT;
LCD_HANDLE.Instance->CR1 |= SPI_CR1_DFF;
}
else{
LCD_HANDLE.Init.DataSize = SPI_DATASIZE_8BIT;
LCD_HANDLE.Instance->CR1 &= ~(SPI_CR1_DFF);
}
}
}The problem is there is no SPI_CR1_DFF register in the L412 code. I want to use 8 bits for the SPI bus.
Is there a way around this issue?
Thanks,
Richard