Pin out research thread - proof that i'm working on it lol

From DIY contraptions to sophisticated FreeEMS-specific designs! Plus general hardware development!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - proof that i'm working on it lol

Post by Fred »

I just tried bridging those pins to ground and still no dice.

I might utilise my serial stuff to send out data in a slower stream and disable the init for the pins and see what the latest code looks like with no messing.

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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - proof that i'm working on it lol

Post by Fred »

An 0x0300 block of register from 0x0000 up sent from the device with the packetised serial and displayed in the tuner. How you say, those buggers haven't given me any new buttons for a while ;-) Well, I stole the soft reset button to send this when hit ;-) Now to compare with what I got before and see what differs if anything.

Code: Select all

0000:  40 00 00 00 00 00 00 00  1f 00 01 80 d1 00 3f 07   @.............?.
0010:  00 00 00 04 00 00 f8 fe  00 00 c4 10 c0 00 40 00   ..............@.
0020:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0030:  fe 00 40 00 09 03 00 7c  80 80 f1 81 00 00 80 00   ..@....|........
0040:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0050:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0060:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0070:  00 00 00 00 00 00 ff ff  00 00 00 00 00 00 00 00   ................
0080:  07 0f 80 40 05 b0 96 00  80 00 00 ff 00 00 ff ff   ...@............
0090:  01 06 01 05 01 06 01 06  01 02 01 06 01 06 01 07   ................
00a0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
00b0:  00 00 00 80 00 00 00 00  00 04 00 00 c0 00 00 00   ................
00c0:  00 04 00 00 c0 00 00 00  00 16 13 08 c0 00 80 cc   ................
00d0:  00 04 00 00 c0 00 00 00  04 00 00 20 00 00 00 00   ........... ....
00e0:  00 00 00 80 00 00 00 00  00 00 00 00 00 00 00 00   ................
00f0:  04 00 00 20 00 00 00 00  04 00 00 20 00 00 00 00   ... ....... ....
0100:  ca be 00 00 c7 c0 00 ff  00 00 00 00 00 00 00 00   ................
0110:  00 00 00 00 ff c0 00 00  00 00 00 00 00 ff ff ff   ................
0120:  00 f7 00 00 00 00 01 10  07 00 00 00 00 00 00 00   ................
0130:  00 04 00 00 c0 00 00 00  00 04 00 00 c0 00 00 00   ................
0140:  01 11 00 00 00 00 07 00  00 00 00 00 00 00 00 00   ................
0150:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0160:  2e f1 4c 92 0c 2b b2 56  84 35 c5 1f f8 d0 54 c4   ..L..+.V.5....T.
0170:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0180:  01 11 00 00 00 00 07 00  00 00 00 00 00 00 00 00   ................
0190:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
01a0:  8b 84 54 3e d3 31 0b 45  77 bc ba bc cd 1b a0 14   ..T>.1.Ew.......
01b0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
01c0:  01 11 00 00 00 00 07 00  00 00 00 00 00 00 00 00   ................
01d0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
01e0:  ec 00 71 ed 09 f4 44 e6  83 2b e7 aa a8 e0 a3 63   ..q...D..+.....c
01f0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0200:  01 11 00 00 00 00 07 00  00 00 00 00 00 00 00 00   ................
0210:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0220:  2c c1 a2 e7 15 c4 cc 92  af 33 32 e9 30 a5 95 45   ,........32.0..E
0230:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0240:  03 03 00 00 00 00 00 00  0f 0f 00 00 fe 00 00 00   ................
0250:  0f 0f 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0260:  ff ff 00 00 00 00 00 00  37 37 00 00 f7 00 00 00   ........77......
0270:  00 ff 00 00 00 00 00 00  ff ff 00 00 00 00 00 00   ................
0280:  01 11 00 00 00 00 07 00  00 00 00 00 00 00 00 00   ................
0290:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
02a0:  f4 95 1e 1b 4b 7e 04 6f  1e 01 8e b2 20 b1 c5 07   ....K~.o.... ...
02b0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
02c0:  07 07 80 40 05 b0 94 00  78 00 00 ff 00 00 00 ff   ...@....x.......
02d0:  03 64 03 6b 02 45 02 96  01 c1 02 59 00 fe 01 f9   .d.k.E.....Y....
02e0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
02f0:  00 02 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - proof that i'm working on it lol

Post by Fred »

Diffed the two plugged sets, may do an unplugged freeems as well to be complete.

Results from plugged set are :

