AnsweredAssumed Answered

BEEP SHUT DOWN

Question asked by beniamino.giorgio on Jul 23, 2013
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

Outcomes