Index: branch/duvernois/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/duvernois/Emb_App/SessionM32C_E8a_system.ini	(revision 471)
+++ branch/duvernois/Emb_App/SessionM32C_E8a_system.ini	(revision 472)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff0022
+RESET=ff0020
Index: branch/duvernois/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/duvernois/Emb_App/SessionM32C_E8a_system.hsf	(revision 471)
+++ branch/duvernois/Emb_App/SessionM32C_E8a_system.hsf	(revision 472)
@@ -141,8 +141,8 @@
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWndInstanceKey0" "{WK_00000001_PDMR}EmbM32C87AppSessionM32C_E8a_system" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_DENORMAL_MODE" "0" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_ROUND_MODE" "0" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000004044" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000020" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "000000000000FFD7" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "0000000000000000" 
@@ -149,12 +149,12 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000000512" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF0576" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF05B6" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000B40" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "000000000000087A" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000001" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000004044" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000A9E" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000000008A8" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "000000000000FFFF" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000000040C4" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_22" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_23" "0000000000000000" 
@@ -171,9 +171,9 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_33" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_34" "000000000000036A" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_35" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "000000000000000A" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000B76" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000008" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000140000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000AA4" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000512" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "0000000000000000" 
@@ -209,27 +209,27 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Global," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "var, 1, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "rottourelle, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "rotroue, 1, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "rotroue, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "consignetele, 1, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004" "consignetele, 1, 0, P, Col, Dec, MA" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005" "consigneposition, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004" "consigneposition, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005" "Valvitesse, 1, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005_SCOPE" "Current Scope," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0006" "consignevitesse, 1, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0006_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0007" "Valvitesse, 1, 0, P, Col, Dec, MA" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0007_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0008" "Nump, 1, 0, P, Col, Dec, MA" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0008_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0009" "Valpiste, 1, 0, P, Col, Bin, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0007" "Nump, 1, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0007_SCOPE" "Global," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0008" "Valpiste, 1, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0008_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0009" "valcapt, 1, 0, P, Col, Hex, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0009_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0010" "valcapt, 1, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0010" "Go, 2, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0010_SCOPE" "Current Scope," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0011" "Gainroue, 1, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0011_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "12" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "11" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" 
@@ -384,5 +384,5 @@
 [FLASH_DETAILS]
 "" 0 0 "" 0 "" 0 0 "" 0 0 0 0 0 0 0 "" "" "" "" "" 
 [BREAKPOINTS]
-"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 94050616 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 75297856 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/duvernois/Emb_App/crt0mr.a30
===================================================================
--- branch/duvernois/Emb_App/crt0mr.a30	(revision 471)
+++ branch/duvernois/Emb_App/crt0mr.a30	(revision 472)
@@ -97,7 +97,7 @@
 ; after reset,this program will start
 ;-----------------------------------------------------------------
 __SYS_INITIAL:
-	LDC	#__Sys_Sp,ISP	; set initial ISP
+ 	LDC	#__Sys_Sp,ISP	; set initial ISP
 
 	MOV.B	#2,0AH
 	MOV.B	#00,PMOD		; Set Processor Mode Register
Index: branch/duvernois/Emb_App/programme_principal_etud.c
===================================================================
--- branch/duvernois/Emb_App/programme_principal_etud.c	(revision 471)
+++ branch/duvernois/Emb_App/programme_principal_etud.c	(revision 472)
@@ -128,13 +128,10 @@
 	int Nump;
 	int Valpiste;
 	int Valvitesse;
-	
-	int consignetourelle = 450;
 	int consigneposition;
 	int consignevitesse;
-	int Gainroue=1;
 	int consignetele;
-	
+	int consignetourelle=450;
 	int rottourelle;
 	int rotroue;
 	
@@ -162,7 +159,7 @@
 	wai_flg(ev_periph,0x01,TWF_ANDW, &flag);
 	var=periph[ADDR('U')].val; 
 	
