Index: branch/dupriet/Emb_App.tws
===================================================================
--- branch/dupriet/Emb_App.tws	(revision 396)
+++ branch/dupriet/Emb_App.tws	(revision 397)
@@ -8,22 +8,16 @@
 [BREAKPOINTS]
 [OPEN_WORKSPACE_FILES]
 "E:\tp_info6_2018_dupriet\tp_info6\bsp\lcd.c" 
-"E:\tp_info6_2018_dupriet\tp_info6\bsp\periph.c" 
-"E:\tp_info6_2018_dupriet\tp_info6\bsp\periph.h" 
 "E:\tp_info6_2018_dupriet\tp_info6\bsp\uart0.c" 
 "E:\tp_info6_2018_dupriet\tp_info6\Emb_App\conf_noyau.cfg" 
 "E:\tp_info6_2018_dupriet\tp_info6\Emb_App\crt0mr.a30" 
-"E:\tp_info6_2018_dupriet\tp_info6\Emb_App\Debug\mr308.inc" 
 "E:\tp_info6_2018_dupriet\tp_info6\Emb_App\programme_principal_etud.c" 
 [WORKSPACE_FILE_STATES]
-"E:\tp_info6_2018_dupriet\tp_info6\Emb_App\Debug\mr308.inc" 150 150 1405 394 0 6 
-"E:\tp_info6_2018_dupriet\tp_info6\Emb_App\conf_noyau.cfg" 75 75 1430 351 0 2 
-"E:\tp_info6_2018_dupriet\tp_info6\Emb_App\crt0mr.a30" 0 0 1596 607 0 1 
-"E:\tp_info6_2018_dupriet\tp_info6\Emb_App\programme_principal_etud.c" -8 -30 1596 607 1 0 
-"E:\tp_info6_2018_dupriet\tp_info6\bsp\lcd.c" 175 175 1405 394 0 7 
-"E:\tp_info6_2018_dupriet\tp_info6\bsp\periph.c" 100 100 1405 394 0 4 
-"E:\tp_info6_2018_dupriet\tp_info6\bsp\periph.h" 75 75 1405 394 0 3 
-"E:\tp_info6_2018_dupriet\tp_info6\bsp\uart0.c" 125 125 1405 394 0 5 
+"E:\tp_info6_2018_dupriet\tp_info6\Emb_App\conf_noyau.cfg" 75 75 1405 394 0 3 
+"E:\tp_info6_2018_dupriet\tp_info6\Emb_App\crt0mr.a30" 0 0 1401 390 0 0 
+"E:\tp_info6_2018_dupriet\tp_info6\Emb_App\programme_principal_etud.c" -8 -30 1596 607 1 1 
+"E:\tp_info6_2018_dupriet\tp_info6\bsp\lcd.c" 100 100 1405 394 0 4 
+"E:\tp_info6_2018_dupriet\tp_info6\bsp\uart0.c" 50 50 1405 394 0 2 
 [LOADED_PROJECTS]
 "EmbM32C87App" 
 [END]
Index: branch/dupriet/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/dupriet/Emb_App/SessionM32C_E8a_system.ini	(revision 396)
+++ branch/dupriet/Emb_App/SessionM32C_E8a_system.ini	(revision 397)
@@ -10,8 +10,8 @@
 VOLTAGE_5_0=1
 VOLTAGE_3_3=0
 [FW_LOCATE]
-FWADDRESS=f000
-RAMADDRESS=04
+FWADDRESS=ffd0
+RAMADDRESS=c3
 [WDT]
 WDT_USE=0
 [MCU_SETTING]
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff0024
+RESET=ff0132
Index: branch/dupriet/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/dupriet/Emb_App/SessionM32C_E8a_system.hsf	(revision 396)
+++ branch/dupriet/Emb_App/SessionM32C_E8a_system.hsf	(revision 397)
@@ -8,7 +8,7 @@
 "" 
 [GENERAL_DATA]
 "FIRST_CONNECTION_TAG" "NO" 
-"MRULABELS_DATAMANAGER_KEY" "FFFFFF|000000|500" 
+"MRULABELS_DATAMANAGER_KEY" "00000000|FFFFFF|000000|500" 
 "RESET_CPU_AFTER_DOWNLOAD_TAG" "VARIANT_TRUE_STORE_TAG" 
 "{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlECX_MAP_FIND_SYMBOL_LIST" "" 
 "{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlViews" "0" 
@@ -141,7 +141,7 @@
 "{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" "000000000000FFD7" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000000000" 
 "{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" 
@@ -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" "0000000000FF3598" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF373A" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000A60" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000864" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000DEA" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000BEE" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000000000C0" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000000000C4" 
 "{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" "0000000000000006" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000120000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000A60" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000005" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000DEA" 
 "{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" 
@@ -199,15 +199,15 @@
 "{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_VIEW" "0,0,0,0,0,0" 
 "{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ImageCtrlViews" "0" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchCtrlViews" "4" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth0" "148" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth0" "166" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth1" "186" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth12" "200" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth2" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth3" "200" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH" "c,buff,n,rx,flag," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "alpha, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "alpha, 2, 0, P, Col, Hex, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "d, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "d, 2, 0, P, Col, Hex, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Current Scope," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "capteur, 2, 0, P, Col, Hex, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002_SCOPE" "Current Scope," 
@@ -215,9 +215,11 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003_SCOPE" "Current Scope," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004" "celerite, 1, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005" "piste, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005" "roue, 3, 0, P, Col, Hex, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "6" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0006" "temps, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0006_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "7" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" 
@@ -289,12 +291,12 @@
 "Help" "TOOLBAR 0" 59419 2 4 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
 "{WK_00000001_CmdLine}" "WINDOW" 59422 0 1 "0.07" 297 0 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0" 
 "{WK_00000001_DISASSEMBLY}" "WINDOW" 0 0 0 "0.00" 0 -4 -30 948 486 9 0 "" "0.0" 
-"{WK_00000001_EVENT}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 0 "0.11" 297 0 0 350 200 18 0 "32774|32775|32777|<<separator>>|32780|<<separator>>" "0.0" 
+"{WK_00000001_EVENT}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 0 "0.08" 297 0 0 350 200 18 0 "32774|32775|32777|<<separator>>|32780|<<separator>>" "0.0" 
 "{WK_00000001_MEMORY}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 1 "0.23" 365 2 -1 350 200 2065 0 "42202|42203|42204|42233|<<separator>>|42206|42205|42230|42229|42207|<<separator>>|42208|42209|42210|49076|42228|42227|<<separator>>|42231|42232|42234|42235|<<separator>>|42211|<<separator>>|32796|32797" "0.0" 
-"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 2 "0.55" 297 0 0 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" 
+"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 2 "0.56" 297 0 0 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" 
 "{WK_00000001_PDMR}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 3 "0.01" 297 0 0 350 200 18 0 "47300|47301|47302|47303|47304|47305|47314|47306|47307|47308|47311|47312|47313|42211|42509|42303" "0.0" 
 "{WK_00000001_REGISTERS}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59421 0 0 "1.00" 236 0 0 350 200 2065 0 "" "0.0" 
-"{WK_00000001_WATCH}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 4 "0.33" 297 0 0 350 200 18 0 "32781|32783|<<separator>>|32771|32772|32773|<<separator>>|32786|<<separator>>|32810|32811" "0.0" 
+"{WK_00000001_WATCH}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 4 "0.35" 297 0 0 350 200 18 0 "32781|32783|<<separator>>|32771|32772|32773|<<separator>>|32786|<<separator>>|32810|32811" "0.0" 
 "{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 308 0 0 350 200 18 0 "" "0.0" 
 "{WK_TB00000001_STANDARD}" "TOOLBAR 0" 59419 0 2 "0.00" 0 0 0 0 0 18 0 "" "0.0" 
 "{WK_TB00000002_EDITOR}" "TOOLBAR 0" 59419 0 0 "0.00" 0 0 0 0 0 18 0 "" "0.0" 
@@ -321,12 +323,9 @@
 [WINDOW_Z_ORDER]
 "E:\tp_info6_2018_dupriet\tp_info6\Emb_App\programme_principal_etud.c" 
 "E:\tp_info6_2018_dupriet\tp_info6\Emb_App\crt0mr.a30" 
+"E:\tp_info6_2018_dupriet\tp_info6\bsp\lcd.c" 
+"E:\tp_info6_2018_dupriet\tp_info6\bsp\uart0.c" 
 "E:\tp_info6_2018_dupriet\tp_info6\Emb_App\conf_noyau.cfg" 
-"E:\tp_info6_2018_dupriet\tp_info6\bsp\periph.c" 
-"E:\tp_info6_2018_dupriet\tp_info6\bsp\uart0.c" 
-"E:\tp_info6_2018_dupriet\tp_info6\bsp\lcd.c" 
-"E:\tp_info6_2018_dupriet\tp_info6\Emb_App\Debug\mr308.inc" 
-"E:\tp_info6_2018_dupriet\tp_info6\bsp\periph.h" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
 [STATUSBAR_STATEINFO_VD1]
@@ -373,5 +372,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 86112296 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 89258568 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/dupriet/Emb_App/programme_principal_etud.c
===================================================================
--- branch/dupriet/Emb_App/programme_principal_etud.c	(revision 396)
+++ branch/dupriet/Emb_App/programme_principal_etud.c	(revision 397)
@@ -122,18 +122,18 @@
 
 
 
-unsigned int consigne_angulaire =350;// 900;
+unsigned int consigne_angulaire =350;// 900;		350
 unsigned int alpha;
 unsigned int k = 3; //gain asserv tourelle
 unsigned int d;
 float roue=1;
-int celerite=50;
-unsigned int norme= 870;//494;
+int celerite=25;
+unsigned int norme= 870;//494;		870
 unsigned int lecturevit;
 unsigned int capteur;
 unsigned int compteur_tours=0;
 char c[]="";
-unsigned int piste;
+int temps;
 unsigned short STOP=0;
 
 void capteur_couleur(){
@@ -147,37 +147,36 @@
 		snd_dtq(CanTx,req.msg);
 		wai_flg(ev_periph,0x01,TWF_ANDW,&flag);
 		capteur=periph[ADDR('C')].val;
-		if(compteur_tours!=0x7610
-			&& compteur_tours!=0x7611
-			&& compteur_tours!=0x7612
-			&&detect_change!=capteur)		//protocole pour compter le nombre de tours
-				{detect_change=capteur;
-			if(compteur_tours<27){
-				compteur_tours++;}
-			else{STOP++;}
-			}
+		
+		if(detect_change!=capteur){detect_change=capteur;
+			if(capteur==0x5605)	//protocole pour compter le nombre de tours
+				{//detect_change=capteur;
+					if(compteur_tours<2){
+						compteur_tours++;}
+					else{STOP++;}
+				}}
 	
 		switch(capteur) {
 			case 0x5601:		//début détection lasers aux angles de la piste
-				celerite=50;
+				celerite=20;//pour passer la piste rouge
 				break;
 			case 0x4a01:
 				celerite=25;
 				break;
 			case 0x5602:
-				celerite=50;
+				celerite=47;
 				break;
 			case 0x5202:
 				celerite=25;
 				break;
 			case 0x5603:
-				celerite=50;
+				celerite=47;
 				break;
 			case 0x4203:
 				celerite=25;
 				break;
 			case 0x5604:
-				celerite=50;
+				celerite=47;
 				break;
 			case 0x4304:
 				celerite=20;
@@ -188,17 +187,21 @@
 				break;
 			
 			case 0x7610:		//début saut piste rouge	//vert petit 16
-				celerite=55;
+				celerite=48;
 				roue=0;
 				break;
 			case 0x7611:	//vert petit 17
 				celerite=0;
-				dly_tsk(1500);
-				roue=1;
+				
+				roue=1;dly_tsk(1000);
 				celerite=10;
 				dly_tsk(800);
 				celerite=20;
 				break;			//fin saut piste rouge
+			
+			case 0x7620:
+				norme=150;
+				break;
 		}
 	dly_tsk(5);}
 }
@@ -211,7 +214,7 @@
 	CanFrame comm;
 	CanFrame req;
 	UINT flag;
-	dly_tsk(1000);
+	dly_tsk(1500);
 	
 	while (1){		
 		req.data.id='D';
@@ -247,11 +250,18 @@
 			comm.data.id='D';
 			comm.data.rtr=0;
 			comm.data.val=roue*(-norme+d);
-			snd_dtq(CanTx,comm.msg);}
+			snd_dtq(CanTx,comm.msg);
+			LED_J=0;}
+		else{
+			LED_J=1;}
 		dly_tsk(10);
 	}
 }
 
+void emergency(){
+	if(Bp_G){STOP++;}
+}
+
 void asserv_tourelle(){
 		
 		CanFrame comm;
@@ -275,7 +285,7 @@
 		}	
 }
 
-void afficheur(){/*
+void afficheur(){
 		CanFrame req;
 		UINT flag;
 		while(1){
@@ -284,11 +294,12 @@
 			periph[ADDR('H')].ev=0x01;
 			snd_dtq(CanTx,req.msg);
 			wai_flg(ev_periph,0x01,TWF_ANDW,&flag);
-			piste = periph[ADDR('H')].val;
+			temps = periph[ADDR('H')].val;
+			sprintf(c,"%d",temps);
+			lcd_str(c);
 			dly_tsk(100);
-			c=('%d',piste);
-			lcd_str(c);
-		}*/
+			lcd_init();
+		}
 }
 
 void main()
