This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5529, POR issue

Hi!

I am testing some features of my applicaction, and I was trying to reset my device via PMM.

I wrote 3 routines called, SoftwareBOR, SoftwarePOR and SoftwarePUC.

Their implementations are:

void SoftwareBOR()
{

PMMCTL0 = PMMSWBOR|PMMPW ;
while(1);
}

void SoftwarePOR()
{
PMMCTL0 = PMMSWPOR|PMMPW ;
while(1);
}

void SoftwarePUC()
{
PMMCTL0 = PMMSWBOR ; //without the password-> PUC
while(1);

Maybe the while(1) lines are innecesary. However, SoftwareBOR and SoftwarePUC work perfectly, but SoftwarePOR doesn't. Moreover, the system hangs up badly. I am doing this while debugging (IAR) and also the debbuger hungs up (I have to kill the process). It happens without the debugger attatched also.

Any ideas?

Thanks in advance.

Franco



  • HI!

    If anyone has any clue to solve my problem I will appreciate the comment!

    Thanks!

    F

  • Apparently nobody has a clue.

    It should work, because that's why these bits exist. If it doesn't, I have no idea, why.

    But d you really need POR when you have BOR? The two are mostly identical. IIRC, The only difference is that the PMM/SVS isn't reset on POR but is reset on BOR. So if you configure it anyway after reset...

  • I was testing different reset sources in order to "tune up" my initialization routines .

    That is why I was trying all the possibilities. 

    If the routine is right, I will try to figure it out some other way. Thanks!

  • FAB63476 said:
    If the routine is right,

    Well, there's no difference between BOR and POR (except for the bit you set), so if one works, why not the other.

    But I have an idea: You don't just set PMMSWxOR, both funcitons also set PMMCOREV to 0. BOR does initialize the SVS, but POR doesn't, so if you're running on a higer frequency, it might crash the CPU (or put the SVS into an eternal reset loop) before things are again as they should.
    This might be the reason.

    So try

    PMMCTL0 = PMMPW|PMMSWPOR|(PMMCTL0&PMMCOREV_3);

    to keep the current PMMCOREV setting. (On some MSPs, e.g. the MSP430F54xx non-A, PMMCOREV must not be set to 0 or 1, even at low speed, and is 2 by default.)

  • You were right!!!  

    Many Thanks!

    F

**Attention** This is a public forum