Software RESET for PSoC5LP

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ViDv_264506
Level 5
Level 5
50 sign-ins 25 sign-ins 5 solutions authored

Hi,

Please, can someone describe what to call in __asm volatile(XXXXX); to reset the PSoC5LP CPU?

Many thanks

Viktor

0 Likes
1 Solution
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Viktor,

Why aren't you using void CySoftwareReset(void)?

 

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

6 Replies
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Viktor,

Why aren't you using void CySoftwareReset(void)?

 

Len
"Engineering is an Art. The Art of Compromise."
ViDv_264506
Level 5
Level 5
50 sign-ins 25 sign-ins 5 solutions authored

Answer is very simple. I did not know about that nice function in CyLib.

All works now as expected ... OK ... tested.

Many thanks for your valuable help.

Viktor

 

0 Likes

Hello.

Something to be aware of...,
A s/w reset is not the same as a h/w reset and can leave some h/w in an unknown state.  There was quite a discussion on this a few years back.

0 Likes

BiBi,

The function CySoftwareReset(void) just sets a bit in a RESET_CR2  Control register.

Here's the underlying code:

void CySoftwareReset(void) 
{
    CY_LIB_RESET_CR2_REG |= CY_LIB_RESET_CR2_RESET;
}

Here's the section in the PSoC5 TRM for this register:

Len_CONSULTRON_0-1673996004109.png

 

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Hi Len.

I agree with what you described for s/w reset.
I was attempting to point out that a s/w reset is not the same as a h/w reset.  Some people thought it was.

Bib,

The TRM claims it is a "System Reset".  We can only assume it is HW+SW.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes