2009-04-30 01:48 AM
What's matter about EMI of stm8a?
2011-05-17 06:03 AM
Hi Jatin
I find the focus of Flash was changed... When programm run normally, Then make the crystal stop to self_oscillate(Such as: finger touch crystal pin) a moment...poweroff...poweron...The flash was changed, programm did not go on. I used some code at beginning of main() as follow: //----------- int main(void) { _asm(''sim\n''); // Disable interrupt FLASH_PUKR = 0x00; // LOCK flash RST_SR = 0x1F; // Clear reset flag CLK_CKDIVR = 0x00; // HSI_DIV = 1; HSE_DIV = 1 CLK_ECKR = 0x01; // HSE clock on CLK_SWCR = 0x06; // Enable switch and interrupt CLK_SWR = 0xB4; // HSE as the master clock. _asm(''rim\n''); // Enable interrupt while(!gFlag_run); ...... return 0; } //------------ volatile unsigned char gFlag_run = 0; @near @interrupt void CLK_IRQHandler(void) { CLK_SWCR &= ~0x08; // clear SWIF gFlag_run = 1; // Set run flag return; } //------------ But the Devil is still live. Regards wolver2011-05-17 06:03 AM
Hello
Faint! The evil was killed...When I kick out 'static @inline' key of all fuctions declare. That wiil be appreciated from the mail of Joyce Yan Mentioned it! Thanks for help of all ST Engineers, STM8A is good 8bit MCU, But I am not sure Whether STVD(Comsic) need be improved ...The dangerous of flash changed has be resolved Completely? Regards wolver :p [ This message was edited by: wolver on 29-04-2009 19:44 ]2011-05-17 06:03 AM
Glad to know that the problem is solved at your end.
But we would like to investigate it in detail. Joyce will contact you for this. Thanks Regards, Jatin