Aug 28, 2019
02:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 28, 2019
02:26 AM
User manual says to switch code execution from Flash to RAM during entering the standby mode page 506).
[HTML]CPU code execution is switched from Flash to PSPR RAM. Flash modules are
deactivated via FCON register.[/HTML]
There are no information about PSPR RAM register or how to switch this execution.
How can i do it ?
I work on Tc222L
[HTML]CPU code execution is switched from Flash to PSPR RAM. Flash modules are
deactivated via FCON register.[/HTML]
There are no information about PSPR RAM register or how to switch this execution.
How can i do it ?
I work on Tc222L
- Tags:
- IFX
5 Replies
Aug 28, 2019
06:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 28, 2019
06:01 AM
There are no information about PSPR RAM register or how to switch this execution.
How can i do it ?
The Program Scratch-Pad RAM (PSPR) is tightly coupled RAM located in the PMI with its own memory space. To execute from PSPR you would do like any other microcontroller to exectue from RAM. Generally you create an entery or section that has a storage address in (Flash) and execute address (RSM) and the copy table initialization moves it from Flash to RAM on startup. In your program you would call it like any other function.
For the Hightec toolchain you could do something like this:
__attribute__((asection(".cpu0_psram", "a=4", "f=xwc0")))
void TurnOffFlashEnterStandbyMode(void) {
unlock_wdtcon(0);
FLASH0_FCON.B.SLEEP = true;
lock_wdtcon(0);
while(false == FLASH0_FSR.B.SLM) {
; /*wait for flash to turn off */
/*TODO: add timeout if this fails */
}
...
Aug 28, 2019
06:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 28, 2019
06:08 AM
thanks for Quick response.
unfortunetly
__attribute__((asection(".cpu0_psram", "a=4", "f=xwc0")))
is not recugnized by TASKING toolchain.
unfortunetly
__attribute__((asection(".cpu0_psram", "a=4", "f=xwc0")))
is not recugnized by TASKING toolchain.
Aug 28, 2019
04:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 28, 2019
04:16 PM
For the Tasking toolchain you could do something like:
Where you need to add a section to the lsl file:
Then in your code
Where you need to add a section to the lsl file:
section_layout :vtc:linear
{
group pspr0 ( run_addr = mem:pspr0, copy )
{
select "*.myRamCode";
}
}
Then in your code
volatile int cnt;
__noinline void myRamCode( void )
{
cnt++;
}
Aug 29, 2019
01:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 29, 2019
01:20 AM
after i placed suggested code I got following compiler error from .sls file :
syntax error: Could not find memory pspr0 for memory reference for a run-time or load-time address range of a group
syntax error: Could not find memory pspr0 for memory reference for a run-time or load-time address range of a group
Dec 11, 2019
04:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 11, 2019
04:14 AM
Ok I found solution:
section_layout :tc0:linear
{
group STANDBY_MODE_RAM_FUNCTIONS(ordered, run_addr=mem : mpe : pspr0,copy)
{
select".text.ifx_standby_mode_psram.ifx_enter_standby_mode_psram_sequence";
select".text.IfxScuWdt.IfxScuWdt_clearSafetyEndinit";
select".text.IfxScuWdt.IfxScuWdt_setSafetyEndinit";
select".text.IfxScuWdt.IfxScuWdt_setCpuEndinit";
select".text.IfxScuWdt.IfxScuWdt_clearCpuEndinit";
}
}
section_layout :tc0:linear
{
group STANDBY_MODE_RAM_FUNCTIONS(ordered, run_addr=mem : mpe : pspr0,copy)
{
select".text.ifx_standby_mode_psram.ifx_enter_standby_mode_psram_sequence";
select".text.IfxScuWdt.IfxScuWdt_clearSafetyEndinit";
select".text.IfxScuWdt.IfxScuWdt_setSafetyEndinit";
select".text.IfxScuWdt.IfxScuWdt_setCpuEndinit";
select".text.IfxScuWdt.IfxScuWdt_clearCpuEndinit";
}
}
This widget could not be displayed.