[sdiy] STM32G4 SAI problems

Vladimir Pantelic vladoman at gmail.com
Sun Jul 16 19:25:03 CEST 2023


On 7/16/23 16:39, rburnett at richieburnett.co.uk wrote:

> It is certainly generating *some* code, as I can look through what it puts into 
> "main.c" in between the comment lines.  And I know not to put my own code in the 
> wrong places where it will get deleted ;-)  I probably need to slow down and 
> walk before I try and run.  More "blinky LED" and "Hello World" examples for me 
> I think before trying to get a CODEC interface working, and carefully look what 
> code the config tool is generating each time a pin or clock is configured to do 
> something new.
> 
> -Richie,

yes, main.c is one place, but Cube puts all the chip/HW specific code into 
stm32g4xx_hal_msp.c, look for:

void HAL_SAI_MspInit(SAI_HandleTypeDef* hsai)

there. one exception are pure GPIOs, these are indeed set up in main.c

also, the IRQ handlers are put into:

stm32g4xx_it.c




More information about the Synth-diy mailing list