Example S32K144 RAM Retention S32DS.R1

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Example S32K144 RAM Retention S32DS.R1

Example S32K144 RAM Retention S32DS.R1

********************************************************************************
Detailed Description:

This example shows the use of SRAM retention after SW reset.
The SW reset is triggered by pressing the SW3 button on the S32K144 EVB

The reset is delayed in RCM module: 514 LPO cycles.

In the RCM interrupt, SRAMU_RETEN and SRAML_RETEN are cleared allowing to retain SRAM data during the reset.

After software reset, SRAMU_RETEN and SRAML_RETEN are set to1 to allow accesses to SRAM. 

During software initialization in the startup_S32K144.S, ECC RAM initialization is skipped. 

After that, we can check the written data before reset are still placed in the SRAM.
 ------------------------------------------------------------------------------
Test HW: S32K144EVB-Q100
MCU: S32K 0N57U
Debugger: S32DSR1
********************************************************************************

タグ(3)
添付
コメント

Hello Diana, 

I have a question on the RAMRetention function from startup_S32k144.s - assuming no optimization in the compiler is provided (-O0) and on a smaller microcontroller (the CM0+). 


After initializing the registers, I can see a blx to RAMRetention function. 

Does the blx trigger a push operation in ram memory? What happens if there is a write access to the SRAM?

Shall I use the __n_a_k_e_d__ attribute to get rid of the push operations?

The local variable in RAMRetention is placed on the stack, does this trigger a new access to the SRAM hence an error?

I'm wondering if my questions have some rationale beyond or if  I am just overthinking. 

Generally speaking, how does the SRAM_U behave in this scenarios, where no other SRAM can be used for safety purposes?

Best regards, 

L. 

Hello Luca,

Firstly, I'm very sorry for a huge delay. I did not notify you that I have updated the code for the S32K144 device and now there is no RAMRetention function nor blx instruction.  Unfortunately, I have not tested it on the CM0+ yet.

Thank you for pointing this out and again sorry.

Best Regards,

Diana

評価なし
バージョン履歴
最終更新日:
‎01-22-2019 06:55 AM
更新者: