Minimal Connection for UC3C

Go To Last Post
27 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Hi all. I have used Arduino boards and while building my product, realized I need more RAM than the MEGA 2560. I locked in on UC3 (read a lot of reasons why ARM might be better, but it seems to fit my needs well and should be a small step from AVR 8 (i hope)).

I ordered some chips, got a few breakout boards for TQFP-100 and after a bad soldering job, got one soldered really well. I followed the ATMEL getting started (AVR32768 app note).

 

I have connected everything following the 5v single supply. The only exception is that I do not have an RF EMI inductor for my ADC, but I think that is not important right now.

I connected the DM/DP pins to 39 ohm resisors and white/black wires of a spliced usb cable. VBUS to red, black to ground.

I connected a button to reset and PA14 (pin 20) for triggereing the entering of ISP mode.

 

I've tried to get the DFU boot running, but my computer does not see a device. I hooked up an oscilliscope to the white and green usb wires, but i dont see anything at all happening. Really not sure where to troubleshoot from here.

Please help.

 

Please let me know if you would like me to provide any information, I'd be happy to compile it.

 

Many thanks!

This topic has a solution.

when the ash and dust settles, we will still be on a giant rock hurdling through space

Last Edited: Thu. Nov 3, 2016 - 10:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

AVR32 is nothing like a AVR8. The learning curve is about the same as an ARM device and the ARMs have more support.
Considering you can get ARM based boards with debugger for $5 usd and up, it is hard to beat.

If you want to persist with the AVR32, look at the schematics of one of the dev boards.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you so much for the super quick response. I did pull up the schematics for the ATUC3C-EK, and as best as I can tell, I am connecting correctly. They have additional components that I do not, so I think I am doing it correctly. For example, there is a seperate IC for USB power control on the EK, but I am just using a diode (which seem to fulfill the requirements). I connected the following:

1. Power .. exception from this is that I do not have an RF EMI inductor, tried with wire and 100 ohm resistor instead.

2. Wired reset button and PA14 (PB0 on eval board) to buttons as follows:

3. Connected a crystal (16MHz) between xin0 and xout0 (pins 47 and 48 on 100 pin version of chip)

4. I placed a ceramic capacitor 100nF as recommended here.

 

5. USB connection - I connected the D+ and D- via 39 ohm resistors. red/5v goes to my VBUS pin and into my 5v regulator. Ground from PC/USB cable connected to ground of MCU. 

 

 

I've tried the sequence of holding down the PA14 button while pressing reset. according to Atmel documentation, that should allow the PC to detect the Atmel chip and allow me to install drivers, but I get nothing.

 

 

 

I may chose to move to ARM at some point and I know it is very wide spread nowadays. I still want to get this up and running if I can :)

when the ash and dust settles, we will still be on a giant rock hurdling through space

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The type and placement of the capacitors is critical. They should be ceramics, smd and mounted close to the pins. The regulators need to be carefully chosen so they work with ceramic caps.

The inductor can just be a piece of wire for the time being - this is mainly to filter the supply to the ADC. Without the inductor, the ADC reading may be a bit more noisy, but it won't stop the device from working.

VBUS should connect to the USB bus power. The switching circuitry is for when it is used as a USB host. Have you checked to see you have the USB wired correctly? It's easy to swap DM and DP by mistake.

You really want to buy a ready made board for these devices - what you get away with a AVR8 just doesn't work when it comes to these newer high speed devices.

 

Last Edited: Wed. Nov 2, 2016 - 04:50 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Kartman, Thank you so much!

I did use ceramic capacitors for all but the 2.2uF on VDDIN_33 and VDDCORE pins.

 

Maybe the distance is the issue.. The way i wired it up is I have the MCU mounted on a breakout board (just converts pinouts to standard 2.54mm pitch pins. Then I have 20mm wires leading from the break out board to a breadboard, where i have all of the additional components mounted.

 

" Have you checked to see you have the USB wired correctly? It's easy to swap DM and DP by mistake." Yes. they are for sure (double triple quadruple checked) to not be backwards. DM goes to my white wire from USB plug, DP goes to green D+.

 

"VBUS should connect to the USB bus power. The switching circuitry is for when it is used as a USB host." So right now, I have the 5V (red) wire from the USB cable leading to this pin on the MCU. Is that the same as being connected to USB bus power? Pardon my ignorance, I am learning :)

 

"You really want to buy a ready made board for these devices" - this might be a bit too ambitious, but I started EE in Arpil for several reasons. I wanted to learn how to build electronics, and I have a need for a particular device. Fast forward 6 months and I finished prototypes of each component as individual modules (subset of needed components wired to Arduino MEGA). When I started to combine them all into one controller, I ran into the RAM constraint and decided I need a different device with more RAM. To me, it seemed like going to this UC3C was my best approach because the change from AVR8 to AVR32 should be smaller than AVR8 to ARM, and I think this chip has everything I would need for my device for the foreseeable future.

