Spudmn's Puma board build

All home-built FreeEMS implementations without a forum of their own, usually TA-based.
Post Reply
User avatar
nitrousnrg
LQFP144 - On Top Of The Game
Posts: 468
Joined: Tue Jun 24, 2008 5:31 pm

Re: Spudmn's Puma board build

Post by nitrousnrg »

From the very very beta assembly manual:

7. Troubleshooting
You followed exactly what this document said, but things didn’t worked well. Ok, fear not, lets
do some basic checking:
• FreeEMS code is loaded but it doesn’t run.
Verify the firmware you loaded: Open Loader->Rip, and diff the .s19 file with the original.
The only differences should be in the last part (that is the SM itself)
If it seems right, you are probably in Serial Monitor mode.
The LOAD/RUN header should be left open to allow for FreeEMS code to run. While in
SM mode, the header pin is at 0v, and while running FreeEMS, the same pin has a 50hz
square wave (with a multimeter you’ll measure 2.5v).

The FT232 output (pin 1) must have a pullup so the MCU can leave the SM mode
(link to USB hack). Check it is working.
• Nothing works:
Check PLL and oscillator by measuring the voltage in the MCU-side of R175. It should
be around 1.5v
. If it is 2.5v (totally pulled up), you have a problem with the crystal or
the PLL circuits. Check the solderings or continuity.
• BDM pod throws an error:
Check you have 5v or 2.5v in all the required VDD pins. Check continuity in the BKDM
line. Check PLL and crystal.
Marcos
User avatar
Spudmn
LQFP112 - Up with the play
Posts: 232
Joined: Thu Feb 10, 2011 12:27 am
Location: Auckland, NZ

Re: Spudmn's Puma board build

Post by Spudmn »

Marcos

Spin1 Assembly and installation.pdf states

To start correctly, MCU start must be delayed. In this spin it is done with a capacitor in the bdm
header (2.2uF and 10uF worked consistently so far).

I need more detail. Which cap connects to which pin?

So far I have a tried a 10 uF between Reset and GND.
User avatar
nitrousnrg
LQFP144 - On Top Of The Game
Posts: 468
Joined: Tue Jun 24, 2008 5:31 pm

Re: Spudmn's Puma board build

Post by nitrousnrg »

Oh,
Fred, I just deleted that pdf. Where can I upload new the latex-based pfd Manual? I don't have a server to easily scp stuff from my PC.

Spudmn, there is a newer documentation, sorry for leave that old doc in the repo. New one its in docs/LaTeX/manual.tex, in Spin1_branch branch. The idea is that I compile the .tex, get a pdf, and put the pdf in a public place to be downloaded...

The cap was the workaround for the FT232 pullup issue. You don't need it, although is a good practice to have some capacitance between reset and ground (I said 0.1uF a couple of posts ago).

Umm... there isn't any pullup in the boad for RX or TX pins... Maybe it needs to be pulled up externally? TA board has an IC (SP232A) connected to those pins, it could be pulling up on the startup.

Do you have around 1.5v in R75, or a square wave close to 50hz in one of the RUN/LOAD header pins?

EDIT=50Hz must appear only in RUN mode, since in LOAD mode you tie it down that pin to ground :-)
Marcos
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Spudmn's Puma board build

Post by jharvey »

I believe a 10uF electrolytic has worked in two separate builds. So that should be a good approach. Caution, Marcos pictures seem to indicate the cap across different pins, don't trust your eyes there. It's an optical illusion. It really goes across gnd and reset, the two closest to the MCU. A better solution would be to use the PNP transistor as noted in Fred's build diary. No resistors required, just the PNP.

There may be some learning curve with FreeEMS loader. Know gotchas include funky characters of no real importance displayed on the GUI, and a crash issue on at least one Ubuntu 10.10 machine when ripping only. However it successfully ripped and loaded firmware, so it appears to be a rip only bug.
User avatar
Spudmn
LQFP112 - Up with the play
Posts: 232
Joined: Thu Feb 10, 2011 12:27 am
Location: Auckland, NZ