0x0000 is porta and though all LEDs are driven on, only the SM pin shows up as on because only it has a sufficiently strong pull up on it. The strange thing is that the pull up is enabled for that pin.
0x000C is the pull up control reg. all bits are the same except the porta bit which is ON. This is a mystery, and a big clue as to what is occurring. Unfortunately I don't touch that reg in my code... and the docs don't mention that control bit by name.
0x0016 is rpage and is of course different.
0x0034 pll reg setup by me
0x0035 pll reg setup by me
0x0038 rti ctl reg setup by me
0x003B rti ctl reg setup by me
0x0080 up to
0x009F are all ADC regs and setup by me
0x00C8 up to
0x00CF are SCI regs setup by me
0x0100 flash reg, written by sean and sm
0x0110 eeprom reg written by sm only
0x0121 is the vector base reg setup by me
0x0127 INT_CFADDR interrupt priority regs by SM
0x0128 INT_CFDATA0 interrupt priority regs by SM
0x0129 INT_CFDATA1 interrupt priority regs by SM
0x024C PERS pull enable - this is not touched by me, why is it on?
0x024D PPSS pull up/down - this is not touched by me, why is it on?
0x02C0 up to
0x02DF are all ADC regs and setup by me
0x02F1 is the low voltage interrupt reg setup by me

more to come...
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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - proof that i'm working on it lol

Post by Fred »

Code: Select all

00000000: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000010: 00 00 00 00 ff ff ff ff   ff ff ff ff d9 da 91 a5   ................
00000020: 70 ff ff ff 00 00 00 00   00 00 00 00 00 00 00 00   p...............
00000030: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000040: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000050: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000060: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000070: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000080: 00 00 00 00 00 00 fe 00   00 00 00 00 00 00 00 00   ................
00000090: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000a0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000b0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000c0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000d0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000e0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000f0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
This is the fourth 0x100 sized block, as before the following four are all zeros.

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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - proof that i'm working on it lol

Post by Fred »

Those diffs are all PWM register stuff.

This leaves NO clue as to why the pull regs are different!!! hmmmmm unless my way is default and the SM modifies them or the mod/romctl stuff is causing it.

The docs need further reading, but concentrating on that crap for that long is hard.

I've given it a fair shot, tomorrow is firmware and serial docs day and release.

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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - proof that i'm working on it lol

Post by Fred »

I realised that I didn't try the firmware with the leads unplugged, so I'm doing that now :

Code: Select all

00000000: ff 00 00 00 00 00 00 00   9f 00 00 80 d1 00 3f 07   ..............?.
00000010: 00 00 00 05 00 00 f8 fe   00 00 c4 10 c0 00 40 00   ..............@.
00000020: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000030: fe 00 ff 00 09 03 00 7c   80 80 f1 81 00 00 80 00   .......|........
00000040: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000050: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000060: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000070: 00 00 00 00 00 00 ff ff   00 00 00 00 00 00 00 00   ................
00000080: 07 0f 80 40 05 b0 90 00   48 c0 00 ff 00 00 ff ff   ...@....H.......
00000090: 01 22 01 21 01 21 01 35   01 2e 01 26 01 22 01 24   .".!.!.5...&.".$
000000a0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000b0: 00 00 00 80 00 00 00 00   00 04 00 00 c0 00 00 00   ................
000000c0: 00 04 00 00 c0 00 00 00   00 16 13 08 c0 00 80 cc   ................
000000d0: 00 04 00 00 c0 00 00 00   04 00 00 20 00 00 00 00   ........... ....
000000e0: 00 00 00 80 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000f0: 04 00 00 20 00 00 00 00   04 00 00 20 00 00 00 00   ... ....... ....
This is the 2nd block which can't be parsed due to escape handling issues in the tuner code...

Code: Select all

00000000: aa aa 11 00 09 01 00 ca   be 00 00 c7 c0 00 ff 00 
00000010: 00 00 00 00 00 00 00 00   00 00 00 ff c0 00 00 00 
00000020: 00 00 00 00 ff ff ff 00   f7 00 00 00 00 01 10 07 
00000030: 00 00 00 00 00 00 00 00   04 00 00 c0 00 00 00 00 
00000040: 04 00 00 c0 00 00 00 01   11 00 00 00 00 07 00 00 
00000050: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00 
00000060: 00 00 00 00 00 00 00 2e   f1 6c b2 4c 2b b2 56 82 
00000070: 35 c5 1e fe d9 c4 f6 00   00 00 00 00 00 00 00 00 
00000080: 00 00 00 00 00 00 00 01   11 00 00 00 00 07 00 00 
00000090: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00 
000000a0: 00 00 00 00 00 00 00 8b   a0 53 fe d3 bb 44 2b 0d 
000000b0: 77 9c ba bc cd 1b a1 94   00 00 00 00 00 00 00 00 
000000c0: 00 00 00 00 00 00 00 00   01 11 00 00 00 00 07 00 
000000d0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00 
000000e0: 00 00 00 00 00 00 00 00   fb e3 71 ed 4b b4 64 a6 
000000f0: 03 2b e7 a8 68 f0 a3 e1   00 00 00 00 00 00 00 00 
00000100: 00 00 00 00 00 00 00 00   74 cc 
Hand parsed :

