Index: branch/elmansour/Emb_App/SessionM32C_FoUSB_UART.hsf
===================================================================
--- branch/elmansour/Emb_App/SessionM32C_FoUSB_UART.hsf	(revision 81)
+++ branch/elmansour/Emb_App/SessionM32C_FoUSB_UART.hsf	(revision 82)
@@ -1,7 +1,7 @@
 [HIMDBVersion]
 2.0
 [DATABASE_VERSION]
-"2.2" 
+"2.3" 
 [SESSION_DETAILS]
 "" 
 [INFORMATION]
@@ -15,8 +15,11 @@
 "{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlViews" "0" 
 "{2BA6A3EF-6488-11D5-80D4-00C04F68EAD7}StatusCtrlViews" "0" 
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBatchFileName" "" 
+"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBreakpointFlag" "-1 " 
+"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBreakpointStatus" "-1 " 
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBrowseDirectory" "" 
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlLogFileName" "" 
+"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlSplitterPosition" "242" 
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlViews" "1" 
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlWindowProperties" "17" 
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineWndInstanceKey0" "{WK_00000001_CmdLine}" 
@@ -40,6 +43,9 @@
 "{348532CE-10A4-4D46-B946-95A8279582D2}RamMonitorWndRRAM Monitor AreaCount" "1" 
 "{348532CE-10A4-4D46-B946-95A8279582D2}RamMonitorWndRRAM Monitor AreaSize0" "1" 
 "{348532CE-10A4-4D46-B946-95A8279582D2}RamMonitorWndRRAM Monitor AreaStart0" "00000400" 
+"{4B022541-3E95-11D7-909C-00201898052D}ElfDwarf2Objects" "1" 
+"{4B022541-3E95-11D7-909C-00201898052D}LoadModule0OBJ_ELFDWARF2_ARRAY_EXPAND_LIMIT" "-1" 
+"{4B022541-3E95-11D7-909C-00201898052D}LoadModule0OBJ_STATUS_OF_EBD_CMD" "0" 
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRCtrlViews" "1" 
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd0EnableRRam" "1" 
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd0MrType" "2" 
@@ -185,7 +191,7 @@
 [LANGUAGE]
 "English" 
 [CONFIG_INFO_VD1]
-0 
+1 
 [CONFIG_INFO_VD2]
 0 
 [CONFIG_INFO_VD3]
@@ -193,9 +199,10 @@
 [CONFIG_INFO_VD4]
 0 
 [WINDOW_POSITION_STATE_DATA_VD1]
+"Help" "TOOLBAR 0" 59419 2 3 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
 "{WK_00000001_CWATCH}EmbM32C87AppSessionM32C_FoUSB_UART" "WINDOW" 59422 0 0 "0.52" 272 0 0 350 200 18 0 "32772|32773|32836|<<separator>>|32775|32776|32777|32778|<<separator>>|32780|<<separator>>|32785|<<separator>>|32837|32845|<<separator>>|32839|32841" "0.0" 
 "{WK_00000001_CWATCH}tp_info14SessionM32C_FoUSB_UART" "WINDOW" 59422 0 0 "0.15" 318 0 0 350 200 2065 0 "32772|32773|32836|<<separator>>|32775|32776|32777|32778|<<separator>>|32780|<<separator>>|32785" "0.0" 
-"{WK_00000001_CmdLine}" "WINDOW" 59422 0 1 "0.30" 272 20 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801" "0.0" 
+"{WK_00000001_CmdLine}" "WINDOW" 59422 0 1 "0.30" 272 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 -26 1115 802 9 0 "" "0.0" 
 "{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 272 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}tp_info14SessionM32C_FoUSB_UART" "WINDOW" 59422 0 3 "0.41" 272 0 0 350 200 18 0 "47300|47301|47302|47303|47304|47305|47314|47306|47307|47308|47311|47312|47313|42211|42509|42303" "0.0" 
