diff options
| author | Avi Levkovich <avi@twine-s.com> | 2018-04-11 16:44:56 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2018-04-11 16:44:56 +0300 |
| commit | 5192a54ed0d527d308c52e76dfb6e5af99c63b95 (patch) | |
| tree | ae1ed301c7567bfcd97aebf8c8d4219c5bbbbad5 | |
| parent | bd55f690f555c078a41ec94e08d89219cd1dfb78 (diff) | |
| download | Tango-5192a54ed0d527d308c52e76dfb6e5af99c63b95.tar.gz Tango-5192a54ed0d527d308c52e76dfb6e5af99c63b95.zip | |
update motor setup + SPI_Transnit
| -rw-r--r-- | Software/Embedded_SW/.jxbrowser-data/32428_0.lock | 1 | ||||
| -rw-r--r-- | Software/Embedded_SW/.jxbrowser-data/Cache/data_0 | bin | 45056 -> 45056 bytes | |||
| -rw-r--r-- | Software/Embedded_SW/.jxbrowser-data/Cache/data_1 | bin | 270336 -> 270336 bytes | |||
| -rw-r--r-- | Software/Embedded_SW/.jxbrowser-data/Cache/data_2 | bin | 1056768 -> 1056768 bytes | |||
| -rw-r--r-- | Software/Embedded_SW/.jxbrowser-data/Cache/data_3 | bin | 4202496 -> 4202496 bytes | |||
| -rw-r--r-- | Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 | bin | 270336 -> 270336 bytes | |||
| -rw-r--r-- | Software/Embedded_SW/.jxbrowser-data/History | bin | 94208 -> 94208 bytes | |||
| -rw-r--r-- | Software/Embedded_SW/.jxbrowser-data/History-journal | bin | 8720 -> 0 bytes | |||
| -rw-r--r-- | Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage | 2 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c | 17 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Drivers/SPI/SPI_Comm.c | 4 |
11 files changed, 18 insertions, 6 deletions
diff --git a/Software/Embedded_SW/.jxbrowser-data/32428_0.lock b/Software/Embedded_SW/.jxbrowser-data/32428_0.lock deleted file mode 100644 index 2f3445234..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/32428_0.lock +++ /dev/null @@ -1 +0,0 @@ -1523349396308 diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 Binary files differindex ec9c428a8..8716a58fa 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 Binary files differindex 16707656f..060d5488b 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 Binary files differindex 250140fe2..5b0b07a21 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 Binary files differindex dde531635..5ff3b43be 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 diff --git a/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 b/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 Binary files differindex c80c63cb6..c21660337 100644 --- a/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 +++ b/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 diff --git a/Software/Embedded_SW/.jxbrowser-data/History b/Software/Embedded_SW/.jxbrowser-data/History Binary files differindex a7a8e77c5..8c820291b 100644 --- a/Software/Embedded_SW/.jxbrowser-data/History +++ b/Software/Embedded_SW/.jxbrowser-data/History diff --git a/Software/Embedded_SW/.jxbrowser-data/History-journal b/Software/Embedded_SW/.jxbrowser-data/History-journal Binary files differindex eeb90a8df..e69de29bb 100644 --- a/Software/Embedded_SW/.jxbrowser-data/History-journal +++ b/Software/Embedded_SW/.jxbrowser-data/History-journal 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 e7c51132e..95a2b7a0d 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 @@ -#Tue Apr 10 16:21:42 IDT 2018 +#Wed Apr 11 16:43:16 IDT 2018 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"\:"Detailed"},"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}} rovSettings-storage={"exeMrus"\:["C\:/Tango/Software/Embedded_SW/Embedded/Debug/Embedded.out"]} rovInit-storage={"progressInfo"\:{"min"\:0,"max"\:7,"step"\:1,"notifyCount"\:6,"average"\:6,"numLoads"\:3},"autoConnectChecked"\:false,"exe"\:"<Use the program currently being debugged>","commLink"\:"Debugger","autoConnect"\:false,"noExe"\:true,"showIntro"\:true} diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c index 26cb3654c..c07908be3 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c @@ -103,16 +103,29 @@ static FpgaMotMap_t FpgaMotMap[NUM_OF_MOTORS] = SPI spi; +SPI Fpga_Spi[NUM_OF_MOTORS]; + uint8_t SPI_Transnit(SPI Spi) { INT2SHORT Int2Short; + + + /////////////////////////////////////////////////////////////////////////////// + if(*FpgaMotMap[Spi.MotID].NBUSY == NOTBUSY) + { + Int2Short.uint = Spi.TX_MOSI; + + *FpgaMotMap[Spi.MotID].TX_01 = Int2Short.ushort.MSB; + *FpgaMotMap[Spi.MotID].TX_00 = Int2Short.ushort.LSB; + } + /////////////////////////////////////////////////////////////////////////////// + + //Check Busy register and see if the SPI desired is available while((F1_SPI_Busy1_D != NOTBUSY ) || (F1_SPI_Busy2_D != NOTBUSY )); - Int2Short.uint = Spi.TX_MOSI; - switch(Spi.MotID) { case MOTOR_RLOADING: diff --git a/Software/Embedded_SW/Embedded/Drivers/SPI/SPI_Comm.c b/Software/Embedded_SW/Embedded/Drivers/SPI/SPI_Comm.c index e1e91962e..614663c6b 100644 --- a/Software/Embedded_SW/Embedded/Drivers/SPI/SPI_Comm.c +++ b/Software/Embedded_SW/Embedded/Drivers/SPI/SPI_Comm.c @@ -423,7 +423,7 @@ void setup(StubMotorInitRequest* request) // this register; to disable full-step switching, you can pass // 0x3FF to this register. while(SSIBusy(SSI2_BASE)){}; - SetParam(x_FS_SPD, FSCalc(0x3FF)); + SetParam(x_FS_SPD, FSCalc(0x3FF));//h3FF (max.) the system always works in microstepping mode //STALL threshold while(SSIBusy(SSI2_BASE)){}; @@ -478,7 +478,7 @@ void setup(StubMotorInitRequest* request) // Configure the overcurrent detection threshold. The constants // for this are defined in the L6470.h file. while(SSIBusy(SSI2_BASE)){}; - SetParam(x_OCD_TH, x_OCD_TH_1500mA); + SetParam(x_OCD_TH, x_OCD_TH_3000mA); // Set up the CONFIG register as follows: // PWM frequency divisor = 1 |
