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

PSoC™ 4 Forum Discussions

GuNo_288966
Level 4
25 replies posted 10 replies posted 10 questions asked
Level 4

I have made 5 custom boards with this microcontroller in the QFN package.

3 out of 5 boards can be programmed without problems with PSoC Creator and a Miniprog4 over a 5 pin SWD connection.

But 2 boards are not recognized correctly, the device is shown as "Cortex-M0", and the Miniprog4 can not connect.

This happens both with external power (5V) and when the device is powered over the Miniprog4.

There is obviously some communication between the Miniprog4 and the device, otherwise it would not display "Cortex-M0". But there is not enough communication to fully recognize the device. What is going wrong? Why can the device tell it´s a Cortex-M0 but not its type?

Is it possible to find the problem by looking at the XRES, SWDCLK and SWDIO lines with a scope? How should the signals look there?

The board design follows the Cypress datasheet, there are the required capacitors next to the power pins, the SWD connections are approx 3cm (1 inch) long.

Because of the QFN package it is not possible to check if all connections to the chip are ok.

The boards were soldered in a small reflow oven. Could it be that there are remains of flux below the chip that kind of shorten some pins? I already tried to re-work the boards with hot air, and I cleaned the boards with Iso, but things did not improve.

Any suggestions are welcome.

 

0 Likes
1 Solution
GuNo_288966
Level 4
25 replies posted 10 replies posted 10 questions asked
Level 4

Problem found and fixed!

I will describe now how the problem can easily be measured with a multimeter.

The reason was a hardware/production issue, bad connections of one or more of the SWD lines XRES, SWDCLK and SWDIO. At the QFN package (that I had to choose because it was the only one that is available in today´s component availability crisis) these pins are below the package and therefore are barely visible.

I measured the resistance between the pins of the 5 pin programmer connector on the PCB. Here are the results for the good boards:

XRES to GND: 150 to 400 kOhm

SWDCLK to GND: 14 to 26 MOhm

SWDIO to GND: around 15 MOhm

VTARG to GND: around 200 kOhm (note that this includes the PSoC chip and other components on the PCB and may be significantly different for other boards)

The boards that could not be programmed have no measurable resistance (0L) on at least one of connections XRES, SWDCLK, SWDIO.

I think the root cause was too much solder paste on the big thermal pad below the housing. The boards were manually printed with solder paste using a stencil. During reflow soldering, the chip floated high on the solder paste on the thermal pad so that not all pins at the edges of the housing were connected. For the next design, I will shrink the hole for the thermal pad in the stencil significantly or remove some of the solder paste from the thermal pad manually before placing the components.

My colleague managed to fix the issue with some flux, tiny drops of solder paste and hot air. Now all connections are in the resistance ranges given above, all chips could be programmed.

Thanks to BiBi_1928986 for many valuable informations.

View solution in original post

0 Likes
4 Replies
BiBi_1928986
Level 7
500 replies posted 250 replies posted 250 sign-ins
Level 7

Hello.

I would start by checking Vccd on the layout.  Too many times, this has been connected to Vddd or Vdda by mistake.  For the QFN 40-pin package, I see Vccd pin is next to Vddd pin.  Look for a short there on the circuit board.

Vccd (for this device) should only be connected to a 1uF capacitor and nothing else, unless you are powering it with 1.8V, but that's a different story.

If your layout/schematic looks good, then power up the circuit board and measure the voltage at Vccd.  It has to be +1.8V.  If you see 5V, then the device is likely damaged.  At best, it will be un-reliable, but might show signs of life.

We've seen this scenerio several times, where a PSoC will power-up/program the first time and then never again.  Vccd is generally the issue.  Or, you've configured the alternate SWD function as GPIO.  That's a whole other issue!

I'd also suggest you review the app note AN88619, PSoC 4 Hardware Design Considerations:
AN88619 - PSoC® 4 Hardware Design Considerations (cypress.com)

And, good for you to have short SWD signal wires!  Too many people make the mistake of using 20cm length wires and can't communicate with PSoC.

BTW, when programming, with Kitprog or Miniprog, you still need to connect the target PSoC Vddd to the programmer.  The programmer reads this voltage to know if it should lower its Vtarg voltage to 3.3V or lower, or leave it at 5V.  This applies to powering PSoC target externally, or from programmer.

Lastly, review the 5 schematics/layouts around the SWD port to find any differences in this interface between what worked and what didn't work.  Maybe a connector is on backwards or the silkscreen mis-labeled pin 1.

Good luck with your project(s).

 

0 Likes
GuNo_288966
Level 4
25 replies posted 10 replies posted 10 questions asked
Level 4

Thanks for the quick reply.

The 5 boards are 5 copies of one board layout, the PCBs were produced and populated together, so they are identical (at least they should be...). Nevertheless, the boards behave differently.

VCCD is connected to 1uF, and I measure 1.8V there. I have to admit that I made the mistake you mentioned some years ago 🙂

The SWD pins are the original ones, nothing changed in the configuration.

All 5 lines, including Vddd, are connected to the Miniprog4, also when external power is used.

I will review AN88619 tomorrow, now it is close to midnight here.

 

0 Likes
BiBi_1928986
Level 7
500 replies posted 250 replies posted 250 sign-ins
Level 7

Hello.

Sorry for my confusion.  5 of the same board.  Understood.

Well, look for misplaced components that directly involve PSoC chip.  Like a capacitor swapped with a resistor.  A diode installed backwards.

Depending on how many devices are on circuit board, Miniprog might not provide sufficient current.  You may have just been lucky with 3 boards.

The other possibility is, PSoC Programmer is not configured for Miniprog correctly.  Although, it sounds like you have some experience with Miniprog.  So this would just be to double check your settings.  How about providing a screen capture of PSoC Programmer window when it fails.

0 Likes
GuNo_288966
Level 4
25 replies posted 10 replies posted 10 questions asked
Level 4

Problem found and fixed!

I will describe now how the problem can easily be measured with a multimeter.

The reason was a hardware/production issue, bad connections of one or more of the SWD lines XRES, SWDCLK and SWDIO. At the QFN package (that I had to choose because it was the only one that is available in today´s component availability crisis) these pins are below the package and therefore are barely visible.

I measured the resistance between the pins of the 5 pin programmer connector on the PCB. Here are the results for the good boards:

XRES to GND: 150 to 400 kOhm

SWDCLK to GND: 14 to 26 MOhm

SWDIO to GND: around 15 MOhm

VTARG to GND: around 200 kOhm (note that this includes the PSoC chip and other components on the PCB and may be significantly different for other boards)

The boards that could not be programmed have no measurable resistance (0L) on at least one of connections XRES, SWDCLK, SWDIO.

I think the root cause was too much solder paste on the big thermal pad below the housing. The boards were manually printed with solder paste using a stencil. During reflow soldering, the chip floated high on the solder paste on the thermal pad so that not all pins at the edges of the housing were connected. For the next design, I will shrink the hole for the thermal pad in the stencil significantly or remove some of the solder paste from the thermal pad manually before placing the components.

My colleague managed to fix the issue with some flux, tiny drops of solder paste and hot air. Now all connections are in the resistance ranges given above, all chips could be programmed.

Thanks to BiBi_1928986 for many valuable informations.

0 Likes