@@ -226,6 +233,10 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
+"E:\tp_info6_elmansour\Emb_App\programme_principal_etud.c" 
+"E:\tp_info6_elmansour\Emb_App\crt0mr.a30" 
+[TARGET_NAME]
+"M32C FoUSB/UART" "" 0 
 [STATUSBAR_STATEINFO_VD1]
 "MasterShowState" 1 
 "ApplicationShowState" 1 
@@ -246,8 +257,6 @@
 [STATUSBAR_DEBUGGER_PANESTATE_VD2]
 [STATUSBAR_DEBUGGER_PANESTATE_VD3]
 [STATUSBAR_DEBUGGER_PANESTATE_VD4]
-[TARGET_NAME]
-"M32C FoUSB/UART" 
 [DEBUGGER_OPTIONS]
 "Unknown Options" 
 [DOWNLOAD_MODULES]
@@ -264,6 +273,8 @@
 "FALSE" 
 [DISABLE_MEMORY_ACCESS_DURING_EXECUTION]
 "FALSE" 
+[DEBUGGER_OPTIONS_PROPERTIES]
+"0" 
 [COMMAND_FILES]
 [DEFAULT_DEBUG_FORMAT]
 "IEEE695_RENESAS" 
Index: branch/elmansour/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/elmansour/Emb_App/SessionM32C_E8a_system.ini	(revision 81)
+++ branch/elmansour/Emb_App/SessionM32C_E8a_system.ini	(revision 82)
@@ -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=ff0016
+RESET=ff0018
Index: branch/elmansour/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/elmansour/Emb_App/SessionM32C_E8a_system.hsf	(revision 81)
+++ branch/elmansour/Emb_App/SessionM32C_E8a_system.hsf	(revision 82)
@@ -149,11 +149,11 @@
 "{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" "0000000000FF0580" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF056E" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "00000000000009BE" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000000007E4" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000AD6" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000810" 
+"{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_21" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_22" "0000000000000000" 
@@ -173,7 +173,7 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_35" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000008" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "00000000000009E0" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000B0C" 
 "{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" 
@@ -277,11 +277,11 @@
 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.09" 365 0 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0" 
+"{WK_00000001_CmdLine}" "WINDOW" 59422 0 1 "0.08" 365 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" 365 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.69" 365 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.70" 365 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.10" 365 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.09" 365 0 0 350 200 18 0 "32781|32783|<<separator>>|32771|32772|32773|<<separator>>|32786|<<separator>>|32810|32811" "0.0" 
@@ -309,8 +309,11 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
+"E:\tp_info6_elmansour\Emb_App\programme_principal_etud.c" 
 "E:\tp_info6_elmansour\Emb_App\crt0mr.a30" 
-"E:\tp_info6_elmansour\Emb_App\programme_principal_etud.c" 
+"E:\tp_info6_elmansour\Emb_App\conf_noyau.cfg" 
+"E:\tp_info6_elmansour\bsp\periph.c" 
+"E:\tp_info6_elmansour\Emb_App\Debug\mrtable.a30" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
 [STATUSBAR_STATEINFO_VD1]
@@ -357,5 +360,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 95150768 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 90293856 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/elmansour/Emb_App/programme_principal_etud.c
===================================================================
--- branch/elmansour/Emb_App/programme_principal_etud.c	(revision 81)
+++ branch/elmansour/Emb_App/programme_principal_etud.c	(revision 82)
@@ -119,15 +119,44 @@
 //				disponible. 0xab avec a-> nombre de couleurs bien placées et b -> couleurs présentes mais mal placées.
 //'I'/73/Ox49 : Définition du nom du véhicule. Doit débuter par le caractère '#' et entraine le chargement de la configuration de piste
 //				correspondant au nom du véhicule si le nom se termine par '*'
