H523 can't run HW SPI
Hello,
I spend a lot of time to tried running HW SPI on H523CET6. On the other mcu like F411 it work without any problems. In this case SPI work only when I do it in software mode:
//=====================================================================================
#define DO_LO HAL_GPIO_WritePin(LCD_MOSI_GPIO_Port, LCD_MOSI_Pin, GPIO_PIN_RESET);
#define DO_HI HAL_GPIO_WritePin(LCD_MOSI_GPIO_Port, LCD_MOSI_Pin, GPIO_PIN_SET);
#define CLK_LO HAL_GPIO_WritePin(LCD_CLK_GPIO_Port, LCD_CLK_Pin, GPIO_PIN_RESET);
#define CLK_HI HAL_GPIO_WritePin(LCD_CLK_GPIO_Port, LCD_CLK_Pin, GPIO_PIN_SET);
//=====================================================================================
static void Transmit_Byte(uint8_t transfer){
//==========================================================
#define HW_SPI
//==============
#ifdef HW_SPI
extern SPI_HandleTypeDef hspi1;
HAL_SPI_Transmit(&hspi1, &transfer, 1, 100);
//==========================================================
#else
uint32_t i;
for(i = 0 ; i < 8 ; i++){
if((transfer & 0x80) != 0) { DO_HI; }
else { DO_LO; }
CLK_LO;
transfer =(transfer << 1);
CLK_HI;
}
#endif
//===========================================================
}
I'm not pretty sure what I should to do more for properly running SPI in H523. My setup looks like:





UART1 on PA9/PA10 working without any problem, but the HW SPI doesn't. IOC file in attachment. I'd look at this via oscilloscope. CLK look like work properly, also MOSI he's not dead. Should I do any additional configurations or so?