Re: Spudmn's Puma board build

Post by Spudmn »

The cap was the workaround for the FT232 pullup issue. You don't need it, although is a good practice to have some capacitance between reset and ground (I said 0.1uF a couple of posts ago).
I tried that one first. I then got confused with the old documentation.
Umm... there isn't any pullup in the boad for RX or TX pins... Maybe it needs to be pulled up externally? TA board has an IC (SP232A) connected to those pins, it could be pulling up on the startup.
I now have a pull up on the FT232 Tx pin.
Do you have around 1.5v in R75, or a square wave close to 50hz in one of the RUN/LOAD header pins?
Yes I get 1.5V on R75 but I don't get 50 hz on the Run/load header in SM mode or when it is on Run mode.

Still havn't found out what is wrong. :(
User avatar
nitrousnrg
LQFP144 - On Top Of The Game
Posts: 468
Joined: Tue Jun 24, 2008 5:31 pm

Re: Spudmn's Puma board build

Post by nitrousnrg »

What about a hard reset a while after startup, by bridging GND and RESET in the bdm header? When I had startup problems, a hard reset made it start ok (well... it was just luck).

One of my MCUs had a badly soldered pin, but that issue manifested soon as I tried to program the SM.

A picture of your setup may be useful too.

Not sure if this can help you... but here is the mentioned manual
https://github.com/nitrousnrg/puma-webs ... Manual.pdf

So far, the only differences between yours an mine are the FT232 and the PLL values... but the PLL isn't that complicated, and it seems to be working. I assume your SM programming passed the verification...
Marcos
User avatar
Spudmn
LQFP112 - Up with the play
Posts: 232
Joined: Thu Feb 10, 2011 12:27 am
Location: Auckland, NZ

Re: Spudmn's Puma board build

Post by Spudmn »

nitrousnrg wrote: I assume your SM programming passed the verification...
As far as I can tell I programmed it correctly. The software used wasn't very informative. It only seemed to tell you if it failed to verify, but displayed nothing if it was OK.

I will have another look at it tomorrow.

Thanks
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

I was there with Aaron when he burned his cpu and it did indeed behave correcty, even if the software was horrid. The fact that it burned says that the PLL stuff is just fine.

Can you get anything out of it at all? IE, is the SM running or just no comms at all still?

If the SM is running, then we should diagnose that issue (simple), if the SM isn't making noise when spoken to, then you should probably scope the input pin to the processor and make sure you see the data fly past when you send stuff to it.

Have you triple checked the rx to rx and tx to tx or whatever it's supposed to be? I find the nomenclature there confusing as rx to one thing is tx to another, etc.

Let us know which state you're in and we'll go from there.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Spudmn
LQFP112 - Up with the play
Posts: 232
Joined: Thu Feb 10, 2011 12:27 am
Location: Auckland, NZ

Re: Spudmn's Puma board build

Post by Spudmn »

Still no luck.

No Comms at all in SM or Run mode.

I have scoped the pins on the chip and can see the coms arrive on the RXD0 pin but nothing coming out of the TXD0 pin.

It still could be a Xtal / PLL problem. Even though I think I have everything right. If the Xtal is frequency is not right, then the Baud rate might be wrong and the SM wont reply. The Main code won’t run until the PLL has locked.

I guess that the BDM would still work because it is self clocked.

Can someone point me to the source code for the SM.
User avatar
nitrousnrg
LQFP144 - On Top Of The Game
Posts: 468
Joined: Tue Jun 24, 2008 5:31 pm

Re: Spudmn's Puma board build

Post by nitrousnrg »

Spudmn wrote:Can someone point me to the source code for the SM.
I'd like to see it too...

What about trying other values for the PLL components? Maybe now you can get the values I used. It could even be TH for testing (http://i.imgur.com/PwRiJ.jpg)
Marcos
Post Reply