2009-06-08 11:21 PM
STM8S/128-EVAL/A Switch to HSE as Clock don't work
2011-05-17 06:03 AM
Hi All,
Excuse me for my bad english. On my desk there is an STM8S/128-EVAL/A evaluation board that until now work great. I have just flashed CLK_ClockSelection example from STM8S firmware library and it isn't work! The CLK_ClockSwitchConfig() function don't work when i request to switch clock source to HSE. There arent' no problems if i request to swith clock source to HSI or LSI. So seems to me that the real problem is HSE because when i switch to this Evaluation board react rebooting or freezing. Anyone could comfirm me that this example work on his board(in this case mine is broken)? Thanks! Ciao, Alessio2011-05-17 06:03 AM
Hi Mozra,
Option byte is configured as STVP default except for LSI_EN (which I set to available) and Wait state (which I set to 1). I have just found the problem. As bassinux has suggested the Crytal case was slightly un-plugged (that i haven't noticed). Thanks Mozra and Bassinux for you help!!! Ciao, Alessio2011-05-17 06:03 AM
Hi,
I suggest to to try another Quartz for the Eval or it can be badly insert, because When you say that Eval is freezing or reboot, it's means that the system doesn't find any Clock source to execute instructions so the system is reset, in other word the clock switch happened but it doesn't find the HSE clock, in my opinion it can be a quartz problem. Best Regards Bassinux2011-05-17 06:03 AM
Hi Bogani,
Are you sure that the ''Flash_Wait_States'' option byte is set to 1 before using the HSE clock? Regards mozra2011-05-17 06:03 AM
We have four STM8/128-EVAL in our lab: none of these work properly with the 24 MHz mounted crystal. So we replaced it with a 16 MHz one, that works fine.
In effetti è curioso che nel sorgente della demo la linea che abilita l'oscillatore esterno sia stata commentata... Ciao Francesco2011-05-17 06:03 AM
Hi Fangelin,
I can confirm that now HSE works as expected on my board (i.e. STM8/128-EVAl/A with STM8S208MB microprocessor) whether I'm using my code or firmware library examples. [Italian Mode ON] Notare che nelle esempio a corredo della firmware library invece il codice che usa HSE è tutt'altro che commentato. [Italian Mode OFF] Ciao, Alessio2011-05-17 06:03 AM
Hi All,
Resume: to make the HSE (24 MHz) works fine you should: - Plug the crystal - Set the ''Flash_Wait_States'' option byte to 1 - Call the CLK_ClockSwitchConfig() function to switch clock source to HSE [English Mode ON] :-[ I don't understand [English Mode OFF] Regards mozra2011-05-17 06:03 AM
Hi Alessio,
you were right, we lost the 1 wait state in the option byte setting! Many thanks Francesco