You are here

PsoC4 Halted unexpectedly due to EMI? | Cypress Semiconductor

PsoC4 Halted unexpectedly due to EMI?

Summary: 5 Replies, Latest post by danvel on 13 Aug 2014 05:10 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
danvel's picture
5 posts

I am using the CY8CKIT kit to control a 12V sensored brushless motor.
I use 6 output pins to drive the 6mosfets through appropriate gate drivers.
I use 3 input pins for rotor position feedback (3 hall sensors).
The problem is:
When I increase PWM duty cycle to progressively accelerate the motor I reach a point around 50-60% duty cycle in which the microprocessor HALTS.
The motor continues running at that constant speed because the hardware blocks (PWM and LUTs) continue working perfectly, but I know the software is halted because I have a blinking led that stops blinking.
Some more data to understand the problem:
The psoc4 is powered from kit on-board 3.3V regulator. I provide 5V to the kit board with a linear 7805 regulator from motor battery.
When I use 7.4V battery the problem doesn’t happen.
When I use 12V battery the problem happens. But:
If I connect theusb cable to the PC AND enter the debug mode to try to understand the problem then the processor doesn’t halt.
If I add 100 ohm series resistances in all mosfet gates to slow down turn on and turn off then the processor doesn’t halt, but the mosfets overheat due to cross-conduction even with 4% deadband implemented in the PWM. This makes me think the problem is somehow related to EMI.
To summarize, I would like to understand:
-What is the mechanism than makes the microprocessor HALT?. The 5V and 3.3V power lines are very stable and the reset is pulled up to 3.3v. Moreover If a low voltage condition is detected in the power lines shouldn’t the psoc4 RESET instead of HALTING?
- Is there anything I can do apart from increasing Rgate? Why is the problem apparently solved while in debugging mode?

user_1377889's picture
9277 posts

You did not specify exactly which Kit you use, Pioneer or it-049-42xx?

What do you use for debugging? USB connection or miniprog3?

As you know, switching inductances create (very) high voltages. When only one of the flyback diodes does not work as fast as it is suspected to do ...

It can be a grounding problem, since it goes away when you connect additional hardware.

I would suggest you to take a scope, set to AC, high gain and check the noise (peaks) on Vcc and other signals.

There are two scenarios I can think of that makes the processor halt:

-When kicked into nirwana

-when an illegal situation occurs.

In the latter case an interrupt within the CPU core is fired (and an ininitive loop is executed). You could try to catch that interrupt (Read the M0 core manual by ARM) and take apropiate fixup.




user_14586677's picture
7646 posts

You have all the signatures of L coupled transients due largely

to dI/dT in the gate drive circuit  per your comments Layout is

critical, splitting grounds. Quite often opto isolators used as a

way of preventing transients back into a pin from fast RLC

load driving.


Using Rs in gate drive clearly defeats use of low Rdson fets, and

wastes power.


Also look at any pin setup as Hi Z close in physical layout and trace

coupling. Possibly terminate those at lower Zin in to reduce effect

of dV/dT coupling.


Excellent approach is to use DSO and look at all pins, by triggering on

rail voltages to see what pin is not meeting Vdd >= Vpin >= Vss. Fast

diode or Zener clamps can help that. And you can trigger on just runts

as well. Additionalky look at power supplky rails, infinite persistance

to get ahandle on pk-pk noise. There again look for runt transients to

see how "stiff" the rail is.


Layout resources, attached. AN345/347 of particular interest.


Regards, Dana.





user_14586677's picture
7646 posts

If you are using/or not, H bridge look via google for ap notes on PCB

layout, quite a lot of info out there. Also look at MOSFET sites for

Ap Notes on motor driving, they usually have a lot to say about PCB






/* Style Definitions */
{mso-style-name:"Table Normal";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-fareast-font-family:"Times New Roman";


Additionally not all capacitors equal. Look at polymer tantalums for

bulk caps, they have an order of magnitude better f vs z as well as

better V degradation characteristics than traditional caps.


Regards, Dana.

danvel's picture
5 posts

Thank you very much for all your hints. I will check them and I will also try an intermediate compromise value for Rgate (higher than that causing severe EMI (10ohm) but lower that that causing severe overheating (150ohm). Also, my grounding is far from perfect as I am using prototype breadboards. I will update the results.

danvel's picture
5 posts

Update: Changed Rgates to 39Ohm and added 100nF+470uF between ground and VCC and the problem is apparently solved!

Log in to post new comments.