I'll state my problem on top and describe the setup below.
To start with I should say that I am new to eTPU/eTPU2 usage. I do have fairly extensive experience with TPU/TPU3. I have written several fairly complex TPU3 functions so have reasonably good idea how the channel hardware works.
On a xPC56xxMB EVAL board with the xPC 564AADPT324S mini-module (MPC5644A, 324 pin), I am unable to make the CRANK (etpu set2) function work. It acts as if it just does not see the input signal. I have tried literally over 100 different configs, channel and engine setup, to no avail. All other functions work normally.
Codewarrior 10.4 default 5644 project with no operating system. Main program runs fine with eMIOS200, eQADC, eSCI, Flexcan modules all working.
Using the eTPU Graphical Configuration Tool (gct) for eTPU config and init.
All pads properly set in SIU.
ToothGen function works. Verified by oscilloscope. ToothGen crank jumpered to CRANK (channel 0) on the dev board. ToothGen cam jumpered to CAM on dev board.
PWM function on ch 30 works. Verified by scope.
To check and make sure that ch 0 actually could be configured as an input, assigned the FPM function to ch 0 and jumpered the cam signal to it. Worked and returns the correct frequency.
NOTE: FPM would not work until I turned off angle mode. Probably normal, I just don't know.
Have read, thoroughly, every AN, I won't list them here, there are too many. Even watched the youtube video.
Studied the eTPU section of MPC5644ARM. Studied ETPURM and ETPURMAD.
Copied the gct config from AN3769SW for engine and function setup, modifying the TCR1 prescaler to get as close to the demo TCR1 freq as possible.
All init functions return no error, I even went into the source of the fs_etpu_init() and fs_etpu_app_eng_pos_int() functions to bring out all of the internal error codes. Not too surprising, as the eTPU engine does appear to init properly, all other functions work properly.
Checked, manually, all of the config values created by the gct. All seem correct.
In my main app, removed int for eMIOS200, eQADC, Flexcan, and manually disabled each module in it's MCR.
In my main app, I tried inititing only sysclk, SIU, and eTPU only. Etpu init is by running my_system_etpu_init() followed by my_system_etpu_start() (my_system_etpu_start() starts the Global time base).
Have queried the engine position functions CRANK and CAM with all of the read status and read error status functions. Bottom line, CRANK does not get sync.
Oh yea, as I said at the start, have tried over 100 different combinations of parameter settings in the function and engine setup.
I'm kind of out of ideas for things to try. I know that TPU stuff can be tricky, but it shouldn't be this hard. The CRANK function is designed to look at a poor input signal and get/maintain sync.
My current list of probable suspects is:
1. Evil spirits.
2. Angle mode hardware is actually broken inside the chip (I think that this is probably slightly less probable than the evil spirits theory!).
3. There is something that needs to set/inited prior to eTPU start that I know nothing of. Possibly something related to the angle clock? The manuals nor the demo certainly don't suggest what it could be.
Thanks in advance;