Lanqiao Cup Embedded-Buzzer
(1) Personal habits
A separate BUZZ.c and BUZZ.h will be created and placed under the HARAWARE folder
(2) Preparation
-
1. The pin connected to the buzzer of the CT117E development board is PB4, which is also connected to the RST pin of the JTAG interface.
-
2. When we reset the stm32, the PB4 pin is the RST pin of the JTAG interface by default, so we must remap PB4 back to our ordinary IO port before using the buzzer.
-
3. So we have to add this sentence
GPIO_PinRemapConfig(GPIO_Remap_SWJ_NoJTRST,ENABLE);
-
4. Other than that: the other configuration of the buzzer is similar to that of LED