So going down this UC3C chip, the reason I wanted to start with the MCU and build out:

  1. I found 1 development board for it, but the board is $330. That is a lot, not that I could not afford it, but it doesn't validate my requirements (that I can build the device at a certain price point). So to validate that I can use it and fit into my target cost for the device, I wanted to build it out.

 2. One of the reasons I started getting into EE was my desire to build. I have a software engineer background, so for me to now build from the MCU out, and software stack on top is the ultimate "personal growth" goal. 

 

It might have been the wrong reasons to go down this route. If you think so, please let me know. Maybe I would be better off with ARM as you suggested, and maybe I can get a board that will do what I need cheaper and get up and running without some of these headaches.

when the ash and dust settles, we will still be on a giant rock hurdling through space

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Just to give you an idea of how I have it set up... this is it:

 

 

USB comes from the right side.. this is a wire that used to be USB A to micro that I spliced. It supplies power to bottom right rail. From there, I have a wire leading to VBUS and a diode leading to rail connected to external source (bottom left).

5V external power source comes from left (I've ranged its output from 5V up to 7.5V. It supplies power to the bottom left rail.

From the bottom left power rail, I have a switch and 5V regulator leading to top left rail. This is the digital power source.

From there, I have a regular wire (but have tried a few other things) leading to ADC power, top right rail.

Left button is wired to reset, right button is wired to PA14.

 

As I mentioned I am fairly new to this world, so if something seems ridiculous, please let me know (after you've had a good chuckle).

 

 

Cheers.

 

 

when the ash and dust settles, we will still be on a giant rock hurdling through space

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So do you build programs by cobbling together bits of code?

 Or do you use proven, well tested functions after first designing a test plan and project requirements?

 

In some ways, HW design/building is a lot like SW design/coding!

 

 

Jim

 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I can see a number of problems with your setup - the crystal has to be close to the chip. The inductance and capacitance of your long wires will kill any oscillation. The caps for the three power rails need to be smd and close to the chip. Your regulator needs capacitors so it doesn't oscillate. I can't see how you generate the other power rails. I've prototyped using a breakout board before but i normally solder the caps, crystals and regs 'dead bug style' on the board as well as running tinned wire for the power around to the required pins. This is fiddly shit work and is easy to make a mistake and waste days. If i can get a dev board then this is the direction i go for.
Using your jumper wires is really only good for lowspeed signals - fine for hooking up some leds and i2c stuff, but that's about all.

Hardware lives in the real world - and the real world aint too friendly!

I can see you had fun soldering the chip. The secret is flux gel - it stops the solder from bridging so you can 'wipe' a ball of solder across the pins in seconds. A 10cc syringe of flux gel costs around $15 usd and lasts a while.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you so much for the directions. I realize these are probably basic concepts to you, but to me this is all new, so I really appreciate the pointers to where I am really off base.

Yes, the soldering was fun :) I think I have the flux you mentioned (247-LOWTEMP-15 lead free solder paste). I wasn't able to get it running, so I went over it a few times after not seeing my issue, to double check that all pins had good contact. As you said, you can spend days.

 

I understand now that I cannot include this approach in my path for my product, so I am going to try picking up ARM dev boards and move in that direction. It will be more code to migrate, but that is ok.

Long term/spare time, I would like to continue down this path because I really want to know how to build it, and pick up the knowledge (like no jumper wires for hi speed processors).

Along those lines, if I do as you suggested and solder a tiny board for oscillator circuit so i can connect it directy to pins from my breakout board (so distance should be < 2cm), and solder caps right to pins (< 1.5 cm), and wire power pins together on the same breakout board (so only thing leading to breadboard would be 1 5V wire, 1 GND wire, D- and D+ for USB, and other GPIO pins,  would I be in better shape, or still too far off base.

 

 

Again Kartman, thank you so much for helping get a better understanding.. I sort of jumped into this and feeling my way around the dark. 

when the ash and dust settles, we will still be on a giant rock hurdling through space

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, thanks for chiming in.

I get what you are saying.. I build on top of premade packages when building production code, except where optimization benefits outweigh the costs.

I have two goals I am currently  tackling, one is to build the product, the other is to learn. I think I will go as suggested by Kartman and move into ARM dev boards to move my project along, but I also want to learn how it works so that I could build it from the ground up if needed (and troubleshoot/understand later). On that note, when I was learning how to write code, I did write assembly to learn how compilation and some of the cpu architecture works, C++ to learn how memory management, linked lists, etc works, unix to learn netowrking, i-node index and other comcepts.. etc, so I am now doing the same, just in the hardware world :)

P.S. I am getting into hardware because as a software engineer I wanted to get down to the ones and zeros. At my level, I have abstraction from hardware and have written software without the intimate knowledge of the hw I am running. But a curious mind can't let that abstraction slide forever ;)

when the ash and dust settles, we will still be on a giant rock hurdling through space

Last Edited: Thu. Nov 3, 2016 - 09:03 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I took some photos of something I did earlier......

 

If you look closely on the bottom photo (top side) you'll see a number of 0603 SMT caps. This chip is a ARM7 based TMS470 from Texas Instruments. The top is an example of 'dead bug style' for the voltage regulator. For your crystal, you'll need to do much the same - a couple of smt caps and just solder the crystal into the required holes. For your USB connecion - just strip back the USB cable and solder to the holes. The 'holes' in your case have pins inserted - so either solder to the long end of the pin or to the top of it. Expect the wire to break at some stage - so handle your creation carefully!

 

Solder and flux gel are two different things! What I'm talking about is:

http://www.digikey.com.au/produc...

The bottom photo is a little blurry, but you can see the result of my hand soldering. Not perfect, but close enough. Done with a chisel tip, flux gel and 22swg solder. Tag the corner pins and ensure the chip is located correctly, then run a thin line of flux gel along the pins then get the soldering iron, make a small blob of molten solder and gently wipe across the pins. A little practice and you'll have the technique. Sometimes the blob 'sticks' at the end - a bit of solderwick fixes this or employ gravity and heat the blob then tap the board on the bench. Expect the solder to splatter. You can use a similar technique to clear the holes. It takes a little practice to heat the solder then tap!

So, don't give up just yet - your problem might be able to be salvaged with a few modifications.

.

 

Last Edited: Thu. Nov 3, 2016 - 11:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Many thanks. These are great tips for me.. I'll start into it tonight :)

I'll let you know how it goes.
I also got an arduino duo with cortex m3. From what I've read, if I am choosing from scratch, the m4f fits best, but I hope with this being arduino based, I can make the switch with fewer variables.

I have been in the same spot for two weeks before reaching out for help. I am really glad this community exists and that you are in it.

Best regards!

when the ash and dust settles, we will still be on a giant rock hurdling through space

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Whilst I'm at the computer and equipped with iphone, here's a more recent endeavour of mine. The star of this show is a Kinetis KV30F128. A nice little 100MHz Cortex M4 with 128k flash and 16K ram in 32pin QFP. No crystal needed as this has a reasonably stable internal oscillator. You can see two smt caps for the power and a resistor for the reset pullup. QFN packages are tricky to solder, but luckily Adafruit Industries know this and give us extended pads so we have a chance of hitting it with the soldering iron. A fine tip was needed here...some flux and some patience. This was take 2. The first try, whilst successful, but there was some flash lock issue with the chip. Went around in circles for a couple of hours trying everything then thought to try an new chip. Success!

Another sage word of advice - you REALLY need debug tools for these newer devices. If you try to access illegal addresses or peripherals that aren't enabled - you drop into a fault handler. For even experienced people, this causes some grief - but with a debugger you can look at the stack and find out where it went wrong. With no debugger it is a case of shooting blindfolded. You can see the dark pcb is the debugger - in this instance a FRDM-KL25Z board. I went against my own advice with this - I could've easily purchased a FRDM-KV31 board for around $30USD, but I had to do it the hard way, but hey, the chips were cheap!

 

Sorry guys, no Atmel product was mentioned here, nor Microchip, but look closely at my stash of dev boards and you'll see an Atmel one buried in there.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thought I'd Google USB wire colors -

 

 Have you checked to see you have the USB wired correctly? It's easy to swap DM and DP by mistake." Yes. they are for sure (double triple quadruple checked) to not be backwards. DM goes to my white wire from USB plug, DP goes to green D+.

according to my Googling - white is DP, green is DM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

From figure 9.1 in post #3, dm goes to D-
And from attached image/Google that is the white pin. Maybe I got it wrong, but it seems ok.

Attachment(s): 

when the ash and dust settles, we will still be on a giant rock hurdling through space

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you, this is inspiring. I have a shmartboard breakout with those little mounting points. I have some smd components, but I don't remember if the size will work or even what size it is.. I think it's 0805.
Can't wait to try.
Do you know if the oscillator is necessary. The mcu dataset mentions that it has an internal rc clock, but I wasn't sure if I have to add an oscillator or not.

when the ash and dust settles, we will still be on a giant rock hurdling through space

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There seems to be conflicting information on the interwebs - probably why each time I've designed a board using USB, I've got the wires swapped! Also, some cables lie! Beep it out from the 'A' connector to be sure. One thing's for sure - one way it works, the other it doesn't. Swapping the data wires is not going to cause any damage.

You don't necessarily need to use a Schmartboard - it was just that I had the example floating around in my box. 0805 should solder between the pins ok. You can also power the board from USB - saves an extra regulator. As for the crystal being necessary - you'll have to read the datasheet/manual. I have no experience with the UC3.

[edit] just referred to my mindshare usb2.0 book - seems green is DP and white DM. I'd still beep out from the connector to be sure. 

Last Edited: Fri. Nov 4, 2016 - 01:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So.. I soldered the capacitors directly to the breakout board, and double checked that I do not have to connect an oscillator to get started. Tried USB D+ and D- both ways, no go. hooked up an oscilloscope to those pins, nada.

I started checking the voltage and found that my VDDIN_5V pins (all connected with a wire now) were at 5V. check. My VDD_CORE was at 1.91V.. i think check. But my VDDIN_33 (which i would suspect should be at 3.3V was registering about 330 mV). 

I checked capacitance between pins with device turned off:

VDDIN_33 to GRD cap is registering as 2.2uF correctly. (where voltage is off).

VDD_CORE to GRD cap is registering at .013 nF. (where voltage registers fine).

 

Not sure what is going on.. but I will keep plugging.

when the ash and dust settles, we will still be on a giant rock hurdling through space

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you could purchase/borrow a Dragon or an ATMEL-ICE (recommended) that would help you a lot to find out what is going on. (First of all to check whether the debugger can read the voltage level and a valid device ID at all.)

You could also try the 3.3V power supply setup.

BR,

M
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Thanks Menahem! I don't anyone that might have a ATMEL-ICe or Dragon locally (my friend is into PIC controllers), but I was able to test voltage for pins (VDD, core) and see the correct voltage. I will try to get my hands on a debugger somehow though.

 

I did end up going with Kartman's suggestion about dead bug style and I did step down to 3.3v.

Unfortunately I have the same result, no data on USB. 

I bought a debugger for ARM (Olimex Ltd. ARM-USB-TINY-H) but I don't think that will help me with this AVR32 chip, will it?

when the ash and dust settles, we will still be on a giant rock hurdling through space

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For the cost of that debugger you could have bought a number of dev boards with debuggers!
Last post there were some voltage issues - did you resolve them?
I've not looked at the datasheet for your device, but there's normally power pins all around the chip. These each need a capacitor and short wiring. You can see an example of this on my board.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

well I currently experiment with the command line tool "atprogram", from its help text:

  -t  --tool <arg>           Tool name: avrdragon, avrispmk2, avrone, jtagice3,
                             jtagicemkii, qt600, stk500, stk600, samice, edbg,
                             medbg, atmelice, powerdebugger, megadfu or flip.

 

so maybe you can use one of those options to connect your olimex JTAG debugger with it over the JTAG pins. from the AT32UC3C datasheet:

 

jtag pinout

 

greetz

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For the cost of that debugger you could have bought a number of dev boards with debuggers!

Like what ? for examples could you list some of these dev boards ?

 

Regards,

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Digikey and farnell/element14 have a large range of boards.
http://www.digikey.com/product-detail/en/infineon-technologies/KITXMC2GOXMC1100V1TOBO1/KITXMC2GOXMC1100V1TOBO1-ND/4832815

http://www.digikey.com/product-detail/en/cypress-semiconductor-corp/CY8CKIT-059/428-3390-ND/5184557

Both these are under $10 usd.

TI, ST have got a number of offerings under $20 usd

In my stash you'll see a number of TI boards - they used to give free delivery which was a bargain for me in Australia. They had the lm4f120 launchpad boards for $4.95 some time ago. These are now obsolete but still supported by their free tools. Their lm4c1249 launchpad is around $20usd and has ethernet. This has reasonably good support by TI with app notes and their tools.
Have a look at mbed.org for other boards. There's plenty of geek learning to be had for the price of a Mac meal.

Last Edited: Wed. Nov 9, 2016 - 09:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks! I moved to ARM for now, so I am using Open OCD. Much appreciate the help regardless :)

when the ash and dust settles, we will still be on a giant rock hurdling through space

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So to give you an update (after all the advice)
I went down the ARM road.. been here for 2 weeks. In those twords weeks I was able go get all my code ported over from mega to due and finish off the hardware labs I was having difficulty with (what seemed like bugs look like we're the lack of power in mega).
Long story short, while I had to leave the education of building mcu out behind for a bit (sad face), I was able to get back on track with my product goals. Thank you a million times.

when the ash and dust settles, we will still be on a giant rock hurdling through space

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nothing like a bit of success! Maybe one day when you're bored you can revisit the UC3 board and maybe the problem will reveal itself. Until then, onward and upward.