I use finger touch crystal pin, The programm do not go on normally. This can be Forgiven... But when I left finger ... Poweroff ... Poweron again ... I find the program run away...God save me! I must programm it again to restore Why?! Regards wolver
2. 'program runs away' means' flash was changed and programm did not go on.. 3. The project use STM8AH51A8, That is designed for the car of model B50 which produced by FAW-VW Automobile Co., Ltd. in China(http://www.faw-vw.com) 4. I am ST customer... 5. This question more details is reported to ST FAE(joyce.yan@st.com
mailto:sherry.li@st.com
mailto:zhao-yi.li@st.com
) ShanHai & Beijing in China., Since I am not good at writing English... This question must be checked out and resolved... otherwise, STM8A will be say good by for this automotive project... Regards wolver
STM8A follows the standard EMC compliancy tests needed for the automotive devices. Could you explain your test in more details? Do you have de-coupling capacitors present on all the power supply pins? As you said below, the program runs away, do you mean that the program memory is blank or it is corrupted? Which STM8A device, you are using? BTW, what project you are working on with STM8A. Are you a ST customer or working inside ST ABU? Regards, Jatin
I have alreay asked Joyce Yan about the problem details.
Few questions: 1. Are you writing program memory in your code? 2. Unused memory location are filled with trap instruction or not? 3. What portion of program memory is changed ? You can also have a look at the app note AN2860. There are some other AN's suggested inside this AN.
1. Are you writing program memory in your code? A: No, You can check my source code from Joyce Yan 2. Unused memory location are filled with trap instruction or not? A: No, I have not filled with trap instruction, But I will try it according to Joyce Yan's mail... 3. What portion of program memory is changed ? A: I have mailed all informatios to Joyce Yan. please contact her. Regards wolver
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 ]
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 wolver