Hello @Pierre75,
You cannot use the RCC_OSC_OUT and the DEBUG_SWCLK at the same time. Indeed, there is a conflict.
You have two choices :
- Change your STM32C011J4M6 to another such as STM32C011D6Y3TR (check on MCU selector)
- Create 2 projects :
- The first which use PA14 as OSCX_OUT (but you will not be able to debug)
- The second which use PA14 as SWCLK (but you will not be able to debug with the LSE, you have to use an other internal CLK)
If you choose the second option, you need a jumper or hardware solution to switch from one configuration to another. Be careful of the resonator behavior...
Q1 : Do you know what is the default function of the pin ? I suppose the PA14 for SWCLK ?
A1 : The PA14 pin can be configured as Boot0 input or as a GPIO.
To configure PA14 as a GPIO, set the USE_BOOT0_OPT bit of the FLASH option bytes.
Following this, PA14 is configured by default as serial wire debug (SWD) interface clock
input (SWCLK).
Q2 : how do I switch to the OSCX_OUT function ?
A2 : Due to the limited number of pins on SO8 package, multiple GPIOs are connected to I/O
pins. The SYSCFG_CFGR3 register allows selecting which of them is active, to prevent
conflicts.
You can read more here on the chapter 6 GPIO of RM0490.
Best Regards,
Pierre