@@ -303,20 +314,28 @@
     clavier_init(1);
 	capture_init();
 	sta_tsk(ID_avancer);
-	//sta_cyc(ID_acqui);
-	//sta_tsk(ID_afficheur);
+	sta_cyc(ID_acqui);
+	sta_tsk(ID_afficheur);
 	sta_tsk(ID_asserv_tourelle);
 	sta_tsk(ID_asserv_direction);
 	sta_tsk(ID_periph_rx);
-	sta_tsk(ID_capteur_couleur);
+	sta_tsk(ID_capteur_couleur);
+	sta_tsk(ID_emergency);
     while(1)
     {
 		if(STOP){
+			celerite=0;
+			dly_tsk(500);
 			ter_tsk(ID_asserv_tourelle);
 			ter_tsk(ID_asserv_direction);
 			ter_tsk(ID_periph_rx);
 			ter_tsk(ID_capteur_couleur);
 			ter_tsk(ID_avancer);
+			ter_tsk(ID_afficheur);
+			stp_cyc(ID_acqui);
+			LED_R=!LED_R;
+			LED_J=!LED_J;
+			LED_V=!LED_V;
 			}
 		/*
 		dly_tsk(100);
@@ -330,7 +349,7 @@
 }
 
 void acqui()
-{
-	LED_V=!LED_V;
+{	
+	LED_R=!LED_R;
 }
 
Index: branch/dupriet/Emb_App/conf_noyau.cfg
===================================================================
--- branch/dupriet/Emb_App/conf_noyau.cfg	(revision 396)
+++ branch/dupriet/Emb_App/conf_noyau.cfg	(revision 397)
@@ -73,6 +73,16 @@
 };
 
 task[]{
+	entry_address	= emergency();
+	name	= ID_emergency;
+	stack_size	= 256;
+	stack_section	= stack;
+	priority	= 4;
+	initial_start	= OFF;
+	exinf	= 0x0;
+};
+
+task[]{
 	entry_address	= avancer();
 	name	= ID_avancer;
 	stack_size	= 256;
Index: branch/dupriet/Emb_App/DefaultSession.hsf
===================================================================
--- branch/dupriet/Emb_App/DefaultSession.hsf	(revision 396)
+++ branch/dupriet/Emb_App/DefaultSession.hsf	(revision 397)
@@ -33,6 +33,7 @@
 [CONFIG_INFO_VD4]
 0 
 [WINDOW_POSITION_STATE_DATA_VD1]
+"Help" "TOOLBAR 0" 59419 2 4 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
 "{WK_00000001_CmdLine}" "WINDOW" 59422 0 1 "0.03" 195 0 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0" 
 "{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 195 0 0 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" 
 "{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 284 0 0 350 200 18 0 "" "0.0" 
@@ -54,12 +55,8 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
-"D:\laffont\Tp_Info14\Emb_App\programme_principal_etud.c" 
-"D:\laffont\Tp_Info14\Emb_App\uart0.c" 
-"D:\laffont\Tp_Info14\Emb_App\crt0mr.a30" 
-"D:\laffont\Tp_Info14\Emb_App\conf_noyau.cfg" 
-"D:\laffont\Tp_Info14\Emb_App\periph.c" 
-"D:\laffont\Tp_Info14\Emb_App\c_sec.inc" 
+"E:\tp_info6_2018_dupriet\tp_info6\Emb_App\programme_principal_etud.c" 
+"E:\tp_info6_2018_dupriet\tp_info6\Emb_App\crt0mr.a30" 
 [TARGET_NAME]
 "" "" 0 
 [STATUSBAR_STATEINFO_VD1]
Index: branch/dupriet/Emb_App/EmbM32C87App.tps
===================================================================
--- branch/dupriet/Emb_App/EmbM32C87App.tps	(revision 396)
+++ branch/dupriet/Emb_App/EmbM32C87App.tps	(revision 397)
@@ -18,7 +18,7 @@
 "SessionM32C_E8a_system" 
 [GENERAL_DATA_PROJECT]
 [GENERAL_DATA_CONFIGURATION_Debug]
-"PROJECT_FILES_MODIFIED_DATA_TAG" "TRUE" 
+"PROJECT_FILES_MODIFIED_DATA_TAG" "FALSE" 
 [SESSIONS_Debug]
 "DefaultSession" 
 "SessionM32C_E8a_system" 