Code: Select all

00000000: ca be 00 00 c7 c0 00 ff   00 00 00 00 00 00 00 00
00000010: 00 00 00 00 ff c0 00 00   00 00 00 00 00 ff ff ff
00000020: 00 f7 00 00 00 00 01 10   07 00 00 00 00 00 00 00
00000030: 00 04 00 00 c0 00 00 00   00 04 00 00 c0 00 00 00
00000040: 01 11 00 00 00 00 07 00   00 00 00 00 00 00 00 00
00000050: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00
00000060: 2e f1 6c b2 4c 2b b2 56   82 35 c5 1e fe d9 c4 f6
00000070: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00
00000080: 01 11 00 00 00 00 07 00   00 00 00 00 00 00 00 00
00000090: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00
000000a0: 8b a0 53 fe d3 bb 2b 0d   77 9c ba bc cd 1b a1 94
000000b0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00
000000c0: 01 11 00 00 00 00 07 00   00 00 00 00 00 00 00 00
000000d0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00
000000e0: fb e3 71 ed 4b b4 64 a6   03 2b e7 a8 68 f0 a3 e1
000000f0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00

Code: Select all

00000000: 01 11 00 00 00 00 07 00   00 00 00 00 00 00 00 00   ................
00000010: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000020: ac 8c 7a e1 15 c5 cc a2   bf 33 3a e9 30 e1 d5 c4   ..z......3:.0...
00000030: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000040: 00 00 00 00 00 00 00 00   ff ff 00 00 fe 00 00 00   ................
00000050: 0f 0f 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000060: 00 00 00 00 00 00 00 00   f7 f7 00 00 f7 00 00 00   ................
00000070: 00 ff 00 00 00 00 00 00   ff ff 00 00 00 00 00 00   ................
00000080: 01 11 00 00 00 00 07 00   00 00 00 00 00 00 00 00   ................
00000090: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000a0: ec 85 0e 12 6b 7e 04 6f   1a 11 0e b2 22 b1 e5 07   ....k~.o...."...
000000b0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000c0: 07 07 80 40 05 b0 95 00   4b 00 00 ff 00 00 00 ff   ...@....K.......
000000d0: 01 31 01 2a 01 2d 01 2d   01 2e 01 2c 01 30 01 3b   .1.*.-.-...,.0.;
000000e0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000f0: 00 02 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................

Code: Select all

00000000: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000010: 00 00 00 00 ff ff ff ff   ff ff ff ff 4c 4a 49 4a   ............LJIJ
00000020: 4b ff ff ff 00 00 00 00   00 00 00 00 00 00 00 00   K...............
00000030: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000040: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000050: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000060: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000070: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
00000080: 00 00 00 00 00 00 fe 00   00 00 00 00 00 00 00 00   ................
00000090: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000a0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000b0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000c0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000d0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000e0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
000000f0: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ................
fortunately its offset exactly 8 bytes so will be easy enough to eye ball.

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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - proof that i'm working on it lol

Post by Fred »

Nope, still no luck.

Please anyone that has some time, scour the manual trying to find out why those pull up registers might be enabled after reset. I'm lost and it's time for bed.

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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - proof that i'm working on it l

Post by Fred »

http://issues.freeems.org/view.php?id=186

Please, if you have any hardware, and half or more of a brain, help on this issue. It's by far the most important in the project right now.

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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - proof that i'm working on it l

Post by Fred »

It looks like the PORTA behaviour could be as simple as a SM code change! I can't believe that I never realised that. A BDM is required to test this, and some SM dev, VERY carefully, but that could solve it. We won't know for sure that that is the case until we try, though.

I intend to use the saleae to measure the time between power up and PORTA change and probably a few other key pins that change during reset too. That way I should get some interesting edge alignment clearly showing which state the changes occur in. This will 90% prove it, but it still needs real world testing. I will time it a few times as is, and then put a single pre-init line in main.c to clear that register and see if the timing changes, I bet it does.

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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - proof that i'm working on it l

Post by Fred »

Fred wrote:PORTA is constantly ON with no touching of IO regs at all.

I'm pretty sure now that it's in emulation mode or external chip mode or something. I bet if I pull up or down the right pins the flashing port A stuff will go away and we can get on with the hardware design! :-)
HUH! I just read this again, and realised that this is the case because the register contents are whatever the SM sets them to. IE, if the SM sets pullup on A and we don't turn it off, then it stays on!!! I'm still interested in what is happening to the other pins that I noticed weird behaviour on in this thread, but they are not key pins and can mostly be understood later. Need a BDM ASAP. Might have to order the FOSS one from TA to play with...

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!
Post Reply