Where is Power Management APIs ?

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

cross mob
Anonymous
Not applicable
        Hi PSoCers!   
Recently, In my PSOC3 design, Weird ;-} RESET has frequently happens.   
I'm suffering with it.   
Therefore, I want to know the reason of RESET.   
According to TRM, This routine able to know the reason   
uint32 CySysPmGetResetReason(void);   
the return value as follows...   
CY_PM_RESET_REASON_UNKN: Unknown   
CY_PM_RESET_REASON_XRES: Transition from OFF/XRES to RESET   
...   
So far, I can't find any include file for these constants definisions.   
And can not link this routine from any library.   
Anyone knows how to do it, please let me know.   
0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Cannot find it either. A MyCase solution?

   

 

   

Bob

View solution in original post

0 Likes
22 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Cannot find it either. A MyCase solution?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

I  Have not seen that funtion, but the power management related fuctions can be found in the cyboot components

   

cy_boot_v3_20\PSoC3\API\cyPm.c

   

But I think that the best way to find out the source of the reset is to look into the CyResetStatus variable.

   

CyResetStatus is defined in cyPM

   

 

   

you can find an explanation of that variable in the system reference guide pdf.

   

section "13 start up and linking " ----> "preservation of Reset Status"

Anonymous
Not applicable

 BTW, I have had weird reset issues before, where reset was trigered ramdombly and most of the times it turns out it is related to

   

1)  the WDT is not serviced (the cpu is busy or it was turned on by mistake)

   

2) the reset pin in not properly configured and is picking up (not pulled up) and is picking noise (try )

Anonymous
Not applicable
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Yes, Zeta, exactly as you said. But I tried to use the described function CySysPMGetResetReason() and it could not be found by the linker as described in the System Reference.

   

 

   

Bob

Anonymous
Not applicable
        Thank you so much.   
for helpful advices and links.   
I see, CyResetStatus is a global variable.   
It can be identify cause of RESET.   
It was find in CyLib.c and h   
   
I guess reason of my RESET was cause of voltage violation of pins.   
I was set system voltage to 4.0v because of I'm using USB bus,   
that has some voltage drop.   
   
Finally, I will be figured out the reason of Wierdness, soon.   
0 Likes
Anonymous
Not applicable
        Very Weird!   
The program was start and warm restart soon.   
At the top of program, CyResetStatus is 0x00.   
Checked by SWD debugger.   
No reason to reset, No clue of reset.   
Very Weird!!   
0 Likes
Anonymous
Not applicable
        Too much Weird!   
When the board lay on table, it's not work, restart again.   
but when placed in a vertical it's occasionally working.   
Very Weird! but the fact.   
   
Hence, I had to refine pins drive mode.   
All empty pins set into digital out put and pull down.   
All high-z digital input mode change into resistive pull down.   
Oh! it's gonna working well! How Weird!   
0 Likes
Anonymous
Not applicable
        Have you check if the problem is stack issue? or you calling a routine that needs to be re-entrant?   
Anonymous
Not applicable

 Hi HL-san <br>

   

Stack and Reentrant issue is may not be. <br>

   

I had 10ms system tick, 80ms DTMF ISR, 1sec RTC interrupts. <br>

   

Each are not large and working as usually. <br>

   

When doesn't work, it's never be work. <br>

   

Do working, working and not stop. <br>

   

<br>

   

Recently, MCU to reduce the power consumption, <br>

   

Even each pins, make as to high impedance <br>

   

So, we must take care of that.

   

WOW! Big Window is coming!

   

 

   
        
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

When orientation of the board does affect the behaveour there is only the gravitation the possible cause (assuming you'd already check the cables leading to the board).

   

When there is no accelleration sensor mounted, the only other cause left is a cold solder joint, may it be within a chip package or on the PCB. Try with soft knocking  

   

 

   

Bob

lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

And as always orientation, capacitive coupling and magnetic loop

   

induction.

   

 

   

HiZ inputs always susceptable and suspect. Flourescent lighting hash coupling.

   

 

   

Dielectric solutions sloshing around inside electrolytics ........:)

   

 

   

