aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2019-02-04 13:29:47 +0200
committerAvi Levkovich <avi@twine-s.com>2019-02-04 13:29:47 +0200
commit6f82ed27ded46d18302ce46e0869435cd461e3b3 (patch)
tree59da1c25da7c3544c24235a84ec22b4ba39d1cee /Software/Embedded_SW
parent3f5b0a7636c32582c67dbe965aaac7bf3ac2bdbd (diff)
downloadTango-6f82ed27ded46d18302ce46e0869435cd461e3b3.tar.gz
Tango-6f82ed27ded46d18302ce46e0869435cd461e3b3.zip
Add temporary function to test the breathing leds
Diffstat (limited to 'Software/Embedded_SW')
-rw-r--r--Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage4
-rw-r--r--Software/Embedded_SW/.jxbrowser-data/Login Databin18432 -> 18432 bytes
-rw-r--r--Software/Embedded_SW/Embedded/.cproject2
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c55
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c2
6 files changed, 64 insertions, 3 deletions
diff --git a/Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage b/Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage
index fec0901b2..c7f8a57ab 100644
--- a/Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage
+++ b/Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage
@@ -1,4 +1,4 @@
-#Wed Jan 23 14:51:29 IST 2019
+#Mon Feb 04 13:00:42 IST 2019
viewsData-storage={"ti.sysbios.knl.Task.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"mode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg0","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"arg1","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"stackSize","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"stackBase","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"curCoreId","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"affinity","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.knl.Task"\:{"defaultViewName"\:"CallStacks"},"ti.sysbios.family.arm.m3.Hwi.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"halHwiHandle","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"type","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"intNum","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"group","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"subPriority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg","checked"\:true,"hasFormat"\:true,"format"\:"Hex"}],"hasFormats"\:true},"ti.sysbios.family.arm.m3.Hwi"\:{"defaultViewName"\:"Exception"},"ti.sysbios.knl.Task.Detailed"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"mode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg0","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"arg1","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"stackPeak","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"stackSize","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"stackBase","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"curCoreId","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"affinity","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"blockedOn","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.family.arm.m3.Hwi.Detailed"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"halHwiHandle","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"type","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"intNum","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"group","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"subPriority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"irp","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"status","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"coreId","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"}],"hasFormats"\:true},"ti.sysbios.heaps.HeapMem.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"buf","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"minBlockAlign","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"sectionName","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.knl.Event"\:{"defaultViewName"\:"Basic"},"ti.sysbios.knl.Event.Raw"\:{},"ti.catalog.arm.cortexm4.tiva.ce.Boot.Module"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"configureClock","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"sysClockDivEnable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"sysClockDiv","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pwmClockDivEnable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pwmClockDiv","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"xtal","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"oscSrc","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pllBypass","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pllOutEnable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"ioscDisable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"moscDisable","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:false},"ti.sysbios.knl.Swi.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"state","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg0","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"arg1","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"initTrigger","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"curTrigger","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"}],"hasFormats"\:true},"xdc.runtime.System.XDCROOT"\:{"columnStates"\:[{"name"\:"entry","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:false},"xdc.runtime.System"\:{"defaultViewName"\:"Raw"},"xdc.runtime.System.Raw"\:{},"ti.sysbios.family.arm.m3.Hwi.Raw"\:{},"xdc.runtime.Startup.Module"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"rtsStartupDone","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"startupBegun","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"resetFxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"firstFxns","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"lastFxns","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.knl.Semaphore.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"event","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"eventId","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"mode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"count","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"pendedTasks","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.family.arm.lm4.Timer.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"halTimerHandle","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"id","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"device","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"startMode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"runMode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"period","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"periodType","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"intNum","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"tickFxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"extFreq","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"hwiHandle","checked"\:true,"hasFormat"\:true,"format"\:"Hex"}],"hasFormats"\:true},"xdc.runtime.SysMin.Module"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"outBuf","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"outBufIndex","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"wrapped","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true}}
rovSettings-storage={"exeMrus"\:["C\:/Tango/Software/Embedded_SW/Embedded/Debug/Embedded.out","C\:/Tango/Software/Embedded_SW/Embedded/debug_w_pmr/Embedded.out"]}
-rovInit-storage={"progressInfo"\:{"min"\:0,"max"\:7,"step"\:1,"notifyCount"\:6,"average"\:6,"numLoads"\:20},"autoConnectChecked"\:false,"exe"\:"C\:/Tango/Software/Embedded_SW/Embedded/Debug/Embedded.out","commLink"\:"Debugger","autoConnect"\:false,"noExe"\:false,"showIntro"\:true}
+rovInit-storage={"progressInfo"\:{"min"\:0,"max"\:7,"step"\:1,"notifyCount"\:6,"average"\:6,"numLoads"\:21},"autoConnectChecked"\:false,"exe"\:"C\:/Tango/Software/Embedded_SW/Embedded/Debug/Embedded.out","commLink"\:"Debugger","autoConnect"\:false,"noExe"\:false,"showIntro"\:true}
diff --git a/Software/Embedded_SW/.jxbrowser-data/Login Data b/Software/Embedded_SW/.jxbrowser-data/Login Data
index d73270d9f..7684f598d 100644
--- a/Software/Embedded_SW/.jxbrowser-data/Login Data
+++ b/Software/Embedded_SW/.jxbrowser-data/Login Data
Binary files differ
diff --git a/Software/Embedded_SW/Embedded/.cproject b/Software/Embedded_SW/Embedded/.cproject
index 20edaeefb..38422568f 100644
--- a/Software/Embedded_SW/Embedded/.cproject
+++ b/Software/Embedded_SW/Embedded/.cproject
@@ -169,7 +169,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="Common/protobuf-c/person-pb-c.c|JigCommands.c|PWM.c|USBCDCD.c|Message.c|Pin_config.c|src|Configuration.c|SlowMotors.c|Timer.c|Communication.c|FastMotors.c|ADCUtils.c|Drivers/L6470|Pin.c|ADCLogger.c|Flashstore.c|Profile.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="JigCommands.c|PWM.c|USBCDCD.c|Message.c|Pin_config.c|src|Configuration.c|SlowMotors.c|Timer.c|Communication.c|FastMotors.c|ADCUtils.c|Drivers/L6470|Pin.c|ADCLogger.c|Flashstore.c|Profile.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c
index 13c31fb49..09cd03a26 100644
--- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c
+++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c
@@ -296,3 +296,58 @@ void Control_Dryer_Fan_PWM(uint8_t PWN_Command_Precent)// 0 - 100%
// low + high = 0xFF in order use the same freq (and change the freq only by Add 0x112).
// there is option to change only the high (low + freq constasnt) this will chnga the freq
}
+
+void Control_LED1_PWM() //if (Ten_msTick)
+{
+ // change to cycle to 100 in order to work with %, with constant FREQ
+
+ F3_Prescaler1_reg5 = 0x03;
+
+ //uint8_t Freq = 0x3;//divider Clock = 25M/divider
+
+ static uint8_t PWN_Command_Precent = 0;// 0 - 100%
+ static uint8_t direction = UP;
+
+/* if(PWN_Command_Precent > 100)
+ PWN_Command_Precent = 100;*/
+
+ // GPO_BLOWER_PWM_FREQ = Freq;
+
+
+ F3_Prescaler1_reg9 = PWN_Command_Precent + 1;
+ F3_Prescaler1_reg10 = 101 - PWN_Command_Precent;
+
+ if(direction == UP)
+ {
+ if (PWN_Command_Precent == 100)
+ {
+ direction = DOWN; //"0"
+ //PWN_Command_Precent--;
+ //delayms(20);
+ }
+ else
+ {
+ PWN_Command_Precent++;
+ }
+ }
+ else
+ if(direction == DOWN)
+ {
+ if (PWN_Command_Precent == 0)
+ {
+ direction = UP;//"1"
+ //PWN_Command_Precent++;
+ //delayms(20);
+ }
+ else
+ {
+ PWN_Command_Precent--;
+ }
+
+ }
+ //delayms(10);
+
+ // low + high = 0xFF in order use the same freq (and change the freq only by Add 0x112).
+ // there is option to change only the high (low + freq constasnt) this will chnga the freq
+}
+
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h
index 7c052fcde..bfd21eb92 100644
--- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h
+++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h
@@ -699,6 +699,10 @@
//Test
#define F3_Test (*((volatile short *)(FPGA3_BASE | 0x3F0))) //Readback not - gives the inverse of the written to value
+//LEDS
+#define F3_Prescaler1_reg9 (*((volatile short *)(FPGA3_BASE | 0x390))) //Parameter for prescaler divisions
+#define F3_Prescaler1_reg10 (*((volatile short *)(FPGA3_BASE | 0x392))) //Parameter for prescaler divisions
+
//1 Version1_Direct
typedef union
{
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index eb4d0a49a..10286853e 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -420,6 +420,7 @@ uint32_t MillisecLoop(uint32_t tick)
Dancer_Data[FEEDER_DANCER] = Read_Dancer_Position(FEEDER_DANCER);
Dancer_Data[POOLER_DANCER] = Read_Dancer_Position(POOLER_DANCER);
Dancer_Data[WINDER_DANCER] = Read_Dancer_Position(WINDER_DANCER);
+
return OK;
}
uint32_t MillisecLowLoop(uint32_t tick)
@@ -445,6 +446,7 @@ uint32_t MillisecLowLoop(uint32_t tick)
//Speed_Data = Calculate_Speed_Sensor_Velocity();
//MillisecReadFromTempSensor(Sensor_Read, NULL);
//if (Sensor_Read++ >= MAX_TEMPERATURE_SENSOR_ID) Sensor_Read = 0;
+ //Control_LED1_PWM();
}
if (Hundred_msTick)
{