2021-01-16 10:50 AM
Hi,
I have NUCLEO-G071RB board . How to calculate 1KHz frequency with STM32G071 Output compare ?
My System Clock frequency is 64 MHz .
--
Karan
Solved! Go to Solution.
2021-01-19 03:27 AM
// GPIOx_MODER - 2 bits per pin
#define GPIO_Mode_In 0x00 // GPIO Input Mode
#define GPIO_Mode_Out 0x01 // GPIO Output Mode
#define GPIO_Mode_AlternateFunction 0x02 // GPIO Alternate function Mode
#define GPIO_Mode_AF GPIO_Mode_AlternateFunction
#define GPIO_Mode_Analog 0x03 // GPIO Analog Mode
GPIOB->MODER = (GPIOB->MODER & ~(0
| GPIO_MODER_MODE6
)) | (0
| (GPIO_Mode_Out * GPIO_MODER_MODE6_0)
);