aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2018-08-21 09:15:19 +0300
committerAvi Levkovich <avi@twine-s.com>2018-08-21 09:15:19 +0300
commit98493042a5dace2535dd4343c047eaf1bd784ae3 (patch)
tree99d298d9a7db9db5e2849e3ae7eb5cb4b4e6510f /Software/Embedded_SW
parentafa0b927386a8f71f5794d8263792e65cd9a2120 (diff)
downloadTango-98493042a5dace2535dd4343c047eaf1bd784ae3.tar.gz
Tango-98493042a5dace2535dd4343c047eaf1bd784ae3.zip
update flash
Diffstat (limited to 'Software/Embedded_SW')
-rw-r--r--Software/Embedded_SW/.jxbrowser-data/Cache/data_0bin45056 -> 45056 bytes
-rw-r--r--Software/Embedded_SW/.jxbrowser-data/Cache/data_1bin532480 -> 794624 bytes
-rw-r--r--Software/Embedded_SW/.jxbrowser-data/Cache/data_2bin1056768 -> 2105344 bytes
-rw-r--r--Software/Embedded_SW/.jxbrowser-data/Cache/data_3bin4202496 -> 8396800 bytes
-rw-r--r--Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1bin270336 -> 270336 bytes
-rw-r--r--Software/Embedded_SW/.jxbrowser-data/Historybin94208 -> 94208 bytes
-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/Drivers/Flash_Memory/Flash_Memory.c41
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.h2
-rw-r--r--Software/Embedded_SW/Embedded/Main.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Cartridge.c10
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c2
13 files changed, 56 insertions, 7 deletions
diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0
index fd7a261f3..4db352fb3 100644
--- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0
+++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0
Binary files differ
diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1
index f93dc7092..a46d23c87 100644
--- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1
+++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1
Binary files differ
diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2
index c9289a9fc..54bb2b79d 100644
--- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2
+++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2
Binary files differ
diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3
index a1a30e57f..3322af077 100644
--- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3
+++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3
Binary files differ
diff --git a/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 b/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1
index a898e5e2b..4ffeb88cb 100644
--- a/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1
+++ b/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1
Binary files differ
diff --git a/Software/Embedded_SW/.jxbrowser-data/History b/Software/Embedded_SW/.jxbrowser-data/History
index b4191a552..af92dd0a9 100644
--- a/Software/Embedded_SW/.jxbrowser-data/History
+++ b/Software/Embedded_SW/.jxbrowser-data/History
Binary files differ
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 e606ba65a..32838ea86 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 Jul 24 13:57:24 IDT 2018
+#Mon Aug 13 15:51:32 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"\:"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"\:"Raw"},"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"\:{}}
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"\:18},"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"\:0,"average"\:6,"numLoads"\:19},"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 d9af96346..e844a2c9d 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/Drivers/Flash_Memory/Flash_Memory.c b/Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.c
index 9d2e048d4..3c79927ff 100644
--- a/Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.c
+++ b/Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.c
@@ -3,6 +3,11 @@
//see also https://github.com/yuvadm/tiva-c/blob/master/boards/dk-tm4c129x/drivers/mx66l51235f.c
//On board Quad SPI 512Mb Flash
+
+//Macronixýþ þýMX66L51235FZ2I-10Gýþ
+//Sector Size 4KB
+
+
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
@@ -47,6 +52,12 @@
#define INS_PAGE_PROGRAM 0x02
#define INS_READ_DATA 0x03
+//-------------------- AVI: based on https://github.com/turingo/stm32ss/blob/master/src/stm32ss/bsp/sf.c
+#define INS_BLOCK_ERASE (0xd8)
+#define INS_CHIP_ERASE (0xc7)
+#define INS_WRITE_DISABLE (0x04)
+//-------------------------
+
#if defined(ewarm)
#pragma data_alignment=1024
tDMAControlTable g_sDMAControlTable[6];
@@ -618,7 +629,7 @@ int Read_Ext_Flash_Device_ID()
return 0;
}
-int Erase_Sector_before_writting_To_Ext_Flash(uint32_t ui32Address)
+int Erase_Sector_before_writting_To_Ext_Flash(uint32_t ui32Address)// 4Kb every 100h is sector (0-0xFFF, 0x1000-0x1fff,..)
{
writeLine("Starting Erase Operations...");
@@ -630,6 +641,29 @@ int Erase_Sector_before_writting_To_Ext_Flash(uint32_t ui32Address)
return 0;
}
+int Erase_Block(uint32_t ui32Address)// 32Kb or 64Kb ?
+{
+ writeLine("Starting Erase Block Operations...");
+
+
+ SSILibSendEraseCommand(SSI3_BASE,ui32Address,INS_BLOCK_ERASE );
+
+ writeLine("Erase Block Completed...");
+
+ return 0;
+}
+
+int Erase_Chip()// 32Kb or 64Kb ?
+{
+ writeLine("Starting Erase Block Operations...");
+
+ SSILibSendEraseCommand(SSI3_BASE,0,INS_CHIP_ERASE );
+
+ writeLine("Erase Block Completed...");
+
+ return 0;
+}
+
int Write_Words_To_Ext_Flash(uint32_t ui32Address, uint32_t NumOfWords, uint32_t* TxBuf)
{
@@ -734,7 +768,8 @@ int Ext_Flash_Operation(uint32_t ui32Address,uint32_t Operation, uint32_t NumOf
Display_RX_TX_Ext_Flash_Data(NumOfWords, pui32DataTx, NULL);
// Erase the Sector before Program Operation...
- //Erase_Sector_before_writting_To_Ext_Flash(ui32Address);//Erase all the sector not only from this address
+ Erase_Sector_before_writting_To_Ext_Flash(ui32Address);//Erase all the sector not only from this address
+ //Erase_Block(ui32Address);//Added by AVI for testing
// Write NUM_SSI_DATA words to the External Flash
Write_Words_To_Ext_Flash(ui32Address, NumOfWords, pui32DataTx);
@@ -820,7 +855,7 @@ uint32_t ExtFlashWriteBuf(uint32_t ui32Address,uint32_t NumOfWords, uint32_t* p
*/
-uint32_t ExtFlashWriteBuf(uint32_t ui32Address,uint32_t NumOfWords, uint32_t* pui32DataTx)//ui32Address not in use
+uint32_t ExtFlashWriteBuf(/*uint32_t ui32Address,*/uint32_t NumOfWords, uint32_t* pui32DataTx)//ui32Address not in use
{
uint32_t AddressCounter = 0;
uint32_t i;
diff --git a/Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.h b/Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.h
index e0f9eb9f7..cca2cd848 100644
--- a/Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.h
+++ b/Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.h
@@ -4,7 +4,7 @@
int Ext_Flash_Operation();
int FlashFS_Init();
-uint32_t ExtFlashWriteBuf(uint32_t ui32Address,uint32_t NumOfWords, uint32_t* pui32DataTx);
+uint32_t ExtFlashWriteBuf(/*uint32_t ui32Address,*/uint32_t NumOfWords, uint32_t* pui32DataTx);
uint32_t* ExtFlashReadBuf(uint32_t ui32Address,uint32_t NumOfWords );
extern Flash_Union Flash_RW;
diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c
index cb8755a68..c4f476859 100644
--- a/Software/Embedded_SW/Embedded/Main.c
+++ b/Software/Embedded_SW/Embedded/Main.c
@@ -193,6 +193,10 @@ int main(void)
//Write_DAC_and_Input_Register();
+/*
+ Erase_Chip();
+ SysCtlDelay(1000);
+ Erase_Block(0);*/
//-----------------------------------------------------------
#ifndef EVALUATION_BOARD
diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Cartridge.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Cartridge.c
index 49c7d0d3b..3e82a7062 100644
--- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Cartridge.c
+++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Cartridge.c
@@ -29,6 +29,16 @@ void Stub_CartridgeReadRequest(MessageContainer* requestContainer)
writeFloat(request->cartridgeid);
+ /*
+ int i;
+ for( i=0;i<8;i++)
+ {
+ Read_MidTank_Pressure_Sensor(i);
+ SysCtlDelay(1);
+ }
+
+ */
+
StubCartridgeReadResponse response = STUB_CARTRIDGE_READ_RESPONSE__INIT;
response.cartridgeid = request->cartridgeid;
diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c
index 3e3236a87..a336ffbc3 100644
--- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c
+++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c
@@ -328,7 +328,7 @@ void Stub_ExtFlashWriteWordsRequest(MessageContainer* requestContainer)
StubExtFlashWriteWordsResponse response = STUB_EXT_FLASH_WRITE_WORDS_RESPONSE__INIT;
- uint32_t Current_Start_address = ExtFlashWriteBuf(0,request->n_wordtwrite, request->wordtwrite);// alwayes send sddress 0
+ uint32_t Current_Start_address = ExtFlashWriteBuf(/*0,*/request->n_wordtwrite, request->wordtwrite);// alwayes send sddress 0
response.address = Current_Start_address;
response.has_address = true;