CRC16 correctur by get Info (0x85)
authorTobias <tm@tm3d.de>
Tue, 29 Nov 2016 09:52:45 +0000 (10:52 +0100)
committerTobias <tm@tm3d.de>
Tue, 29 Nov 2016 09:52:45 +0000 (10:52 +0100)
12 files changed:
DS2423/DS2423.c
DS2423_BMP280/DS2423_BMP280.c
DS2423_komische platine/DS2423.c
DS2450/DS2450.c
DS2450/DS2450.cproj
DS2450_SHT2X_BMP280/DS2450_SHT2X_BMP280.c
DS2450_SHT2X_BMP280_MAX44009/DS2450_SHT2X_BMP280_MAX44009.c
DS2450_SHT2X_MAX44009/DS2450_SHT2X_MAX44009.c
DS2450_VOC_SHT_BMP/DS2450_VOC_SHT_BMP.c
common/OWRomFunctions.s
programmer/flash/flashp18_atmelice.bat
programmer/programmer/programmer.asmproj

index c545126..cdca3e4 100644 (file)
@@ -54,7 +54,7 @@
 extern void OWINIT();\r
 \r
 uint8_t owid[8]={0x1D, 0xA2, 0xD9, 0x84, 0x00, 0x26, 0x02, 0x5C};/**/\r
