FCCU_NCF_S read causes FCCU_NCF_S bits to be set?

cancel
Showing results for 
Search instead for 
Did you mean: 

FCCU_NCF_S read causes FCCU_NCF_S bits to be set?

Jump to solution
1,021 Views
aero72
Contributor III

I'm using the recommended FCCU code snippets for read/clear/configure published by NXP earlier this year.

 

As part of the MPC5744P processor setup, I need to configure the FCCU - my code to do this has the following requirements:

a) Read the present state of the NCF_S[] array and record it for posterity

b) Clear the NCF_S[] array for use in this power cycle

c) Configure the FCCU (bi-stable protocol, configuring fault reaction etc.)

 

Prior to a), I have ensured the PLLs are locked and stable. I have also disabled the SWT and ensured the MEMU error flags are cleared.

 

If I break the processor immediately prior to...

/* Change to OP10 - see manual */

FCCU.CTRL.R = FCCU_OP10;

/* Wait here until FCCU state changes */

while(FCCU.CTRL.B.OPS != FCCU_OPS_SUCCESS)

{;}

/* Get copy of latched fault status - make available to application code */

FCCUState[0] = FCCU.NCF_S[0].R;

FCCUState[1] = FCCU.NCF_S[1].R;

FCCUState[2] = FCCU.NCF_S[2].R;

 

...the NCF_S[] array is all zeroes.

 

If I break the processor where I start to do requirement b) the NCF_S[0] = 0x00038000 - implying a system RAM ECC fault.

 

It appears the action of requesting OP10 is causing this fault - does anyone have any idea as to why that might be?

 

Also - I would have thought it better to use

FCCU.CTRL.B.OPR = FCCU_OP10;

...rather than write to the whole register since the FCCU supports 8/16/32 bit writes - any reason the recommended code changes the whole register?

 

Thanks for any advice.

Labels (1)
0 Kudos
1 Solution
682 Views
petervlna
NXP Employee
NXP Employee

Hi,

I am not sure where is your issue.

I have created and tested program according to your needs.

a) Read the present state of the NCF_S[] array and record it for posterity

b) Clear the NCF_S[] array for use in this power cycle

c) Configure the FCCU (bi-stable protocol, configuring fault reaction etc.)

All is working as expected.

Check it, run it, test it and let me know if you still have an issue.

Peter

View solution in original post

0 Kudos
4 Replies
682 Views
aero72
Contributor III

Peter,

Your FCCU setup code looked remarkably similar to mine....what I did find though, comparing your code sequence to mine, is that I had just set up the PLLs prior to running the FCCU setup - and I did this in a different way to you.

My suspicion is that the NCF errors were being caused by code reading those registers while PLL was still locking. My code also did not make 32-bit writes to the PLL

So I have added an additional mode change call from debug mode to debug mode (and disabling/re-enabling the PLLs and checking for lock in the process) before FCCU configuration is attempted, and this has solved the issue.

Thanks again for your code example.

0 Kudos
682 Views
lmonologue
Contributor I

Hi,

      I have same issue with you that FCCU_NCF_S read causes FCCU_NCF_S bits to be set.How did you solve it,could you provide your code as reference .

Thank you!

0 Kudos
681 Views
petervlna
NXP Employee
NXP Employee

Hi,

Nice to hear that :smileyhappy:

Peter

0 Kudos
683 Views
petervlna
NXP Employee
NXP Employee

Hi,

I am not sure where is your issue.

I have created and tested program according to your needs.

a) Read the present state of the NCF_S[] array and record it for posterity

b) Clear the NCF_S[] array for use in this power cycle

c) Configure the FCCU (bi-stable protocol, configuring fault reaction etc.)

All is working as expected.

Check it, run it, test it and let me know if you still have an issue.

Peter

0 Kudos