MPC5674R Functional Reset

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

MPC5674R Functional Reset

666 Views
ceciliac
Contributor III

Hi,

I want to save a value to SPR and then invoke a short functional reset on core 1. The point is I want to look at the value in SPR after the reset. Is this possible?

 I'm currently saving to SPRG 256 (User SPR), not really sure which SPRGs that I should be using. Which ones are     available?

The reset seems to work but looking at the registers they seem empty, nothing has been saved.

Do you have any example of how this can be done?

Thanks,

Cecilia

2 Replies

509 Views
ceciliac
Contributor III

Just noticed that I have the following in the startup.S file which is generated by the s32ds:

;# Init any other CPU register which might be stacked (before being used).

mtspr 1, r1 ;#XER
mtcrf 0xFF, r1
mtspr CTR, r1
mtspr 272, r1 ;#SPRG0
mtspr 273, r1 ;#SPRG1
mtspr 274, r1 ;#SPRG2
mtspr 275, r1 ;#SPRG3
mtspr 58, r1 ;#CSRR0
mtspr 59, r1 ;#CSRR1
mtspr 570, r1 ;#MCSRR0
mtspr 571, r1 ;#MCSRR1
mtspr 61, r1 ;#DEAR
mtspr 63, r1 ;#IVPR
mtspr 256, r1 ;#USPRG0
mtspr 62, r1 ;#ESR
mtspr 8,r31 ;#LR

When removing the init my SPR value is (not surprisingly) saved during reset so my question now is: Is there any risk with not initializing these registers and is there another way to it?

Thanks,

Cecilia

0 Kudos

509 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi, there is no risk in not initializing SPR.

It is fully on your application needs.

In core reference manual you can find list of registers which do not lost content on reset:

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png