+unsigned alpha;
+int k=1;
+
+
+void tourelle(){
+	CanFrame comm;
+	CanFrame requete,reponse;
+	while (1) {
+		requete.data.id='R';
+		requete.data.rtr=1;
+		snd_dtq(CanTx,requete.msg);
+		rcv_dtq(CanRx, &reponse.msg);
+		alpha=reponse.data.val;
+		comm.data.id='T';
+		comm.data.rtr=0;
+		comm.data.val=k*(900-alpha);
+		snd_dtq(CanTx,comm.msg);
+		dly_tsk(10);
+	}
+}
+void demarer (){
+	CanFrame requete;
+	dly_tsk(2000);
+	requete.data.id='V';
+	requete.data.rtr=0;
+	requete.data.val=20;
+	snd_dtq(CanTx, requete.msg);
+}
+	
 
-
 void main()
-{
+{	
 	CanFrame comm;
 	ports_mcu();
     lcd_init();
 	periph_init();
-	periph_nom("#AutoTest*");
+	periph_nom("#AutoTest*");
+
 
     can_init();
     clavier_init(1);
@@ -138,17 +167,21 @@
 	comm.data.id='T';
 	comm.data.rtr=0;
 	comm.data.val=120;
-	snd_dtq(CanTx,comm.msg);
-
+	snd_dtq(CanTx,comm.msg);
+	sta_tsk(ID_tourelle);
+	sta_tsk(ID_demarer);
+	
     while(1)
     {
 		LED_J=1;
 		dly_tsk(100);
 		LED_J=0;
-		dly_tsk(100);
+		dly_tsk(100);
+		//tourelle();
     }
-}
+}
 
+
 void acqui()
 {
 	LED_V=!LED_V;
Index: branch/elmansour/Emb_App/conf_noyau.cfg
===================================================================
--- branch/elmansour/Emb_App/conf_noyau.cfg	(revision 81)
+++ branch/elmansour/Emb_App/conf_noyau.cfg	(revision 82)
@@ -61,6 +61,24 @@
 	initial_start	= OFF;
 	exinf	= 0x0;
 };
+task[]{
+	entry_address	= demarer();
+	name	= ID_demarer;
+	stack_size	= 256;
+	stack_section	= stack;
+	priority	= 2;
+	initial_start	= OFF;
+	exinf	= 0x0;
+};
+task[]{
+	entry_address	= tourelle();
+	name	= ID_tourelle;
+	stack_size	= 256;
+	stack_section	= stack;
+	priority	= 2;
+	initial_start	= OFF;
+	exinf	= 0x0;
+};
 
 flag[]{
 	name	= ev_bus_fin_tr;
Index: branch/elmansour/Emb_App/DefaultSession.hsf
===================================================================
--- branch/elmansour/Emb_App/DefaultSession.hsf	(revision 81)
+++ branch/elmansour/Emb_App/DefaultSession.hsf	(revision 82)
@@ -19,6 +19,9 @@
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlWindowProperties" "17" 
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineWndInstanceKey0" "{WK_00000001_CmdLine}" 
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}TclTkCtrlLogFileName" "" 
+"{4B022541-3E95-11D7-909C-00201898052D}ElfDwarf2Objects" "1" 
+"{4B022541-3E95-11D7-909C-00201898052D}LoadModule0OBJ_ELFDWARF2_ARRAY_EXPAND_LIMIT" "-1" 
+"{4B022541-3E95-11D7-909C-00201898052D}LoadModule0OBJ_STATUS_OF_EBD_CMD" "0" 
 "{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileDir" "" 
 "{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileName" "" 
 "{7943C44E-7D44-422A-9140-4CF55C88F7D3}DifferenceCtrlViews" "0" 
@@ -33,6 +36,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 +58,11 @@
 [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_elmansour\Emb_App\programme_principal_etud.c" 
+"E:\tp_info6_elmansour\Emb_App\crt0mr.a30" 
+"E:\tp_info6_elmansour\Emb_App\conf_noyau.cfg" 
+"E:\tp_info6_elmansour\bsp\periph.c" 
+"E:\tp_info6_elmansour\Emb_App\Debug\mrtable.a30" 
 [TARGET_NAME]
 "" "" 0 
 [STATUSBAR_STATEINFO_VD1]
