AnsweredAssumed Answered

Beep function with STM8L Discovery

Question asked by mic on Apr 19, 2011
Latest reply on Jun 1, 2011 by lowpowermcu
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? 

Outcomes