From 2c0a0aba67ae392ac2fc15cc128b5d9f158050de Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 23 Jul 2018 18:50:23 +0300 Subject: UART connection roblems testing --- Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 4c25aa508..42c31bf9a 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -523,7 +523,7 @@ void EightMilliSecondHeatersInterrupt(UArg arg0) ROM_TimerIntClear(Heater_timerBase, TIMER_TIMA_TIMEOUT); // Clear the timer interrupt - ROM_IntMasterDisable(); + //ROM_IntMasterDisable(); HeatersControlMessageStruc Message; //bool retcode = false; @@ -544,7 +544,7 @@ void EightMilliSecondHeatersInterrupt(UArg arg0) // // Enable all interrupts. // - ROM_IntMasterEnable(); + //ROM_IntMasterEnable(); return ; } -- cgit v1.3.1 From 330ceb91550c91a42cabc2b536c282dcc4186b6e Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Tue, 24 Jul 2018 09:13:53 +0300 Subject: update flash stub --- Software/Embedded_SW/.jxbrowser-data/Cache/data_0 | Bin 45056 -> 45056 bytes Software/Embedded_SW/.jxbrowser-data/Cache/data_1 | Bin 532480 -> 532480 bytes Software/Embedded_SW/.jxbrowser-data/Cache/data_2 | Bin 1056768 -> 1056768 bytes Software/Embedded_SW/.jxbrowser-data/Cache/data_3 | Bin 4202496 -> 4202496 bytes .../Embedded_SW/.jxbrowser-data/GPUCache/data_1 | Bin 270336 -> 270336 bytes Software/Embedded_SW/.jxbrowser-data/History | Bin 94208 -> 94208 bytes .../Embedded_SW/.jxbrowser-data/History-journal | Bin 8720 -> 0 bytes .../http_127.0.0.1.localstorage | 4 ++-- Software/Embedded_SW/.jxbrowser-data/Login Data | Bin 18432 -> 18432 bytes .../Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c | 26 +++++++++++++++------ .../Stubs Collection/stubs/Ext_Flash_RW_Buf.cs | 24 +++++++++---------- 11 files changed, 33 insertions(+), 21 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 index 1facf60d6..ec2fe0294 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 and b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 index 0741f3549..9d4b5fe06 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 and b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 index 14ead5f28..bb22cc87c 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 and b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 index 5d6364e53..d32e969f2 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 and b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 b/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 index 65a2eed82..793a38589 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 and b/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/History b/Software/Embedded_SW/.jxbrowser-data/History index 648b0a1ed..75a293a92 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/History and b/Software/Embedded_SW/.jxbrowser-data/History differ diff --git a/Software/Embedded_SW/.jxbrowser-data/History-journal b/Software/Embedded_SW/.jxbrowser-data/History-journal index 22388bc1b..e69de29bb 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/History-journal and b/Software/Embedded_SW/.jxbrowser-data/History-journal 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 223f4f243..bcef3cee7 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 @@ -#Thu Jul 12 14:41:56 IDT 2018 +#Mon Jul 23 16:29:53 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"\:16},"autoConnectChecked"\:false,"exe"\:"","commLink"\:"Debugger","autoConnect"\:false,"noExe"\:true,"showIntro"\:true} +rovInit-storage={"progressInfo"\:{"min"\:0,"max"\:7,"step"\:1,"notifyCount"\:6,"average"\:6,"numLoads"\:17},"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 5096550ae..087a08694 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Login Data and b/Software/Embedded_SW/.jxbrowser-data/Login Data differ 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 b19b0e00f..d7aa770c6 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c @@ -178,8 +178,8 @@ typedef union uint8_t Bytes[MaxFlashBytes]; }Flash_Union; -Flash_Union Flash_W; -Flash_Union Flash_R; +#define MaxBytesForAddress 256;// The addresses to be programmed must not span a 256-byte boundary + //--------------------------------------------------------------------------------------------- void Stub_ExtFlashWriteWordsRequest(MessageContainer* requestContainer) { @@ -188,6 +188,8 @@ void Stub_ExtFlashWriteWordsRequest(MessageContainer* requestContainer) uint32_t status = PASSED; + Flash_Union Flash_W; + uint32_t i; uint32_t No_Words,No_Bytes; @@ -208,6 +210,7 @@ void Stub_ExtFlashWriteWordsRequest(MessageContainer* requestContainer) Flash_W.DWords[i] = request->wordtwrite[i]; } + for(i = 0; i < No_Bytes;i++) { WriteBuf[i] = Flash_W.Bytes[i]; @@ -222,7 +225,10 @@ void Stub_ExtFlashWriteWordsRequest(MessageContainer* requestContainer) { Ext_Flash_Operation(0X00 + (0X100*i) , TX, 256 , WriteBuf+ (256*i), NULL ); } - Ext_Flash_Operation(0X00 + (0X100*i) , TX, Remainder , WriteBuf+ (256*i), NULL ); + if(Remainder) + { + Ext_Flash_Operation(0X00 + (0X100*i) , TX, Remainder , WriteBuf+ (256*i), NULL ); + } } else { @@ -251,6 +257,9 @@ void Stub_ExtFlashReadWordsRequest(MessageContainer* requestContainer) { uint32_t status = PASSED; MessageContainer responseContainer; + + Flash_Union Flash_R; + uint32_t i; StubExtFlashReadWordsRequest* request = stub_ext_flash_read_words_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); @@ -270,7 +279,10 @@ void Stub_ExtFlashReadWordsRequest(MessageContainer* requestContainer) { Ext_Flash_Operation(0X00 + (0X100*i), RX, 256, NULL, ReadBuf + (256*i) ); } - Ext_Flash_Operation(0X00 + (0X100*i), RX, Remainder, NULL, ReadBuf + (256*i) ); + if(Remainder) + { + Ext_Flash_Operation(0X00 + (0X100*i), RX, Remainder, NULL, ReadBuf + (256*i) ); + } } else { @@ -279,13 +291,13 @@ void Stub_ExtFlashReadWordsRequest(MessageContainer* requestContainer) for(i = 0; i < No_Bytes;i++) { - Flash_W.Bytes[i] = ReadBuf[i]; + Flash_R.Bytes[i] = ReadBuf[i]; } StubExtFlashReadWordsResponse response = STUB_EXT_FLASH_READ_WORDS_RESPONSE__INIT; - response.readbytes = Flash_W.DWords;//ReadBuf; - response.n_readbytes = request->number_of_words; + response.readbytes = Flash_R.DWords; + response.n_readbytes = No_Words; status_response(status,&response.status, &response.statusword ,&response.has_statusword); diff --git a/Software/Stubs Collection/stubs/Ext_Flash_RW_Buf.cs b/Software/Stubs Collection/stubs/Ext_Flash_RW_Buf.cs index aad8e3a25..b8c5d4b82 100644 --- a/Software/Stubs Collection/stubs/Ext_Flash_RW_Buf.cs +++ b/Software/Stubs Collection/stubs/Ext_Flash_RW_Buf.cs @@ -10,7 +10,7 @@ using System.Collections.Generic; using Tango.PMR.Stubs; using Tango.Stubs; -const Int32 No_Words = 65; +const Int32 No_Words = 268; public void OnExecute(StubManager stubManager) { @@ -19,26 +19,27 @@ public void OnExecute(StubManager stubManager) stubExtFlashWriteWordsRequest.Address = 0; UInt32 uInt32 = new UInt32(); - + for(uint i=0; i(stubExtFlashWriteWordsRequest); //----------------------------------------------------------------- @@ -49,7 +50,6 @@ public void OnExecute(StubManager stubManager) StubExtFlashReadWordsRequest stubExtFlashReadWordsRequest = new StubExtFlashReadWordsRequest(); stubExtFlashReadWordsRequest.NumberOfWords = No_Words; // Number of words to read - var response1 = stubManager.Run(stubExtFlashReadWordsRequest); } \ No newline at end of file -- cgit v1.3.1 From 11c58adff6c35b028e6eaa8cbb2de7c725958f30 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 24 Jul 2018 14:42:34 +0300 Subject: uart Receive Timeout handling. --- .../Embedded/Communication/CommunicationTask.c | 2 +- .../Embedded/Communication/Connection.c | 2 +- .../Embedded_SW/Embedded/Drivers/Uart_Comm/Uart.c | 24 +++++++++++++++++----- Software/Embedded_SW/Embedded/Main.c | 3 ++- .../Embedded/Modules/AlarmHandling/Diagnostics.c | 21 ++++++++++--------- .../Embedded/StateMachines/Printing/JobSTM.c | 2 +- .../Embedded/StateMachines/Printing/PrintingSTM.h | 2 +- 7 files changed, 36 insertions(+), 20 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c index 8d0f65bbe..ce90617f9 100644 --- a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c +++ b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c @@ -146,7 +146,7 @@ int32_t SetCommunicationPath(bool UARTorUSB) * ======== communicationTask ======== * Task for this function is created statically. See the project's .cfg file. * this communication task is created statically in system initialization, in blocking mode - * over one of the chosen ommunication methods (USB or Blutooth). + * over one of the chosen Communication methods (USB or Bluetooth). ******************************************************************************/ void communicationTxTask(UArg arg0, UArg arg1) { diff --git a/Software/Embedded_SW/Embedded/Communication/Connection.c b/Software/Embedded_SW/Embedded/Communication/Connection.c index f7d86cf27..c5bda84d2 100644 --- a/Software/Embedded_SW/Embedded/Communication/Connection.c +++ b/Software/Embedded_SW/Embedded/Communication/Connection.c @@ -64,7 +64,7 @@ void DisconnectionRequest(MessageContainer* requestContainer) ReportStopReporting(); DiagnosticsStop(); HeatingStopReporting(); - JoStopReporting(); + JobStopReporting(); UART_ResetBuffers(); //------------------------------------------------------------------------------------------- uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); diff --git a/Software/Embedded_SW/Embedded/Drivers/Uart_Comm/Uart.c b/Software/Embedded_SW/Embedded/Drivers/Uart_Comm/Uart.c index 54346a4e6..11669b632 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Uart_Comm/Uart.c +++ b/Software/Embedded_SW/Embedded/Drivers/Uart_Comm/Uart.c @@ -68,7 +68,7 @@ void UARTIntHandler(UArg arg0); void Init_U0(void) { - ROM_IntMasterDisable(); + //ROM_IntMasterDisable(); UARTStdioConfig(0, U0_BAUDRATE, 120000000); // @@ -76,8 +76,6 @@ void Init_U0(void) // ROM_UARTIntClear(UART0_BASE, ROM_UARTIntStatus(UART0_BASE, false)); - //ROM_UARTIntEnable(UART0_BASE, (UART_INT_OE | UART_INT_BE | UART_INT_PE | - // UART_INT_FE | UART_INT_RT | UART_INT_TX | UART_INT_RX)); //MAP_UARTIntRegister(INT_UART0,UARTIntHandler,0); /* Install interrupt handler */ @@ -90,7 +88,10 @@ void Init_U0(void) System_abort("Can't create UART Hwi"); } - ROM_UARTIntEnable(UART0_BASE, /*UART_INT_TX |*/ UART_INT_RX ); +// ROM_UARTIntEnable(UART0_BASE, /*UART_INT_TX |*/ UART_INT_RX ); + ROM_UARTIntEnable(UART0_BASE, (UART_INT_RT | UART_INT_RX)); +// ROM_UARTIntEnable(UART0_BASE, (UART_INT_OE | UART_INT_BE | UART_INT_PE | +// UART_INT_FE | UART_INT_RT | UART_INT_TX | UART_INT_RX)); ROM_UARTEnable(UART0_BASE); @@ -100,7 +101,7 @@ void Init_U0(void) // ROM_IntEnable(INT_UART0); - ROM_IntMasterEnable(); + //ROM_IntMasterEnable(); } @@ -113,6 +114,13 @@ uint32_t Uart_tx_Counter = 0; uint32_t Uart_rx_Counter = 0; uint32_t Uart_rx_TotalCounter = 0; bool UartResetProcess = false; +//uint32_t uart_INT_OECounter = 0; +//uint32_t uart_INT_BECounter = 0; +//uint32_t uart_INT_PECounter = 0; +//uint32_t uart_INT_FECounter = 0; +uint32_t uart_INT_RTCounter = 0; +uint32_t uart_INT_RXCounter = 0; + //***************************************************************************** // // The UART interrupt handler. @@ -150,6 +158,12 @@ void UARTIntHandler(UArg arg0) // Get the interrrupt status. // ui32Status = ROM_UARTIntStatus(UART0_BASE, true); +// if (ui32Status&UART_INT_OE) uart_INT_OECounter++; +// if (ui32Status&UART_INT_BE) uart_INT_BECounter++; +// if (ui32Status&UART_INT_PE) uart_INT_PECounter++; +// if (ui32Status&UART_INT_FE) uart_INT_FECounter++; + if (ui32Status&UART_INT_RT) uart_INT_RTCounter++; + if (ui32Status&UART_INT_RX) uart_INT_RXCounter++; // // Clear the asserted interrupts. diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index af5ef1c92..ecddb8f16 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -188,10 +188,11 @@ int main(void) //Test_Write_Flash_Buf(); //----------------------------------------------------------- +#ifndef EVALUATION_BOARD DeActivateAllSSR(); ActivateChiller();//SSR12 - +#endif //EMAC_initEMAC(); ControlInit(); Heaters_Init(); diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/Diagnostics.c index 19fe66611..e67fe68bb 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/Diagnostics.c @@ -123,16 +123,16 @@ void DiagnosticCollection(void) pollermotor[DiagnosticsIndex] = MotorGetSpeed (HARDWARE_MOTOR_TYPE__MOTO_LDRIVING); windermotor[DiagnosticsIndex] = MotorGetSpeed (HARDWARE_MOTOR_TYPE__MOTO_WINDER); screwmotor[DiagnosticsIndex] = MotorGetSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW); - mixertemperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_MIXCHIP_TEMP); - headzone1temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP1); - headzone2temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP2); - headzone3temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP3); - headzone4temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP4); - headzone5temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP5); - headzone6temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_AN_ENCLOSURETEMP3); - dryerzone1temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP1); - dryerzone2temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP2); - dryerzone3temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP3); + mixertemperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_MIXCHIP_TEMP)/100; + headzone1temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP1)/100; + headzone2temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP2)/100; + headzone3temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP3)/100; + headzone4temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP4)/100; + headzone5temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP5)/100; + headzone6temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_AN_ENCLOSURETEMP3)/100; + dryerzone1temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP1)/100; + dryerzone2temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP2)/100; + dryerzone3temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP3)/100; for (i=0;i Date: Tue, 24 Jul 2018 14:50:27 +0300 Subject: dryer temp set by pt100-1. rockers and break sensor enabled --- Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c | 2 +- Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 42c31bf9a..c12066eee 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -48,7 +48,7 @@ uint32_t DryerHeaterMaxTempControl = 0xFF; #warning the PT100 id for the dryer control is number2 - dryer internal ambient sensor. uint32_t HeaterId2PT100Id[MAX_HEATERS_NUM] = {TEMP_SENSE_ANALOG_DRYER_TEMP2,TEMP_SENSE_ANALOG_DRYER_TEMP1,TEMP_SENSE_ANALOG_DRYER_TEMP3,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,TEMP_SENSE_ANALOG_MIXCHIP_TEMP,TEMP_SENSE_ANALOG_MIXCHIP_TEMP}; -uint32_t DryerInternalPT100Id = TEMP_SENSE_ANALOG_DRYER_TEMP3; +uint32_t DryerInternalPT100Id = TEMP_SENSE_ANALOG_DRYER_TEMP1; bool HeatersRestart = false; bool HeaterMaxTempFlag[MAX_HEATERS_NUM] = {false,false,false,false,false,false,false,false,false,false}; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 45ea660c3..4bc21773b 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -352,10 +352,10 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) for (i=0;i eOneSecond) + if (JobCounter > eHundredMillisecond) { if (ReadBreakSensor()==ERROR) { @@ -365,7 +365,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) } } } - */ + //Stop Execution if the dancer moves too much if ((abs(avreageSampleValue)> DancerStopActivityLimit[index])&&(JobCounter > eOneSecond)) { @@ -560,10 +560,10 @@ uint32_t ThreadPreSegmentState(void *JobDetails) //#warning rocker disabled if (MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RLOADING].has_directionthreadwize) MotorSetDirection((TimerMotors_t)HARDWARE_MOTOR_TYPE__MOTO_RLOADING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RLOADING].directionthreadwize); - MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_RLOADING, 5); + MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_RLOADING, 2); if (MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_LLOADING].has_directionthreadwize) MotorSetDirection((TimerMotors_t)HARDWARE_MOTOR_TYPE__MOTO_LLOADING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_LLOADING].directionthreadwize); - MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, 5); + MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, 2); //#warning rocker disabled // MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_RDRIVING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDRIVING].directionthreadwize, 0, GPI_LS_RLOADMOTOR_UP, EndState); //TODO -- cgit v1.3.1 From 8120fdebdff3feee85f8faa07e7abbe4064e1ca3 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Tue, 24 Jul 2018 16:29:39 +0300 Subject: update Stub_ExFlash.c --- Software/Embedded_SW/.jxbrowser-data/Cache/data_0 | Bin 45056 -> 45056 bytes Software/Embedded_SW/.jxbrowser-data/Cache/data_1 | Bin 532480 -> 532480 bytes Software/Embedded_SW/.jxbrowser-data/Cache/data_2 | Bin 1056768 -> 1056768 bytes Software/Embedded_SW/.jxbrowser-data/Cache/data_3 | Bin 4202496 -> 4202496 bytes .../Embedded_SW/.jxbrowser-data/GPUCache/data_1 | Bin 270336 -> 270336 bytes Software/Embedded_SW/.jxbrowser-data/History | Bin 94208 -> 94208 bytes .../http_127.0.0.1.localstorage | 4 ++-- Software/Embedded_SW/.jxbrowser-data/Login Data | Bin 18432 -> 18432 bytes .../Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c | 26 ++++++++++++++------- .../Stubs Collection/stubs/Ext_Flash_RW_Buf.cs | 7 +++--- 10 files changed, 23 insertions(+), 14 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 index ec2fe0294..fd7a261f3 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 and b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 index 9d4b5fe06..f93dc7092 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 and b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 index bb22cc87c..c9289a9fc 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 and b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 index d32e969f2..a1a30e57f 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 and b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 b/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 index 793a38589..a898e5e2b 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 and b/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/History b/Software/Embedded_SW/.jxbrowser-data/History index 75a293a92..b4191a552 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/History and b/Software/Embedded_SW/.jxbrowser-data/History 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 bcef3cee7..e606ba65a 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 @@ -#Mon Jul 23 16:29:53 IDT 2018 +#Tue Jul 24 13:57:24 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"\:17},"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"\:18},"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 087a08694..d9af96346 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Login Data and b/Software/Embedded_SW/.jxbrowser-data/Login Data differ 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 d7aa770c6..eb58c48ac 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c @@ -169,7 +169,7 @@ void Stub_ExtFlashReadRequest(MessageContainer* requestContainer) } //------------------------------------------------------------------------------------- -#define MaxFlashWords 1050 +#define MaxFlashWords 1024 #define MaxFlashBytes MaxFlashWords*4 typedef union @@ -178,17 +178,23 @@ typedef union uint8_t Bytes[MaxFlashBytes]; }Flash_Union; +Flash_Union Flash_RW; +//Flash_Union Flash_R; + +uint32_t WriteBuf[MaxFlashBytes]; +uint32_t ReadBuf[MaxFlashBytes]; + #define MaxBytesForAddress 256;// The addresses to be programmed must not span a 256-byte boundary //--------------------------------------------------------------------------------------------- void Stub_ExtFlashWriteWordsRequest(MessageContainer* requestContainer) { - uint32_t WriteBuf[MaxFlashWords]; + uint32_t status = PASSED; - Flash_Union Flash_W; + uint32_t i; uint32_t No_Words,No_Bytes; @@ -205,15 +211,17 @@ void Stub_ExtFlashWriteWordsRequest(MessageContainer* requestContainer) No_Words = request->n_wordtwrite; No_Bytes = request->n_wordtwrite *4; + memset(&Flash_RW,0,sizeof(Flash_RW)); + for(i = 0; i < No_Words;i++) { - Flash_W.DWords[i] = request->wordtwrite[i]; + Flash_RW.DWords[i] = request->wordtwrite[i]; } for(i = 0; i < No_Bytes;i++) { - WriteBuf[i] = Flash_W.Bytes[i]; + WriteBuf[i] = Flash_RW.Bytes[i]; } if(No_Bytes >256) @@ -258,14 +266,14 @@ void Stub_ExtFlashReadWordsRequest(MessageContainer* requestContainer) uint32_t status = PASSED; MessageContainer responseContainer; - Flash_Union Flash_R; + memset(&Flash_RW,0,sizeof(Flash_RW)); uint32_t i; StubExtFlashReadWordsRequest* request = stub_ext_flash_read_words_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); uint32_t No_Words,No_Bytes; - uint32_t ReadBuf[MaxFlashWords]; + No_Words = request->number_of_words; No_Bytes = request->number_of_words *4; @@ -291,12 +299,12 @@ void Stub_ExtFlashReadWordsRequest(MessageContainer* requestContainer) for(i = 0; i < No_Bytes;i++) { - Flash_R.Bytes[i] = ReadBuf[i]; + Flash_RW.Bytes[i] = ReadBuf[i]; } StubExtFlashReadWordsResponse response = STUB_EXT_FLASH_READ_WORDS_RESPONSE__INIT; - response.readbytes = Flash_R.DWords; + response.readbytes = Flash_RW.DWords; response.n_readbytes = No_Words; status_response(status,&response.status, &response.statusword ,&response.has_statusword); diff --git a/Software/Stubs Collection/stubs/Ext_Flash_RW_Buf.cs b/Software/Stubs Collection/stubs/Ext_Flash_RW_Buf.cs index b8c5d4b82..d626fc981 100644 --- a/Software/Stubs Collection/stubs/Ext_Flash_RW_Buf.cs +++ b/Software/Stubs Collection/stubs/Ext_Flash_RW_Buf.cs @@ -10,7 +10,8 @@ using System.Collections.Generic; using Tango.PMR.Stubs; using Tango.Stubs; -const Int32 No_Words = 268; +const Int32 No_Words = 1024;//1024 +uint Delta = 10000; //4000000000 public void OnExecute(StubManager stubManager) { @@ -20,7 +21,7 @@ public void OnExecute(StubManager stubManager) UInt32 uInt32 = new UInt32(); - for(uint i=0; i