-	rotroue=Gainroue*(var-consigneposition);
+	rotroue=(var-consigneposition);
 	if (rotroue < consignetele  && rotroue > -consignetele)
 		{
 		comm.data.id='D'; comm.data.rtr=0; comm.data.val=rotroue;
@@ -182,15 +179,11 @@
 
 void tourelle()
 {		
-	//Tourelle periph[MAX_PERIPHS];
-	
-
 	CanFrame comm;
 	CanFrame demande;
 
 	UINT flag;
 	
-
 	while(1)
 	{	
 	demande.data.id='R'; 
@@ -210,7 +203,7 @@
 
 
 
-void saut()
+void rouge()
 {                
         //Tourelle periph[MAX_PERIPHS];
         
@@ -236,13 +229,15 @@
         }
        else if (valcapt ==0x4203)
         {
-                Valvitesse=10;  
-				consignetele=400;     
+                Valvitesse=8;  
+				consignetele=900;     
 			 
         }
 		else
 		{
-		Valvitesse=20; 
+		Valvitesse=25; 
+		consigneposition=715; 
+		consignetele=600;
 		}
 
 		dly_tsk(50);
@@ -256,7 +251,9 @@
 	CanFrame demande;
 
 	UINT flag;
-			
+	
+	if (Go!=1)
+	{			
 	demande.data.id='M'; 
 	demande.data.rtr=1;
 	periph[ADDR('M')].ev=0x01;
@@ -266,22 +263,10 @@
 	Valpiste=(periph[ADDR('M')]).val; 
 	Nump=(Valpiste & mask);
 	Go=(Valpiste & maskdepart);
+	}
 }
 
 
-void LEDJ()
-{		
-	if (var <= 0 && var >= 2000)
-	{
-		LED_J=1;
-	}
-	else
-	{
-		LED_J=0;
-	}
-	dly_tsk(1000);
-	
-}
 
 void noir()
 {                        
@@ -318,7 +303,7 @@
 		else if (valcapt ==0x5202)
         {
 			consignetele=300;	 
-
+			Valvitesse=19;
         }
 		else if (valcapt ==0x5603)
         {
@@ -327,12 +312,12 @@
         }
        	else if (valcapt ==0x4203)
         {
-			consignetele=700;	
+			consignetele=800;	
 			Valvitesse=12;   
         }
 	  	else if (valcapt ==0x4304)
         {	
-			Valvitesse=25;
+			Valvitesse=35;
 			consigneposition= 850;   
 			consignetele=300;
         }	   
@@ -354,10 +339,7 @@
 	comm.data.val=consignevitesse;
 	snd_dtq (CanTx,comm.msg);
 	
-
 	dly_tsk(200);
-	
-	
 	}	
 
 }	
@@ -371,7 +353,7 @@
 	
 	while(1)
 	{
-	if (Go!=32768)
+	if (Go!=32768 && Go!=1)
 	{	
 	demande.data.id='M'; 
 	demande.data.rtr=1;
@@ -381,11 +363,12 @@
 	wai_flg(ev_periph,0x01,TWF_ANDW, &flag);
 	Valpiste=(periph[ADDR('M')]).val; 
 	Go=(Valpiste & maskdepart);
-	}    		
+	} 
+	 		
 	dly_tsk(200);
 	
+	
 	}	
-			
 }
 
 void main()
@@ -420,7 +403,9 @@
 	}
 	if (Nump == 3 || Nump == 7)
 	{
-		sta_tsk(ID_saut);
+		
+	
+		sta_tsk(ID_rouge);
 	}
 	if (Nump == 4 || Nump == 8)
 	{
@@ -432,19 +417,17 @@
 	dly_tsk(2000);	
 	sta_tsk(ID_tourelle);
 	sta_tsk(ID_position);
-	sta_tsk(ID_LEDJ);
 	dly_tsk(2000);
-	LED_R=1;	
+		
+    while(1)
+    {
+			
 	while(Go==32768)
 		{
 		sta_tsk(ID_vitesse);
-		LED_V=1;
-	
-		}	
-    while(1)
-    {
-			
-	dly_tsk(100);
+		Go=1;
+		}		
+	dly_tsk(250);
 		
 		
    }
Index: branch/duvernois/Emb_App/conf_noyau.cfg
===================================================================
--- branch/duvernois/Emb_App/conf_noyau.cfg	(revision 471)
+++ branch/duvernois/Emb_App/conf_noyau.cfg	(revision 472)
@@ -20,7 +20,7 @@
 
 // max definition
 maxdefine{
-	max_task	= 9;
+	max_task	= 11;
 	max_flag	= 3;
 	max_dtq	= 2;
 	max_cyh	= 1;
@@ -80,8 +80,8 @@
 	exinf	= 0x0;
 };
 task[]{
-	entry_address	= saut();
-	name	= ID_saut;
+	entry_address	= rouge();
+	name	= ID_rouge;
 	stack_size	= 256;
 	stack_section	= stack;
 	priority	= 3;
@@ -124,15 +124,6 @@
 	initial_start	= OFF;
 	exinf	= 0x0;
 };
-task[]{
-	entry_address	= LEDJ();
-	name	= ID_LEDJ;
-	stack_size	= 256;
-	stack_section	= stack;
-	priority	= 1;
-	initial_start	= OFF;
-	exinf	= 0x0;
-};
 flag[]{
 	name	= ev_bus_fin_tr;
 	initial_pattern	= 0x0000;
