Skip to main content
wolver
Associate III
April 30, 2009
Question

What's matter about EMI of stm8a?

  • April 30, 2009
  • 12 replies
  • 3358 views
Posted on April 30, 2009 at 10:48

What's matter about EMI of stm8a?

    This topic has been closed for replies.

    12 replies

    wolver
    wolverAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 15:03

    Hello

    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

    wolver
    wolverAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 15:03

    Hi Jatin

    en...

    1. I have de-coupling capacitors present on all the power supply pins. You can see

    http://www.st.com/mcu/modules/Splatt_Forums/downloadtemp/MCU_Block___01_STM8AH5188.pdf

    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

    jatin
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:03

    Hi 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

    jatin
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:03

    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.

    wolver
    wolverAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 15:03

    Hi Jatin

    Thanks for help!

    Attention please ...

    This question will be resolved deadline is 2009-5-15.

    If not, I will say sorry about STM8A ...

    Regards

    wolver

    jatin
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:03

    Thanks Wolver for the below info.

    No problem, I will get the problem details from Joyce Yan. For sure, we will help to understand and resolve this problem.

    Regards,

    Jatin

    wolver
    wolverAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 15:03

    Hi Jatin

    Where is app note AN2860?

    Regards

    wolver

    wolver
    wolverAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 15:03

    Hi Jatin

    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

    wolver
    wolverAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 15:03

    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 ]

    wolver
    wolverAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 15:03

    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

    wolver