Page 1 of 1

Tricore flash write execution cause trap on Erika3

Posted: Thu Aug 08, 2019 1:47 pm
by Alexanderv66
Conditions:
TC299B
Hightech
Erika3
Singlecore mode
CPU speed 200 MHz
Problem:
Firmware code is stored in PFLASH0 bank. I'm trying to Erase and write 5 pages in sector 27 (PFLASH1 bank) by iLLD functions. The demo example from iLLD works normally without Erika. But when i run the same example on Erika3 it is cause a bus error (Class 4 TIN3) "Data Access Asynchronous Error" and juming to trap handler.
In addition i tryed run the Flash demo from the Task, from the main() before Starting OS, and after forcibly ShutdownOS. In any case i have Class4 TIN3 trap. The CPU0_DATR shows Store Bus Error bit. Immediatelly after jumping to trap Register A11 (address of occurrence of the error) contains value 0x8000234A. On this address locates "MOV d15,0x0" instruction.
Scr1.JPG
Scr1.JPG (78.04 KiB) Viewed 4236 times
Please, help me to understand why does this example code works without Erika and does not work in Erika
Code in attachment.
OIL:

Code: Select all


CPU test_singleecore
{
	OS erika_os
	{
		CPU_DATA = TRICORE 
		{
			ID = 0;
			CPU_CLOCK = 200.0;
			COMPILER = GCC;
			IDLEHOOK = TRUE
			{
				HOOKNAME = "idle_hook";
			};
		};	
		MCU_DATA = TC29X {};
		KERNEL_TYPE = OSEK
		{
			CLASS = ECC2;
		};
		
	};
	
	COUNTER SystemTimer  
	{
		CPU_ID = 0;
		MINCYCLE = 1;
		MAXALLOWEDVALUE = 2147483647;
		TICKSPERBASE = 1;
		TYPE = HARDWARE
		{
			SYSTEM_TIMER = TRUE;
			DEVICE = "STM_SR0";
			PRIORITY = 1;
		}; 
		SECONDSPERTICK = 0.001;
	};
	ALARM AlarmTask1
	{
		COUNTER = SystemTimer;
		ACTION = ACTIVATETASK
		{
			TASK = Task1;
		};
		AUTOSTART = TRUE 
		{ 
			ALARMTIME = 250; 
			CYCLETIME = 1000;
		};
	};
	APPDATA myApp
	{
		APP_SRC = "code.c";
	};
	
	TASK Task1
	{
		AUTOSTART = FALSE;
		ACTIVATION = 3;
		STACK = SHARED;
		PRIORITY = 2;
	};
};