MPC5777C CSE Inconsistency

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5777C CSE Inconsistency

640 Views
jeffcampbell
Contributor III

Everyone,

 

I'm having an absurdly difficult time getting the CSE to do anything consistently.  Completely unrelated changes in my programs are breaking CSE-related code.  Here's one recent example.

 

In this code, currentSig is a struct that holds the 64-bit message length for MAC computation and its starting address.  I've verified that it's initialized correctly.  All variables that interact with the CSE are volatile.

 

CSE.P1.R = CSE_RAM_KEY;
CSE.P2.R = (volatile int)currentSig.msg_length;
CSE.P3.R = (volatile int)currentSig.start_address;
CSE.P4.R = (volatile int)pulMac;
CSE.CMD.R = CSE_GENERATE_MAC;
while (CSE.SR.B.BSY == 1u);

 

When this runs, I get an error code of 0xC, or "System memory error."  After random experimentation I tried this:

 

temp = currentSig.msg_length[1];

CSE.P1.R = CSE_RAM_KEY;
CSE.P2.R = (volatile int)currentSig.msg_length;
CSE.P3.R = (volatile int)currentSig.start_address;
CSE.P4.R = (volatile int)pulMac;
CSE.CMD.R = CSE_GENERATE_MAC;
while (CSE.SR.B.BSY == 1u);

 

Now, no change has been made to the data or variables being passed to the CSE, but it no longer throws the error.  It runs, but it doesn't populate pulMac with any output.

 

I'm constantly running into problems like this (only in interactions with the CSE), and needing to randomly flail about until I find the combination of unrelated statements that produce a result.  Has anybody else seen behavior like this, and does anyone have an idea what might be causing it?

Labels (1)
Tags (1)
0 Kudos
1 Reply

493 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi Jeff,

I am afraid that no one will publicly discuss with you CSE and SHE. For such support we will need more details about your company and project.

I suggest you to create ticket for such questions on NXP web site.

Peter

0 Kudos