Bug Report — 20191026 — Another the resolve

This resolve will be used in any FrameCount you set up in downloader of EP iLogic. 

[Another the resolve]
case 0x6A:
{    static int MaxInfoLen=0;
     unsigned char i,infolen;
     if( (pld->LgInfoPos+StartAddr*MaxInfoLen+infolen)>(EEP_SIZE+100) ) {
       *pSend = 0x82; pSend++; SendLen++;
     } else {
       *pSend = 0x80; pSend++; SendLen++;
     }
     *pSend = (StartAddr & 0xFF00) >> 8;    pSend++; SendLen++;
     *pSend = StartAddr;                    pSend++; SendLen++;
     infolen = *Code;  Code++;
     if( MaxInfoLen < infolen)  MaxInfoLen = infolen;
     for(i=0 ; i<infolen ; i++) {
       my_eeprom_write_byte( pld->LgInfoPos+  StartAddr*MaxInfoLen+i  ,*Code );  Code++;
     }
}
break;

Bug Report – 20191026

Hello all

The new version of 1.1.28 is not totally to match to middleware of TEPMWConponent, so Here I write this bug and tell everyone. This software source declared problem to notificate user to recovery.

Date:  20191026

File Project:  TEPMWComponent

FileName:  EPMWComponent.cpp

Problem Description:   FUNCs mismatch the line status.

[Code Original]

case 0x6A:
{
byte i,infolen;

if( (pld->LgInfoPos + StartAddr*128 + infolen)  > (FBufferSize + 100) ) {
*pSend = 0x82; pSend++; SendLen++;
} else {
*pSend = 0x80; pSend++; SendLen++;
}
*pSend = (StartAddr & 0xFF00) >> 8;    pSend++; SendLen++;
*pSend = StartAddr;                                pSend++; SendLen++;

infolen = *Code;  Code++;

for(i=0;i<infolen;i++) {
eeprom_write_byte(pld->LgInfoPos + StartAddr*128 + i , *Code );  Code++;  // MaxLogic
}}
break;

[Code Recovery]

case 0x6A:
{
byte i,infolen;

if( (pld->LgInfoPos + StartAddr*138 + infolen)  > (FBufferSize + 100) ) {
*pSend = 0x82; pSend++; SendLen++;
} else {
*pSend = 0x80; pSend++; SendLen++;
}
*pSend = (StartAddr & 0xFF00) >> 8;    pSend++; SendLen++;
*pSend = StartAddr;                                pSend++; SendLen++;

infolen = *Code;  Code++;

for(i=0;i<infolen;i++) {
eeprom_write_byte(pld->LgInfoPos + StartAddr*138 + i , *Code );  Code++;  // MaxLogic
}}
break;

 

[Notification]

   Please in Downloader use FrameCount 10. to match device’s middleware.

 

 

I use SD card in Arduino Due with Middleware is successfully.

Hello world.

It is hard to develop under limited eeprom, because you build document of LCOD is also limited, so I change the rom to SD card, that is very easy and fast. Now it is enough for development of middelware, because it is usually 16GB or up.  I use arduino’s libs and hardware to applicate, and be feeling relax to implement.

First the procedure you must check the exists of file you want to access. If it is none, please touch 1MB up of  zero data of  file,  then file open that.  so when iLogic_write_eeprom_byte or iLogic_read_eeprom_byte event, please before accessing data you need to seek the file director. and read/wirte the binary data you can assign/read.  Of course that procedure is for one byte, so I add iLogic_write_eeprom_pbyte / iLogic_read_eeprom_pbyte to read buffers and assign binary data from buffers. It shall accelerate the prcedure.  Now I can build huge document of LCOD and find subjects to text books.

I hope I write this is useful who want to develop in arduino due.  And that is easy way and tell how to do will be great !!.

Ivan Perng in Hsinchu.

How to use DueFlashStorage in Arduino Due (Middleware)

Hello World !!

This topic we want to tell that the example of Arduino Mega2560 is not enough of EEPROM to applicable. So I find the other to resolve this problem. now we can use DueFlashStorage and Arduino Due to save binary code that download from EP iLogic.

  •  First you can Download DueFlashStorage  this link https://www.arduinolibraries.info/libraries/due-flash-storage  and unzip.  Copy that files to ArduinoLibraries directory.  That meaning your installed arduino can use third solution of library to DueFlashStorage.
  • Please Modify the file DueFlashStorage.h
        <<   from: >>
                 // 1Kb of data

 

                 #define DATA_LENGTH   ((IFLASH1_PAGE_SIZE/sizeof(byte))*4)
         <<  to: >>
              // 250Kb of data
              #define DATA_LENGTH   ((IFLASH1_PAGE_SIZE/sizeof(byte))* 4 * 250)
             250 Kb you can set up with your decision.

 

  • Please New Project from Sample Template (you can select Due Balance Car)

.<<   from: >>
#include <EEPROM.h>
byte iLogic_eeprom_read_byte(unsigned int addr)
{ return EEPROM.read(addr);
}
void iLogic_eeprom_write_byte( unsigned int addr , byte data )
{ EEPROM.write(addr, data);
}

<< to: >>
#include <DueFlashStorage.h>
DueFlashStorage dueFlashStorage;
byte iLogic_eeprom_read_byte(unsigned int addr)
{    return dueFlashStorage.read(addr);
}
void iLogic_eeprom_write_byte( unsigned int addr , byte data )
{   dueFlashStorage.write(addr,data);
}

  • Complete the uppers,  you can use flash to storage,  please carefully  SetDValue , and SetDAValue do not be set too many times in FUNCs. It will write data to flash.

How twicss of the business are ?

Hello world !!

twicss is  [iLogic Connective System Site in Taiwan], those connective method of proposal are from Middleware Projects.  Middlewares were definition  that to communicate EP iLogic in EULA. The business of Middleware is to sell after modified middleware or having Product Identification. Good job to you, make you job easily.

Middleware in Institute and in Company (Middleware_ICII),  must have Registered Middlewares.

Keep going on the way,  It wil be great !!

Have nice days and work friendly with iLogic.

Build up [Lib/Func] , knowledgement you design with LCOD [Layer Conception of Document].