How to extern PLL I2S audio clock on MCO2 pin at stm32_bringup() of NuttX
2024-4-9 03:52:26 Author: acassis.wordpress.com(查看原文) 阅读量:4 收藏

Basically I just this it:

...
#include "chip.h"
#include "stm32_gpio.h"
#include "stm32_rcc.h"
...

/* Extern PLLI2S clock on MCO2 (PC9) */

#define BOARD_CFGR_MC02_SOURCE         RCC_CFGR_MCO2_PLLI2S
#define BOARD_CFGR_MC02_DIVIDER        RCC_CFGR_MCO2PRE_NONE

#define GPIO_MCO2 (GPIO_MCO2_0|GPIO_SPEED_100MHz)

int stm32_bringup(void)
{
  int ret = OK;

  /* Extern I2S clock on MCO2 pin */

  stm32_configgpio(GPIO_MCO2);
  stm32_mco2config(BOARD_CFGR_MC02_SOURCE,
                   BOARD_CFGR_MC02_DIVIDER);

...
}

文章来源: https://acassis.wordpress.com/2024/04/08/how-to-extern-pll-i2s-audio-clock-on-mco2-pin-at-stm32_bringup-of-nuttx/
如有侵权请联系:admin#unsafe.sh