std 0 Posted February 16 · Report post STM32F407 (427), внешний ТГ на пин OSC_IN. Желание: сигнал ТГ завести на PH0/OSC_IN и при этом PH1/OSC_OUT использовать как порт. Конфигурю в STM32CubeMX 6.3.0 + FW_F4 1.26.2: "Pinout&Configuration" -> RCC -> High Speed Clock (HSE) -> BYPASS Clock Source. Проблема: STM32CubeMX разрешает либо оба pin'а вместе: PH0/OSC_IN + PH1/OSC_OUT, либо при попытке перевести пин в GPIO отключает "BYPASS Clock Source". Читал RM0090 rev19: 6.2.1 HSE clock (стр. 154), 8.3.14 Using the OSC_IN/OSC_OUT pins as GPIO PH0/PH1 port pins (стр. 278). Похоже на то, что если включен HSE + HSE BYPASS (биты HSEON и HSEBYP в RCC_CR) то OSC_IN и OSC_OUT по-отдельности использоваться не могут? То есть при внешнем ТГ (HSE BYPASS) использовать OSC_OUT как порт не удастся? Подтвердите или опровергните, пожалуйста. Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
Arlleex 1 Posted February 16 · Report post Цитата 8.3.14 Using the OSC_IN/OSC_OUT pins as GPIO PH0/PH1 port pins The HSE oscillator pins OSC_IN/OSC_OUT can be used as general-purpose PH0/PH1 I/Os, respectively, when the HSE oscillator is OFF. (after reset, the HSE oscillator is off). The PH0/PH1 I/Os are only configured as OSC_IN/OSC_OUT HSE oscillator pins when the HSE oscillator is ON. This is done by setting the HSEON bit in the RCC_CR register. The HSE has priority over the GPIO function. Цитата External source (HSE bypass) In this mode, an external clock source must be provided. You select this mode by setting the HSEBYP and HSEON bits in the RCC clock control register (RCC_CR). The external clock signal (square, sinus or triangle) with ~50% duty cycle has to drive the OSC_IN pin while the OSC_OUT pin should be left HI-Z. See Figure 22. Думаю, это невозможно. Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
std 0 Posted February 16 · Report post Печаль. Плата уже разведена и запаяна. Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
Arlleex 1 Posted February 16 · Report post Ну переразвести немного и запаять снова. Разработка - процесс итеративный. Или попробуйте найти (вдруг возможно?) pin-to-pin замену на STM32H7 - там (судя по описанию) они это уже исправили. Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...