I2C & SPI not working together (STM32F303K8)
Hi, I am trying to simply output information from an I2C device (DS1307 real time clock) to an SPI screen (ST7789) I have tested the code & libraries for the separate devices and they work but as soon as I try adding any SPI commands to the main.c the output just crashes (simple UART message) as below:-
"DS1307_Init(&hi2c1);
/* To test leap year correction. */
DS1307_SetTimeZone(+8, 00);
DS1307_SetDate(12);
DS1307_SetMonth(7);
DS1307_SetYear(2023);
DS1307_SetDayOfWeek(4);
DS1307_SetHour(9);
DS1307_SetMinute(00);
DS1307_SetSecond(00);
const char *DAYS_OF_WEEK[7] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
HAL_UART_Transmit(&huart2, "DS1307 innit", sizeof"DS1307 innit", 1000);
HAL_Delay(200);
ST7789_Init();
HAL_UART_Transmit(&huart2, "ST7789 innit", sizeof"ST7789 innit", 1000);
"
As soon as i add the 'ST7789_Init();' command everything seizes to work and all I get on the UART monitor is "DS1307 innit" not the "ST7789 innit". I have tried all the different SPI & I2C settings disabling and enabling interrupts and no luck. Is there an SPI setting which can conflict with I2C?