-uint8_t config_info[16]={0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[18]={9,13,9,13,9,13,9,13,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //+2 for CRC\r
 \r
        \r
 \r
index 8f0596e..d3aa7b4 100644 (file)
@@ -50,7 +50,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x1D, 0xA2, 0xD9, 0x84, 0x00, 0x26, 0x02, 0x5C};/**/\r
-uint8_t config_info[16]={0x09,0x0D,0x09,0x0D,0x01,0x08,0x02,0x08,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[18]={0x09,0x0D,0x09,0x0D,0x01,0x08,0x02,0x08,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
        \r
 \r
index 2cf20e3..b1c6332 100644 (file)
@@ -45,7 +45,7 @@
 extern void OWINIT();\r
 \r
 uint8_t owid[8]={0x1D, 0xA2, 0xD9, 0x84, 0x00, 0x26, 0x02, 0x5C};/**/\r
-uint8_t config_info[16]={0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[18]={0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
        \r
 \r
index cf4e588..6a89067 100644 (file)
@@ -43,7 +43,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/\r
-uint8_t config_info[16]={0x06,0x09,0x06,0x09,0x06,0x09,0x06,0x09,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[18]={0x06,0x09,0x06,0x09,0x06,0x09,0x06,0x09,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index a79f289..856184d 100644 (file)
@@ -44,7 +44,7 @@
   <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
     <ToolchainSettings>\r
       <AvrGcc>\r
-  <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+  <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
   <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
   <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
   <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
@@ -59,7 +59,7 @@
   </avrgcc.compiler.symbols.DefSymbols>\r
   <avrgcc.compiler.directories.IncludePaths>\r
     <ListValues>\r
-      <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>\r
+      <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
     </ListValues>\r
   </avrgcc.compiler.directories.IncludePaths>\r
   <avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>\r
       <Value>libm</Value>\r
     </ListValues>\r
   </avrgcc.linker.libraries.Libraries>\r
+  <avrgcc.assembler.general.IncludePaths>\r
+    <ListValues>\r
+      <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+    </ListValues>\r
+  </avrgcc.assembler.general.IncludePaths>\r
 </AvrGcc>\r
     </ToolchainSettings>\r
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
     <ToolchainSettings>\r
       <AvrGcc>\r
-  <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+  <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
   <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
   <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
   <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
@@ -92,7 +97,7 @@
   </avrgcc.compiler.symbols.DefSymbols>\r
   <avrgcc.compiler.directories.IncludePaths>\r
     <ListValues>\r
-      <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>\r
+      <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
     </ListValues>\r
   </avrgcc.compiler.directories.IncludePaths>\r
   <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
       <Value>libm</Value>\r
     </ListValues>\r
   </avrgcc.linker.libraries.Libraries>\r
+  <avrgcc.assembler.general.IncludePaths>\r
+    <ListValues>\r
+      <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+    </ListValues>\r
+  </avrgcc.assembler.general.IncludePaths>\r
   <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
 </AvrGcc>\r
     </ToolchainSettings>\r
index d641086..8b3678b 100644 (file)
@@ -45,7 +45,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/\r
-uint8_t config_info[16]={0x01,14,0x04,0x08,  0x06,0x09, 0x02,16,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[18]={0x01,14,0x04,0x08,  0x06,0x09, 0x02,16,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index 73cca74..842c9ea 100644 (file)
@@ -46,7 +46,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/\r
-uint8_t config_info[16]={0x01,14,0x04,0x08, 0x03,15, 0x02,16,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[18]={0x01,14,0x04,0x08, 0x03,15, 0x02,16,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index b321c96..e6f570a 100644 (file)
@@ -45,7 +45,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/\r
-uint8_t config_info[16]={0x01,14,0x04,0x08, 0x03,15, 0x06,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[18]={0x01,14,0x04,0x08, 0x03,15, 0x06,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index db77580..660dd28 100644 (file)
@@ -49,7 +49,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/\r
-uint8_t config_info[16]={0x01,14, 0x04,0x08, 0x08,1, 0x02,16,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[18]={0x01,14, 0x04,0x08, 0x08,1, 0x02,16,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index eac94b9..30731e7 100644 (file)
@@ -320,8 +320,6 @@ h_fwconfiginfo:
        cpi  r_bytep,17\r
        breq h_fwconfiginfo_all\r
 #elif defined _CRC16_\r
-       cpi  r_bytep,17\r
-       breq h_fwconfiginfo_crc2\r
        cpi  r_bytep,18\r
        breq h_fwconfiginfo_all\r
 #else\r
@@ -329,15 +327,23 @@ h_fwconfiginfo:
        breq h_fwconfiginfo_all\r
 #warning No CRC known code implemented\r
 #endif\r
+h_fwconfiginfo_end:\r
        configZ config_info,r_bytep\r
        ld   r_rwbyte,Z\r
        rjmp handle_end_inc\r
 h_fwconfiginfo_crc:\r
+#ifdef _CRC8_\r
        lds r_rwbyte,crc\r
        rjmp handle_end_inc\r
-h_fwconfiginfo_crc2:\r
-       lds r_rwbyte,crc+1\r
-       rjmp handle_end_inc\r
+#elif defined _CRC16_\r
+       lds r_temp,crc\r
+       com r_temp\r
+       sts config_info+16,r_temp\r
+       lds r_temp,crc+1\r
+       com r_temp\r
+       sts config_info+17,r_temp\r
+       rjmp h_fwconfiginfo_end\r
+#endif\r
 h_fwconfiginfo_all:\r
        rjmp handle_end_sleep\r
 \r
index 7c4150c..1ef4978 100644 (file)
@@ -1,2 +1,3 @@
 avrdude -c atmelice_isp -p t84 -U lfuse:w:0xE2:m -U hfuse:w:0xDE:m -U efuse:w:0xFE:m
-avrdude -c atmelice_isp -p t84 -e -U flash:w:"../programmer/Release/programmer.hex"
+avrdude -c atmelice_isp -p t84 -e -U flash:w:programmer.hex
+
index 519af5b..87b98d2 100644 (file)
@@ -34,7 +34,7 @@
         <documentation help="" />\r
         <offline-documentation help="" />\r
         <dependencies>\r
-          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.18.1" />\r
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.22.0" />\r
         </dependencies>\r
       </framework-data>\r
     </AsfFrameworkConfig>\r
           <IspClock>100000</IspClock>\r
           <DebugWireClockDiv>0</DebugWireClockDiv>\r
         </InterfaceProperties>\r
-        <InterfaceName>debugWIRE</InterfaceName>\r
+        <InterfaceName>\r
+        </InterfaceName>\r
       </ToolOptions>\r
       <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>\r
-      <ToolNumber>J41800000779</ToolNumber>\r
+      <ToolNumber>J41800000789</ToolNumber>\r
       <ToolName>Atmel-ICE</ToolName>\r
     </com_atmel_avrdbg_tool_atmelice>\r
-    <avrtoolinterface>debugWIRE</avrtoolinterface>\r
+    <avrtoolinterface>\r
+    </avrtoolinterface>\r
     <ExternalProgrammingToolCommand />\r
-    <avrtoolserialnumber>J41800000779</avrtoolserialnumber>\r
+    <avrtoolserialnumber>J41800000789</avrtoolserialnumber>\r
     <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>\r
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
@@ -63,6 +65,7 @@
           <ListValues>\r
             <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\avrasm\inc</Value>\r
             <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\avrasm\inc</Value>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\avrasm\inc</Value>\r
           </ListValues>\r
         </avrasm.assembler.general.AdditionalIncludeDirectories>\r
         <avrasm.assembler.general.IncludeFile>tn84adef.inc</avrasm.assembler.general.IncludeFile>\r
@@ -78,6 +81,7 @@
             <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\avrasm\inc</Value>\r
             <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\avrasm\inc</Value>\r
             <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\avrasm\inc</Value>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\avrasm\inc</Value>\r
           </ListValues>\r
         </avrasm.assembler.general.AdditionalIncludeDirectories>\r
         <avrasm.assembler.general.IncludeFile>tn84adef.inc</avrasm.assembler.general.IncludeFile>\r