Some reference material, attached.

   

 

   

Regards, Dana.

Anonymous
Not applicable

If this chance when mechanically moving it,  I would also suspect of a cold solder joint, are you using your own board or are you usung one of the kits?

Anonymous
Not applicable

As Dana indicates those Hi-z pins may be the sources of problem. Do you have a Hi-z pin that can generate an interrupt directly or indirectly? 

Anonymous
Not applicable
        Hi Everyone.   
Thank for your comments and helpful informations.   
I'm using Japanese P3 board and embedded it into my own board.   
Early time, embedded and test each module that is working with no problem.   
But finally, occupancy is exceed 80% of ROM. 90% of pins.   
Additionally I'm using USB module.   
Slowly that had came.   
Fortunately, I could work it out.   
   
One more information.   
When to connect external chip by TTL/CMOS level,   
insert a resister 5Kohm between pin to pin, and resistive pull down.   
PSoC internal pull down resister is 5Kohm.   
That be effective.   
Pin's VIL is 0.3xVdd, around 2.0v is enough with it.   
5.0v is too much and more noisy in occationally.   
That is in evidence of my board.   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given
        But by doing this you have cut your noise margin down ?   
Anonymous
Not applicable
        Yes definitely,   
No work board that became working.   
I don't know neither noise margin or voltage violation.   
0 Likes
Anonymous
Not applicable
    
     

Hi there

     

I am consider again that behavior.

     

If something have to do which I said, That is a nightmare of mid summer night.

     

Must not use Hi-Z input?, Insert 5Korm ? It's not make sense. Noway!

     

  

     

So, I'm looking through the Board.

     

This is an extra of magazine, that issued by [Trangistor-Gijutu],

     

Japanese famous electronics magazine.

     

This is a simple and neat experiance board.

     

I have 2, and both has same problem.

     

 

     

 [click to enlarge]  

     

     

 

     

That is make Both plain PCB board, 2 layers front and back.

     

I'm looking it precisely, That has a hole for exposure pad of chip.

     

This hole have to soldering for thermal diffusion.

     

One of my board was soldered.

     

 

     

 Exposure Pad [click to enlarge]  

     

     

 

     

Is it grounded?

     

It can't figured out by a TESTER, because it's internally grounded.

     

So, I had observed the noise at this E-pad. Noise value is 20mV P-P, 0.9mV RMS. Is it allowable?

     

Next, I had wire it to well ground point. Is it better?

     

It is not conclusive at all, I think.

     

  

     

However, I find a something critical.

     

This board has no RAT-NEST pattern, has no major ground plain pattern.

     

How do you think about?

     

 

     

 Noise at Epad [click to enlarge]  

     

     

 

     

 Noise At Epad2 [click to enlarge]  

     

WiPry_Analizer

     

 

     

 

     

Next, I had observe Vdd regulation.

     

Wave form 1 is a PWM output of some pin.

     

Wave form 2 is a Noise at the Vdd pin.

     

It is not good.

     

Of course that has a bypass condenser, Tantal.

     

But, I might be make it more stable regulated power supply.

     

 

     

 Vdd regulation [click to enlarge]  

     

     

 

    
   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

What Dana means with the High-Z inpust just describes the situation that stray voltages at a high impendance input could easily trigger some unwanted internal behaveour. (Touch your scope-probe with a finger and you'll see 200V p-p @50 Hz  or something similar depending on your mains)

   

I would not suggest to add external resistors to the board but (at least as a test) define all unused pins as analog inputs with a drive mode "resistive pull-down". This would terminate all your unused pins.

   

But this does not describe the "positioning reset"... I'm still believing in a cold solder joint.

   

 

   

Bob

Anonymous
Not applicable
        Hi Bob   
What is COLD SOLDER JOINT?   
How does it to wrong work?   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

File:Cold solder joint2.jpg

0 Likes
Anonymous
Not applicable
        Is it COLD SOLDER JOINT.   
I see   
In Japa---n, This is called as "TENPURA"   
Seeing outside, It's well jointed but actually ingredients are separated.   
HaHaHa, weird !   
0 Likes