Beep function with STM8L Discovery
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-04-19 12:39 PM
Posted on April 19, 2011 at 21:39
Hello,
I want to use the beep function with my STM8L Discovery. After writing the program to STM8L, I connect the a piezo speaker between PA0 and GND. The program is as following: // Initialize BEEP_LSICalibrationConfig(16000000); BEEP_Init(BEEP_Frequency_1KHz); //Beep BEEP_Cmd(ENABLE); delay_ms(200); BEEP_Cmd(DISABLE); But it doesn't work. Do I need something another command on Initialization process ? I know the PA0 is connected to the SWIM. Is it affect something bad for the beeper function?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-06-01 2:46 AM
Posted on June 01, 2011 at 11:46 Perhaps you need something like this: CLK_PeripheralClockConfig(CLK_Peripheral_BEEP, ENABLE);
