cancel
Showing results for 
Search instead for 
Did you mean: 

BEEP SHUT DOWN

giorgio2
Associate II
Posted on July 23, 2013 at 15:19

Hi Everybody,

I am new to the STM8S and the BEEP Module.

I have enable 1kHz signal on PD4 using the following code:

/* LSI Calibration*/

lsi_clk = power_control_lsi_calibration();

  

/* BEEP Calibration  */

BEEP_LSICalibrationConfig(lsi_clk);

/* Set BEEP Frequency */

BEEP_Init(BEEP_FREQUENCY_1KHZ);

    

/* Enable BEEP */

BEEP_Cmd(ENABLE); 

But when I try to shut down the signal to enable a 2 kHz the following code doesn't work:

BEEP_Cmd(DISABLE);

wait(100);

BEEP_Init(BEEP_FREQUENCY_2KHZ);

    

BEEP_Cmd(ENABLE); 

 

Thank you very much
0 REPLIES 0