Compare commits
18 Commits
master
...
HW06_prete
Author | SHA1 | Date | |
---|---|---|---|
597470f441 | |||
db3327a837 | |||
9fb7ead990 | |||
e9c908bf58 | |||
620fa10adf | |||
67a20eefe4 | |||
690ed35ab4 | |||
b50e4fb57f | |||
e6b7dbb4fc | |||
91f1853bf7 | |||
28f84645a5 | |||
44633402a2 | |||
350b7354cb | |||
ab7a8f1b16 | |||
e6bd2998c6 | |||
9c1f7d86dc | |||
cdd4f5074f | |||
7bfd32e0f8 |
20
.vscode/settings.json
vendored
20
.vscode/settings.json
vendored
@ -2,6 +2,24 @@
|
|||||||
"files.associations": {
|
"files.associations": {
|
||||||
"rte.h": "c",
|
"rte.h": "c",
|
||||||
"sysdiagdetect.h": "c",
|
"sysdiagdetect.h": "c",
|
||||||
"osekcom.h": "c"
|
"touch_example.h": "c"
|
||||||
|
},
|
||||||
|
"MicroPython.executeButton": [
|
||||||
|
{
|
||||||
|
"text": "▶",
|
||||||
|
"tooltip": "运行",
|
||||||
|
"alignment": "left",
|
||||||
|
"command": "extension.executeFile",
|
||||||
|
"priority": 3.5
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"MicroPython.syncButton": [
|
||||||
|
{
|
||||||
|
"text": "$(sync)",
|
||||||
|
"tooltip": "同步",
|
||||||
|
"alignment": "left",
|
||||||
|
"command": "extension.execute",
|
||||||
|
"priority": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
manifest_file_version: 1.0.0
|
manifest_file_version: 1.0.0
|
||||||
project: p417_SWTL
|
project: p417_SWTL
|
||||||
creation_date: 2024-07-03T23:36:01.607+08:00[Asia/Shanghai]
|
creation_date: 2024-12-02T14:09:42.018+08:00[Asia/Shanghai]
|
||||||
operating_system: Windows 10
|
operating_system: Windows 10
|
||||||
mcc_mode: IDE
|
mcc_mode: IDE
|
||||||
mcc_mode_version: v6.20
|
mcc_mode_version: v6.20
|
||||||
device_name: ATSAME51J19A
|
device_name: ATSAME51J19A
|
||||||
compiler: XC32 4.40
|
compiler: XC32 4.10
|
||||||
mcc_version: 5.5.1
|
mcc_version: 5.5.1
|
||||||
mcc_core_version: 5.7.1
|
mcc_core_version: 5.7.1
|
||||||
content_manager_version: 5.0.0
|
content_manager_version: 5.0.1
|
||||||
is_mcc_offline: false
|
is_mcc_offline: false
|
||||||
is_using_prerelease_versions: false
|
is_using_prerelease_versions: false
|
||||||
mcc_content_registries: https://registry.npmjs.org/
|
mcc_content_registries: https://registry.npmjs.org/
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
manifest_file_version: 1.0.0
|
manifest_file_version: 1.0.0
|
||||||
project: p417_SWTL
|
project: p417_SWTL
|
||||||
creation_date: 2024-07-03T23:36:01.335+08:00[Asia/Shanghai]
|
creation_date: 2024-12-02T14:05:58.700+08:00[Asia/Shanghai]
|
||||||
operating_system: Windows 10
|
operating_system: Windows 10
|
||||||
mcc_mode: IDE
|
mcc_mode: IDE
|
||||||
mcc_mode_version: v6.20
|
mcc_mode_version: v6.20
|
||||||
device_name: ATSAME51J19A
|
device_name: ATSAME51J19A
|
||||||
compiler: XC32 4.40
|
compiler: XC32 4.10
|
||||||
mcc_version: 5.5.1
|
mcc_version: 5.5.1
|
||||||
mcc_core_version: 5.7.1
|
mcc_core_version: 5.7.1
|
||||||
content_manager_version: 5.0.0
|
content_manager_version: 5.0.1
|
||||||
is_mcc_offline: false
|
is_mcc_offline: false
|
||||||
is_using_prerelease_versions: false
|
is_using_prerelease_versions: false
|
||||||
mcc_content_registries: https://registry.npmjs.org/
|
mcc_content_registries: https://registry.npmjs.org/
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
#
|
#
|
||||||
#Thu Jul 04 08:57:29 CST 2024
|
#Mon Dec 02 16:32:28 CST 2024
|
||||||
mcal.com-microchip-mplab-nbide-toolchain-xc32-XC32LanguageToolchain.md5=1eaf555a844840d91945cb14109201c3
|
mcal.com-microchip-mplab-nbide-toolchain-xc32-XC32LanguageToolchain.md5=1eaf555a844840d91945cb14109201c3
|
||||||
conf.ids=mcal
|
conf.ids=mcal
|
||||||
mcal.languagetoolchain.version=4.40
|
mcal.languagetoolchain.version=4.10
|
||||||
host.id=2546-oaqf-3d
|
host.id=124p-5vo2-40
|
||||||
configurations-xml=661120bd695433875151b59a1b61be69
|
configurations-xml=640df2878c10379dda3b63efc3e1be79
|
||||||
mcal.Pack.dfplocation=C\:\\Users\\sunbeam\\.mchp_packs\\Microchip\\SAME51_DFP\\3.5.104
|
mcal.Pack.dfplocation=E\:\\Program Files\\Microchip\\MPLABX\\v6.20\\packs\\Microchip\\SAME51_DFP\\3.7.242
|
||||||
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=f612087c95360c842296d189edfe3321
|
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=f612087c95360c842296d189edfe3321
|
||||||
proj.dir=F\:\\work\\P417\\20240702\\P417_SWTL\\firmware\\p417_SWTL.X
|
proj.dir=F\:\\FCB_project\\P417\\CODE\\20240727HW06\\P417_SWTL\\firmware\\p417_SWTL.X
|
||||||
mcal.platformTool.md5=null
|
mcal.platformTool.md5=null
|
||||||
mcal.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc32\\v4.40\\bin
|
mcal.languagetoolchain.dir=E\:\\Program Files\\Microchip\\xc32\\v4.10\\bin
|
||||||
host.platform=windows
|
host.platform=windows
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...
|
# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...
|
||||||
#
|
#
|
||||||
SHELL=cmd.exe
|
SHELL=cmd.exe
|
||||||
PATH_TO_IDE_BIN=E:/Program Files/Microchip/MPLABX/v6.00/mplab_platform/platform/../mplab_ide/modules/../../bin/
|
PATH_TO_IDE_BIN=E:/Program Files/Microchip/MPLABX/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/
|
||||||
# Adding MPLAB X bin directory to path.
|
# Adding MPLAB X bin directory to path.
|
||||||
PATH:=E:/Program Files/Microchip/MPLABX/v6.00/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH)
|
PATH:=E:/Program Files/Microchip/MPLABX/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH)
|
||||||
# Path to java used to run MPLAB X when this makefile was created
|
# Path to java used to run MPLAB X when this makefile was created
|
||||||
MP_JAVA_PATH="E:\Program Files\Microchip\MPLABX\v6.00\sys\java\zulu8.54.0.21-ca-fx-jre8.0.292-win_x64/bin/"
|
MP_JAVA_PATH="E:\Program Files\Microchip\MPLABX\v6.20\sys\java\zulu8.64.0.19-ca-fx-jre8.0.345-win_x64/bin/"
|
||||||
OS_CURRENT="$(shell uname -s)"
|
OS_CURRENT="$(shell uname -s)"
|
||||||
MP_CC="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-gcc.exe"
|
MP_CC="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-gcc.exe"
|
||||||
MP_CPPC="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-g++.exe"
|
MP_CPPC="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-g++.exe"
|
||||||
@ -27,13 +27,12 @@ MP_CPPC="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-g++.exe"
|
|||||||
MP_AS="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-as.exe"
|
MP_AS="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-as.exe"
|
||||||
MP_LD="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-ld.exe"
|
MP_LD="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-ld.exe"
|
||||||
MP_AR="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-ar.exe"
|
MP_AR="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-ar.exe"
|
||||||
DEP_GEN=${MP_JAVA_PATH}java -jar "E:/Program Files/Microchip/MPLABX/v6.00/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
|
DEP_GEN=${MP_JAVA_PATH}java -jar "E:/Program Files/Microchip/MPLABX/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
|
||||||
MP_CC_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
MP_CC_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
||||||
MP_CPPC_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
MP_CPPC_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
||||||
# MP_BC_DIR is not defined
|
# MP_BC_DIR is not defined
|
||||||
MP_AS_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
MP_AS_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
||||||
MP_LD_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
MP_LD_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
||||||
MP_AR_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
MP_AR_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
||||||
# MP_BC_DIR is not defined
|
DFP_DIR=E:/Program Files/Microchip/MPLABX/v6.20/packs/Microchip/SAME51_DFP/3.7.242
|
||||||
DFP_DIR=E:/Program Files/Microchip/MPLABX/v6.00/packs/Microchip/SAME51_DFP/3.5.104
|
CMSIS_DIR=C:/Users/dm01/.mchp_packs/ARM/CMSIS/5.8.0
|
||||||
CMSIS_DIR=E:/Program Files/Microchip/MPLABX/v6.00/packs/arm/CMSIS/5.4.0
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -497,8 +497,8 @@
|
|||||||
<platform>3</platform>
|
<platform>3</platform>
|
||||||
</toolsSet>
|
</toolsSet>
|
||||||
<packs>
|
<packs>
|
||||||
<pack name="SAME51_DFP" vendor="Microchip" version="3.5.104"/>
|
<pack name="SAME51_DFP" vendor="Microchip" version="3.7.242"/>
|
||||||
<pack name="CMSIS" vendor="ARM" version="5.4.0"/>
|
<pack name="CMSIS" vendor="ARM" version="5.8.0"/>
|
||||||
</packs>
|
</packs>
|
||||||
<ScriptingSettings>
|
<ScriptingSettings>
|
||||||
</ScriptingSettings>
|
</ScriptingSettings>
|
||||||
@ -558,6 +558,7 @@
|
|||||||
<C32>
|
<C32>
|
||||||
<property key="additional-warnings" value="false"/>
|
<property key="additional-warnings" value="false"/>
|
||||||
<property key="addresss-attribute-use" value="false"/>
|
<property key="addresss-attribute-use" value="false"/>
|
||||||
|
<property key="appendMe" value=""/>
|
||||||
<property key="enable-app-io" value="false"/>
|
<property key="enable-app-io" value="false"/>
|
||||||
<property key="enable-omit-frame-pointer" value="false"/>
|
<property key="enable-omit-frame-pointer" value="false"/>
|
||||||
<property key="enable-symbols" value="true"/>
|
<property key="enable-symbols" value="true"/>
|
||||||
@ -614,6 +615,7 @@
|
|||||||
<property key="additional-options-use-response-files" value="false"/>
|
<property key="additional-options-use-response-files" value="false"/>
|
||||||
<property key="additional-options-write-sla" value="false"/>
|
<property key="additional-options-write-sla" value="false"/>
|
||||||
<property key="allocate-dinit" value="false"/>
|
<property key="allocate-dinit" value="false"/>
|
||||||
|
<property key="appendMe" value=""/>
|
||||||
<property key="code-dinit" value="false"/>
|
<property key="code-dinit" value="false"/>
|
||||||
<property key="ebase-addr" value=""/>
|
<property key="ebase-addr" value=""/>
|
||||||
<property key="enable-check-sections" value="false"/>
|
<property key="enable-check-sections" value="false"/>
|
||||||
@ -653,6 +655,7 @@
|
|||||||
<C32CPP>
|
<C32CPP>
|
||||||
<property key="additional-warnings" value="false"/>
|
<property key="additional-warnings" value="false"/>
|
||||||
<property key="addresss-attribute-use" value="false"/>
|
<property key="addresss-attribute-use" value="false"/>
|
||||||
|
<property key="appendMe" value=""/>
|
||||||
<property key="check-new" value="false"/>
|
<property key="check-new" value="false"/>
|
||||||
<property key="eh-specs" value="true"/>
|
<property key="eh-specs" value="true"/>
|
||||||
<property key="enable-app-io" value="false"/>
|
<property key="enable-app-io" value="false"/>
|
||||||
@ -681,6 +684,7 @@
|
|||||||
<property key="use-indirect-calls" value="false"/>
|
<property key="use-indirect-calls" value="false"/>
|
||||||
</C32CPP>
|
</C32CPP>
|
||||||
<C32Global>
|
<C32Global>
|
||||||
|
<property key="appendMe" value=""/>
|
||||||
<property key="common-include-directories" value=""/>
|
<property key="common-include-directories" value=""/>
|
||||||
<property key="gp-relative-option" value=""/>
|
<property key="gp-relative-option" value=""/>
|
||||||
<property key="legacy-libc" value="false"/>
|
<property key="legacy-libc" value="false"/>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<cpp-extensions/>
|
<cpp-extensions/>
|
||||||
<header-extensions>h</header-extensions>
|
<header-extensions>h</header-extensions>
|
||||||
<asminc-extensions/>
|
<asminc-extensions/>
|
||||||
<sourceEncoding>ISO-8859-1</sourceEncoding>
|
<sourceEncoding>UTF-8</sourceEncoding>
|
||||||
<make-dep-projects/>
|
<make-dep-projects/>
|
||||||
<sourceRootList>
|
<sourceRootList>
|
||||||
<sourceRootElem>../src</sourceRootElem>
|
<sourceRootElem>../src</sourceRootElem>
|
||||||
|
@ -232,6 +232,17 @@
|
|||||||
</Values>
|
</Values>
|
||||||
</adc0>
|
</adc0>
|
||||||
</adc0>
|
</adc0>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<key class="com.microchip.mcc.core.tokenManager.CustomKey" moduleName="adc0" name="ADC_SAMPCTRL_SAMPLEN"/>
|
||||||
|
<value><?xml version="1.0" encoding="UTF-8"?><adc0>
|
||||||
|
<adc0 dnOrder="0" id="ADC_SAMPCTRL_SAMPLEN">
|
||||||
|
<Values dnOrder="0">
|
||||||
|
<User dnOrder="0" value="4"/>
|
||||||
|
</Values>
|
||||||
|
</adc0>
|
||||||
|
</adc0>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
@ -837,7 +848,7 @@
|
|||||||
<ElementPosition dnOrder="0" id="adc0" x="298" y="239"/>
|
<ElementPosition dnOrder="0" id="adc0" x="298" y="239"/>
|
||||||
<ElementPosition dnOrder="1" id="adc1" x="461" y="409"/>
|
<ElementPosition dnOrder="1" id="adc1" x="461" y="409"/>
|
||||||
<ElementPosition dnOrder="2" id="can1" x="20" y="213"/>
|
<ElementPosition dnOrder="2" id="can1" x="20" y="213"/>
|
||||||
<ElementPosition dnOrder="3" id="cmsis" x="660" y="20"/>
|
<ElementPosition dnOrder="3" id="cmsis" x="350" y="160"/>
|
||||||
<ElementPosition dnOrder="4" id="core" x="560" y="19"/>
|
<ElementPosition dnOrder="4" id="core" x="560" y="19"/>
|
||||||
<ElementPosition dnOrder="5" id="dac" x="25" y="335"/>
|
<ElementPosition dnOrder="5" id="dac" x="25" y="335"/>
|
||||||
<ElementPosition dnOrder="6" id="dfp" x="340" y="20"/>
|
<ElementPosition dnOrder="6" id="dfp" x="340" y="20"/>
|
||||||
@ -2781,7 +2792,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_10_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_10_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="Y2_SNS"/>
|
<User dnOrder="0" value="X2_SNS"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -2825,7 +2836,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_11_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_11_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="Y3_SNS"/>
|
<User dnOrder="0" value="X3_SNS"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -2869,7 +2880,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_12_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_12_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="BL_SNS2"/>
|
<User dnOrder="0" value="X4_SNS"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -2880,8 +2891,8 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_12_FUNCTION_TYPE">
|
<core dnOrder="0" id="PIN_12_FUNCTION_TYPE">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<Dynamic dnOrder="0" id="lib_qtouch" value=""/>
|
<Dynamic dnOrder="0" id="lib_qtouch" value="ADC0_AIN3/X2/Y2"/>
|
||||||
<User dnOrder="1" value="ADC1_AIN1"/>
|
<User dnOrder="1" value="ADC0_AIN3/X2/Y2"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -2914,7 +2925,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_13_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_13_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="Y5_SNS"/>
|
<User dnOrder="0" value="X5_SNS"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -3092,7 +3103,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_16_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_16_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="Y4_SNS"/>
|
<User dnOrder="0" value="BL_SNS2"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -3103,7 +3114,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_16_FUNCTION_TYPE">
|
<core dnOrder="0" id="PIN_16_FUNCTION_TYPE">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<Dynamic dnOrder="0" id="lib_qtouch" value="ADC0_AIN7/X5/Y5"/>
|
<Dynamic dnOrder="0" id="lib_qtouch" value=""/>
|
||||||
<User dnOrder="1" value="ADC0_AIN7/X5/Y5"/>
|
<User dnOrder="1" value="ADC0_AIN7/X5/Y5"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
@ -3871,7 +3882,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_35_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_35_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="X1_SNS"/>
|
<User dnOrder="0" value="Y1_SNS"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -3915,7 +3926,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_36_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_36_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="X2_SNS"/>
|
<User dnOrder="0" value="Y2_SNS"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -3959,7 +3970,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_37_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_37_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="X3_SNS"/>
|
<User dnOrder="0" value="Y3_SNS"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -4003,7 +4014,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_38_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_38_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="X4_SNS"/>
|
<User dnOrder="0" value="Y4_SNS"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -4114,7 +4125,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_41_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_41_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="X5_SNS"/>
|
<User dnOrder="0" value="Y5_SNS"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -4401,7 +4412,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_4_DIR">
|
<core dnOrder="0" id="PIN_4_DIR">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="Out"/>
|
<User dnOrder="0" value=""/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -4412,7 +4423,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_4_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_4_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="Power_AD_Ctrl"/>
|
<User dnOrder="0" value="BL_SNS1"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -4424,7 +4435,7 @@
|
|||||||
<core dnOrder="0" id="PIN_4_FUNCTION_TYPE">
|
<core dnOrder="0" id="PIN_4_FUNCTION_TYPE">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<Dynamic dnOrder="0" id="lib_qtouch" value=""/>
|
<Dynamic dnOrder="0" id="lib_qtouch" value=""/>
|
||||||
<User dnOrder="1" value="GPIO"/>
|
<User dnOrder="1" value="ADC0_AIN1/X0/Y0/VREFA"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -4446,7 +4457,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_4_MODE">
|
<core dnOrder="0" id="PIN_4_MODE">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value=""/>
|
<User dnOrder="0" value="ANALOG"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -4457,7 +4468,18 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_4_PERIPHERAL_FUNCTION">
|
<core dnOrder="0" id="PIN_4_PERIPHERAL_FUNCTION">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="GPIO"/>
|
<User dnOrder="0" value="B"/>
|
||||||
|
</Values>
|
||||||
|
</core>
|
||||||
|
</core>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<key class="com.microchip.mcc.core.tokenManager.CustomKey" moduleName="core" name="PIN_4_PULLEN"/>
|
||||||
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
|
<core dnOrder="0" id="PIN_4_PULLEN">
|
||||||
|
<Values dnOrder="0">
|
||||||
|
<User dnOrder="0" value=""/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -4871,6 +4893,17 @@
|
|||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<key class="com.microchip.mcc.core.tokenManager.CustomKey" moduleName="core" name="PIN_63_DRVSTR"/>
|
||||||
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
|
<core dnOrder="0" id="PIN_63_DRVSTR">
|
||||||
|
<Values dnOrder="0">
|
||||||
|
<User dnOrder="0" value="0"/>
|
||||||
|
</Values>
|
||||||
|
</core>
|
||||||
|
</core>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
@ -4878,7 +4911,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_63_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_63_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="Y1_SNS"/>
|
<User dnOrder="0" value="Power_AD_Ctrl"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -4889,8 +4922,8 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_63_FUNCTION_TYPE">
|
<core dnOrder="0" id="PIN_63_FUNCTION_TYPE">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<Dynamic dnOrder="0" id="lib_qtouch" value="ADC0_AIN14/X20/Y20"/>
|
<Dynamic dnOrder="0" id="lib_qtouch" value=""/>
|
||||||
<User dnOrder="1" value="ADC0_AIN14/X20/Y20"/>
|
<User dnOrder="1" value="GPIO"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -4912,7 +4945,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_63_MODE">
|
<core dnOrder="0" id="PIN_63_MODE">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="ANALOG"/>
|
<User dnOrder="0" value=""/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -4923,7 +4956,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_63_PERIPHERAL_FUNCTION">
|
<core dnOrder="0" id="PIN_63_PERIPHERAL_FUNCTION">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="B"/>
|
<User dnOrder="0" value="GPIO"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -5057,7 +5090,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_9_FUNCTION_NAME">
|
<core dnOrder="0" id="PIN_9_FUNCTION_NAME">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="BL_SNS1"/>
|
<User dnOrder="0" value="X1_SNS"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -5068,7 +5101,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PIN_9_FUNCTION_TYPE">
|
<core dnOrder="0" id="PIN_9_FUNCTION_TYPE">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<Dynamic dnOrder="0" id="lib_qtouch" value=""/>
|
<Dynamic dnOrder="0" id="lib_qtouch" value="ADC0_X24/Y24"/>
|
||||||
<User dnOrder="1" value="ADC1_AIN8"/>
|
<User dnOrder="1" value="ADC1_AIN8"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
@ -5113,7 +5146,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PORT_GROUP_0_DIR">
|
<core dnOrder="0" id="PORT_GROUP_0_DIR">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<Dynamic dnOrder="0" id="core" value="0x20024cc"/>
|
<Dynamic dnOrder="0" id="core" value="0x20024c4"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -5586,7 +5619,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PORT_GROUP_0_PINCFG3">
|
<core dnOrder="0" id="PORT_GROUP_0_PINCFG3">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<Dynamic dnOrder="0" id="core" value="0x0"/>
|
<Dynamic dnOrder="0" id="core" value="0x1"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -5938,7 +5971,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PORT_GROUP_0_PMUX1">
|
<core dnOrder="0" id="PORT_GROUP_0_PMUX1">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<Dynamic dnOrder="0" id="core" value="0x1"/>
|
<Dynamic dnOrder="0" id="core" value="0x11"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -6389,7 +6422,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PORT_GROUP_1_PINCFG2">
|
<core dnOrder="0" id="PORT_GROUP_1_PINCFG2">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<Dynamic dnOrder="0" id="core" value="0x1"/>
|
<Dynamic dnOrder="0" id="core" value="0x0"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -6741,7 +6774,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
<value><?xml version="1.0" encoding="UTF-8"?><core>
|
||||||
<core dnOrder="0" id="PORT_GROUP_1_PMUX1">
|
<core dnOrder="0" id="PORT_GROUP_1_PMUX1">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<Dynamic dnOrder="0" id="core" value="0x11"/>
|
<Dynamic dnOrder="0" id="core" value="0x10"/>
|
||||||
</Values>
|
</Values>
|
||||||
</core>
|
</core>
|
||||||
</core>
|
</core>
|
||||||
@ -8577,6 +8610,17 @@
|
|||||||
</Values>
|
</Values>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<key class="com.microchip.mcc.core.tokenManager.CustomKey" moduleName="lib_qtouch" name="DEF_CONTACT_THRESHOLD"/>
|
||||||
|
<value><?xml version="1.0" encoding="UTF-8"?><lib_qtouch>
|
||||||
|
<lib_qtouch dnOrder="0" id="DEF_CONTACT_THRESHOLD">
|
||||||
|
<Values dnOrder="0">
|
||||||
|
<User dnOrder="0" value="120"/>
|
||||||
|
</Values>
|
||||||
|
</lib_qtouch>
|
||||||
|
</lib_qtouch>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
@ -9919,6 +9963,17 @@
|
|||||||
</Values>
|
</Values>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<key class="com.microchip.mcc.core.tokenManager.CustomKey" moduleName="lib_qtouch" name="ENABLE_FREQ_HOP"/>
|
||||||
|
<value><?xml version="1.0" encoding="UTF-8"?><lib_qtouch>
|
||||||
|
<lib_qtouch dnOrder="0" id="ENABLE_FREQ_HOP">
|
||||||
|
<Values dnOrder="0">
|
||||||
|
<User dnOrder="0" value="true"/>
|
||||||
|
</Values>
|
||||||
|
</lib_qtouch>
|
||||||
|
</lib_qtouch>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
@ -9972,6 +10027,33 @@
|
|||||||
</Values>
|
</Values>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<key class="com.microchip.mcc.core.tokenManager.CustomKey" moduleName="lib_qtouch" name="FREQ_HOP_MENU"/>
|
||||||
|
<value><?xml version="1.0" encoding="UTF-8"?><lib_qtouch>
|
||||||
|
<lib_qtouch dnOrder="0" id="FREQ_HOP_MENU">
|
||||||
|
<Attributes dnOrder="0">
|
||||||
|
<Boolean dnOrder="0" id="enabled">
|
||||||
|
<Value dnOrder="0">true</Value>
|
||||||
|
</Boolean>
|
||||||
|
<Boolean dnOrder="1" id="visible">
|
||||||
|
<Value dnOrder="0">false</Value>
|
||||||
|
</Boolean>
|
||||||
|
</Attributes>
|
||||||
|
</lib_qtouch>
|
||||||
|
</lib_qtouch>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<key class="com.microchip.mcc.core.tokenManager.CustomKey" moduleName="lib_qtouch" name="FREQ_HOP_STEPS"/>
|
||||||
|
<value><?xml version="1.0" encoding="UTF-8"?><lib_qtouch>
|
||||||
|
<lib_qtouch dnOrder="0" id="FREQ_HOP_STEPS">
|
||||||
|
<Values dnOrder="0">
|
||||||
|
<User dnOrder="0" value="3"/>
|
||||||
|
</Values>
|
||||||
|
</lib_qtouch>
|
||||||
|
</lib_qtouch>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
@ -9990,7 +10072,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><lib_qtouch>
|
<value><?xml version="1.0" encoding="UTF-8"?><lib_qtouch>
|
||||||
<lib_qtouch dnOrder="0" id="FTL_Y_INFO">
|
<lib_qtouch dnOrder="0" id="FTL_Y_INFO">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<Dynamic dnOrder="0" id="lib_qtouch" value="Y(31),Y(15),Y(17),Y(20),Y(25),Y(1),Y(5),Y(3),Y(10),Y(11),Y(12),Y(13),Y(14),Y(30),Y(21),Y(16)"/>
|
<Dynamic dnOrder="0" id="lib_qtouch" value="Y(31),Y(15),Y(17),Y(24),Y(25),Y(1),Y(2),Y(3),Y(10),Y(11),Y(12),Y(13),Y(14),Y(30),Y(21),Y(16)"/>
|
||||||
</Values>
|
</Values>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
@ -10134,7 +10216,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><lib_qtouch>
|
<value><?xml version="1.0" encoding="UTF-8"?><lib_qtouch>
|
||||||
<lib_qtouch dnOrder="0" id="SELFCAP-INPUT_3">
|
<lib_qtouch dnOrder="0" id="SELFCAP-INPUT_3">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="20"/>
|
<User dnOrder="0" value="24"/>
|
||||||
</Values>
|
</Values>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
@ -10167,7 +10249,7 @@
|
|||||||
<value><?xml version="1.0" encoding="UTF-8"?><lib_qtouch>
|
<value><?xml version="1.0" encoding="UTF-8"?><lib_qtouch>
|
||||||
<lib_qtouch dnOrder="0" id="SELFCAP-INPUT_6">
|
<lib_qtouch dnOrder="0" id="SELFCAP-INPUT_6">
|
||||||
<Values dnOrder="0">
|
<Values dnOrder="0">
|
||||||
<User dnOrder="0" value="5"/>
|
<User dnOrder="0" value="2"/>
|
||||||
</Values>
|
</Values>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
@ -10639,6 +10721,32 @@
|
|||||||
</Attributes>
|
</Attributes>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
</lib_qtouch>
|
</lib_qtouch>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<key class="com.microchip.mcc.core.tokenManager.CustomKey" moduleName="lib_qtouch" name="TOUCH_HOP_HEADER"/>
|
||||||
|
<value><?xml version="1.0" encoding="UTF-8"?><lib_qtouch>
|
||||||
|
<lib_qtouch dnOrder="0" id="TOUCH_HOP_HEADER">
|
||||||
|
<Attributes dnOrder="0">
|
||||||
|
<Boolean dnOrder="0" id="enabled">
|
||||||
|
<Value dnOrder="0">true</Value>
|
||||||
|
</Boolean>
|
||||||
|
</Attributes>
|
||||||
|
</lib_qtouch>
|
||||||
|
</lib_qtouch>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<key class="com.microchip.mcc.core.tokenManager.CustomKey" moduleName="lib_qtouch" name="TOUCH_HOP_LIB"/>
|
||||||
|
<value><?xml version="1.0" encoding="UTF-8"?><lib_qtouch>
|
||||||
|
<lib_qtouch dnOrder="0" id="TOUCH_HOP_LIB">
|
||||||
|
<Attributes dnOrder="0">
|
||||||
|
<Boolean dnOrder="0" id="enabled">
|
||||||
|
<Value dnOrder="0">true</Value>
|
||||||
|
</Boolean>
|
||||||
|
</Attributes>
|
||||||
|
</lib_qtouch>
|
||||||
|
</lib_qtouch>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
@ -13219,7 +13327,7 @@
|
|||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<file>..\src\config\mcal\definitions.h</file>
|
<file>..\src\config\mcal\definitions.h</file>
|
||||||
<hash>9cbd3ca5ec4eb095b69f02d011146c57a203803096f631317e6ab43683793547</hash>
|
<hash>fbb6e3f66cce3d8e6c0ba0d7fdf03eec2bf658c523e64e50d327cb9dea68f5ae</hash>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<file>..\src\config\mcal\device.h</file>
|
<file>..\src\config\mcal\device.h</file>
|
||||||
@ -13239,7 +13347,7 @@
|
|||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<file>..\src\config\mcal\initialization.c</file>
|
<file>..\src\config\mcal\initialization.c</file>
|
||||||
<hash>634e2706c2ea11a8cf28f1c9edc5fe305ba038d5a2a10d330b8715ec068bc864</hash>
|
<hash>907ef22262941833932f90f3a4187fedb8c194d5d9507f3c1b4f8f805c1fcbbc</hash>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<file>..\src\config\mcal\interrupts.c</file>
|
<file>..\src\config\mcal\interrupts.c</file>
|
||||||
@ -13335,11 +13443,11 @@
|
|||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<file>..\src\config\mcal\peripheral\port\plib_port.c</file>
|
<file>..\src\config\mcal\peripheral\port\plib_port.c</file>
|
||||||
<hash>120b7e5a5e1a6f667bac3b28dd6f1611223cd5cf87f384de544524c4267344ba</hash>
|
<hash>8ddc969d7f4902c9705461674abbc8a00dc43760f1107a76b87cfadf8c57ebf4</hash>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<file>..\src\config\mcal\peripheral\port\plib_port.h</file>
|
<file>..\src\config\mcal\peripheral\port\plib_port.h</file>
|
||||||
<hash>a1ccf700df0e6b9bbb9f035703f6dfdc031e88ff2b3206b142a307a4102cb447</hash>
|
<hash>af63ef2161f2af6e8063f5b9b7932555f1246219c7f943e1b8b734705521fb08</hash>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<file>..\src\config\mcal\peripheral\rtc\plib_rtc.h</file>
|
<file>..\src\config\mcal\peripheral\rtc\plib_rtc.h</file>
|
||||||
@ -13431,7 +13539,7 @@
|
|||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<file>..\src\config\mcal\pin_configurations.csv</file>
|
<file>..\src\config\mcal\pin_configurations.csv</file>
|
||||||
<hash>f146f81526965692a225cf49d358da18c473bff9eb1c2820e1ab99739cecf113</hash>
|
<hash>a29e023a26a0fd86bf473152c2ea4e10c9ab330ff7266a9250b1b9b0dd6b5967</hash>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<file>..\src\config\mcal\startup_xc32.c</file>
|
<file>..\src\config\mcal\startup_xc32.c</file>
|
||||||
@ -13491,7 +13599,7 @@
|
|||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<file>..\src\config\mcal\touch\touch.h</file>
|
<file>..\src\config\mcal\touch\touch.h</file>
|
||||||
<hash>ba956590c9cc24ff3db22526e09459f0064f529b350eeda7213538d6fedf84f8</hash>
|
<hash>c7758b833a2dc1c2e4346a01cab61a1b806445aa9109f904f59f7d4b4a536972</hash>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<file>..\src\config\mcal\touch\touch_api_ptc.h</file>
|
<file>..\src\config\mcal\touch\touch_api_ptc.h</file>
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
#define GAC_ECU_SN_DEFAULT_VALUE {0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20}
|
#define GAC_ECU_SN_DEFAULT_VALUE {0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20}
|
||||||
#define GAC_APP_SW_LOGICAL_ID {}
|
#define GAC_APP_SW_LOGICAL_ID {}
|
||||||
#define GAC_BOOT_ID_DEFAULT_VALUE {'4','5','0'}
|
#define GAC_BOOT_ID_DEFAULT_VALUE {'4','5','0'}
|
||||||
#define GAC_ECUSW_VERSION_DEFAULT_VALUE {'S','W','0','3','0','3',' ',' ',' ',0x20,0x20,0x20,0x20,0x20,0x20,0x20}
|
#define GAC_ECUSW_VERSION_DEFAULT_VALUE {'S','W','0','4','0','1',' ',' ',' ',0x20,0x20,0x20,0x20,0x20,0x20,0x20}
|
||||||
#define GAC_APP_SUPPLIER_ID {0x46,0x49,0x43,0x4F,0x53,0x41,0x20,0x49,0x4E,0x54,0x45,0x52,0x4e};
|
#define GAC_APP_SUPPLIER_ID {0x46,0x49,0x43,0x4F,0x53,0x41,0x20,0x49,0x4E,0x54,0x45,0x52,0x4e};
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include "RTE.h"
|
#include "RTE.h"
|
||||||
#include "forcedetect.h"
|
#include "forcedetect.h"
|
||||||
#include "forceSnsr.h"
|
#include "forceSnsr.h"
|
||||||
|
#include "Speaker.h"
|
||||||
|
uint8 Touch_Sensor_Fault=0,Touch_Sensor_Fault_key1=0,Touch_Sensor_Fault_key2=0,Touch_Sensor_Fault_key3=0,Touch_Sensor_Fault_pad=0;
|
||||||
|
|
||||||
static uint8 Bat_Rng = 0;
|
static uint8 Bat_Rng = 0;
|
||||||
static void Battery_Volt_Diag_Task(void)
|
static void Battery_Volt_Diag_Task(void)
|
||||||
@ -76,56 +78,91 @@ static void Force_Sensor_Diag_Task(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Touch_Sensor_Sts00;
|
// Touch_Sensor_Sts00;
|
||||||
static uint8 Touch_Sensor_Fault = 0;
|
|
||||||
static void Touch_Sensor_Diag_Task(void)
|
static void Touch_Sensor_Diag_Task(void)
|
||||||
{
|
{
|
||||||
static uint16_t fault_count = 0, fault_count2 = 0;
|
static uint16_t fault_countk1 = 0,fault_countk2 = 0,fault_countk3 = 0, fault_countpad = 0;
|
||||||
//uint16 CurrentDiag_Press_signal;
|
//恢复
|
||||||
if (Touch_Sensor_delta00 < 200 && Touch_Sensor_delta01 < 200 && Touch_Sensor_delta02 < 200 && Touch_Sensor_delta13 < 200 && Touch_Sensor_delta14 < 200 && Touch_Sensor_delta15 < 200
|
if (Touch_Sensor_delta00 < 200 && Touch_Sensor_delta13 < 200)
|
||||||
&& Touch_Sensor_delta03 < 300 && Touch_Sensor_delta04 < 300 && Touch_Sensor_delta05 < 300 && Touch_Sensor_delta06 < 300 && Touch_Sensor_delta07 < 300
|
{
|
||||||
|
Touch_Sensor_Fault_key1 = Touch_NoFault;
|
||||||
|
fault_countk1 = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fault_countk1++;
|
||||||
|
if (fault_countk1 > 40)
|
||||||
|
{
|
||||||
|
fault_countk1 = 40;
|
||||||
|
Touch_Sensor_Fault_key1 = Touch_Out_Range;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//巡航
|
||||||
|
if (Touch_Sensor_delta01 < 200 && Touch_Sensor_delta14 < 200)
|
||||||
|
{
|
||||||
|
Touch_Sensor_Fault_key2 = Touch_NoFault;
|
||||||
|
fault_countk2 = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fault_countk2++;
|
||||||
|
if (fault_countk2 > 40)
|
||||||
|
{
|
||||||
|
fault_countk2 = 40;
|
||||||
|
Touch_Sensor_Fault_key2 = Touch_Out_Range;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//取消
|
||||||
|
if (Touch_Sensor_delta02 < 200 && Touch_Sensor_delta15 < 200)
|
||||||
|
{
|
||||||
|
Touch_Sensor_Fault_key3 = Touch_NoFault;
|
||||||
|
fault_countk3 = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fault_countk3++;
|
||||||
|
if (fault_countk3 > 40)
|
||||||
|
{
|
||||||
|
fault_countk3 = 40;
|
||||||
|
Touch_Sensor_Fault_key3 = Touch_Out_Range;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//PAD
|
||||||
|
if (Touch_Sensor_delta03 < 300 && Touch_Sensor_delta04 < 300 && Touch_Sensor_delta05 < 300 && Touch_Sensor_delta06 < 300 && Touch_Sensor_delta07 < 300
|
||||||
&& Touch_Sensor_delta08 < 300 && Touch_Sensor_delta09 < 300 && Touch_Sensor_delta10 < 300 && Touch_Sensor_delta11 < 300 && Touch_Sensor_delta12 < 300)
|
&& Touch_Sensor_delta08 < 300 && Touch_Sensor_delta09 < 300 && Touch_Sensor_delta10 < 300 && Touch_Sensor_delta11 < 300 && Touch_Sensor_delta12 < 300)
|
||||||
|
{
|
||||||
|
Touch_Sensor_Fault_pad = Touch_NoFault;
|
||||||
|
fault_countpad = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fault_countpad++;
|
||||||
|
if (fault_countpad > 40)
|
||||||
|
{
|
||||||
|
fault_countpad = 40;
|
||||||
|
Touch_Sensor_Fault_pad = Touch_Out_Range;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (Touch_Sensor_Fault_key1 == Touch_NoFault &&
|
||||||
|
Touch_Sensor_Fault_key2 == Touch_NoFault &&
|
||||||
|
Touch_Sensor_Fault_key3 == Touch_NoFault &&
|
||||||
|
Touch_Sensor_Fault_pad == Touch_NoFault )
|
||||||
{
|
{
|
||||||
Touch_Sensor_Fault = Touch_NoFault;
|
Touch_Sensor_Fault = Touch_NoFault;
|
||||||
InitMessage(SIG_DIAGCFAILRTOUCHPANSWTLTOUCHDFLTSTS, &Touch_Sensor_Fault);
|
InitMessage(SIG_DIAGCFAILRTOUCHPANSWTLTOUCHDFLTSTS, &Touch_Sensor_Fault);
|
||||||
fault_count = 0;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Touch_Sensor_Fault = Touch_Out_Range;
|
Touch_Sensor_Fault = Touch_Out_Range;
|
||||||
InitMessage(SIG_DIAGCFAILRTOUCHPANSWTLTOUCHDFLTSTS, &Touch_Sensor_Fault);
|
InitMessage(SIG_DIAGCFAILRTOUCHPANSWTLTOUCHDFLTSTS, &Touch_Sensor_Fault);
|
||||||
fault_count++;
|
|
||||||
if (fault_count > 200)
|
|
||||||
{
|
|
||||||
fault_count = 0;
|
|
||||||
//touch_init();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
CurrentDiag_Press_signal = Get_forcedetect_force_value();
|
|
||||||
if (CurrentDiag_Press_signal < 50)
|
|
||||||
{
|
|
||||||
if (Touch_Sensor_delta00 > 10 || Touch_Sensor_delta01 > 10 || Touch_Sensor_delta02 > 10 || Touch_Sensor_delta13 > 10 || Touch_Sensor_delta14 > 10 || Touch_Sensor_delta15 > 10
|
|
||||||
|| Touch_Sensor_delta03 > 20 || Touch_Sensor_delta04 > 20 || Touch_Sensor_delta05 > 20 || Touch_Sensor_delta06 > 20 || Touch_Sensor_delta07 > 20
|
|
||||||
|| Touch_Sensor_delta08 > 20 || Touch_Sensor_delta09 > 20 || Touch_Sensor_delta10 > 20 || Touch_Sensor_delta11 > 20 || Touch_Sensor_delta12 > 20)
|
|
||||||
{
|
|
||||||
fault_count2++;
|
|
||||||
if (fault_count2 > 200)
|
|
||||||
{
|
|
||||||
fault_count2 = 0;
|
|
||||||
//touch_init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fault_count2 = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fault_count2 = 0;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
extern uint8_t Allow_Touch_flag;//todo
|
extern uint8_t Allow_Touch_flag;//todo
|
||||||
static uint8 Vibra_Fault = 0;
|
static uint8 Vibra_Fault = 0;
|
||||||
@ -133,25 +170,8 @@ static void Vibration_Diag_Task(void)
|
|||||||
{
|
{
|
||||||
// AD_data=voltage * 4096/3.3V normal:0-0.01(15) short: 0.15(185)-0.36(448) 0.6(742)-0.7(870) 0.95(1177)-1.05(1305) 1.27(1575)-1.39(1727) open:1.55(1921) - 1.72(2136)
|
// AD_data=voltage * 4096/3.3V normal:0-0.01(15) short: 0.15(185)-0.36(448) 0.6(742)-0.7(870) 0.95(1177)-1.05(1305) 1.27(1575)-1.39(1727) open:1.55(1921) - 1.72(2136)
|
||||||
|
|
||||||
Vibra_Fault = Vibration_Normal;//todo Allow_Touch_flag
|
Vibra_Fault = Get_Speaker_Fault();//
|
||||||
InitMessage(SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS, &Vibra_Fault);
|
InitMessage(SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS, &Vibra_Fault);
|
||||||
/*
|
|
||||||
if(LD_AD_Val>=0 && LD_AD_Val<=15) //normal
|
|
||||||
{
|
|
||||||
Vibra_Fault = Vibration_Normal;
|
|
||||||
InitMessage(SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS, &Vibra_Fault);
|
|
||||||
}
|
|
||||||
else if((LD_AD_Val>=185 && LD_AD_Val<=448)||(LD_AD_Val>=742 && LD_AD_Val<=870)||(LD_AD_Val>=1177 && LD_AD_Val<=1305)||(LD_AD_Val>=1575 && LD_AD_Val<=1727))
|
|
||||||
{
|
|
||||||
Vibra_Fault = Vibration_Short;
|
|
||||||
InitMessage(SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS, &Vibra_Fault);
|
|
||||||
}
|
|
||||||
else if(LD_AD_Val>=1921 && LD_AD_Val<=2136)
|
|
||||||
{
|
|
||||||
Vibra_Fault = Vibration_open;
|
|
||||||
InitMessage(SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS, &Vibra_Fault);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sys_Diag_Detcet_Task(void)
|
void Sys_Diag_Detcet_Task(void)
|
||||||
|
@ -17,6 +17,7 @@ extern uint8 Force_Sens_Err;
|
|||||||
//extern uint8 Fuction_State ;
|
//extern uint8 Fuction_State ;
|
||||||
//extern uint8 Control_SDZ ;
|
//extern uint8 Control_SDZ ;
|
||||||
|
|
||||||
|
extern uint8 Touch_Sensor_Fault,Touch_Sensor_Fault_key1,Touch_Sensor_Fault_key2,Touch_Sensor_Fault_key3,Touch_Sensor_Fault_pad;
|
||||||
|
|
||||||
extern void Sys_Diag_Detcet_Task(void);
|
extern void Sys_Diag_Detcet_Task(void);
|
||||||
|
|
||||||
|
@ -223,6 +223,8 @@ typedef unsigned char UI_8;
|
|||||||
#define DID_PRESEE_SEN_SIGNAL ((UI_16)0x7021)
|
#define DID_PRESEE_SEN_SIGNAL ((UI_16)0x7021)
|
||||||
#define DID_PRESEE_SEN_PRE_VAL ((UI_16)0x7022)
|
#define DID_PRESEE_SEN_PRE_VAL ((UI_16)0x7022)
|
||||||
|
|
||||||
|
#define DID_RESET_SOURCE ((UI_16)0x7030)
|
||||||
|
|
||||||
/*--------------------------- Global variables ---------------------------- */
|
/*--------------------------- Global variables ---------------------------- */
|
||||||
//#pragma push
|
//#pragma push
|
||||||
|
|
||||||
|
@ -78,10 +78,10 @@ typedef struct{
|
|||||||
* Private variables
|
* Private variables
|
||||||
*/
|
*/
|
||||||
const UI_8 NVM_DID_CD_VIN[DLC_DID_CD_VIN] = GAC_VIN_DEFAULT_VALUE;
|
const UI_8 NVM_DID_CD_VIN[DLC_DID_CD_VIN] = GAC_VIN_DEFAULT_VALUE;
|
||||||
const UI_8 NVM_Reprogramming_Date_App[DLC_DID_REPROGRAMMING_DATE] = {0x20,0x24,0x07,0x22};
|
const UI_8 NVM_Reprogramming_Date_App[DLC_DID_REPROGRAMMING_DATE] = {0x20,0x24,0x12,0x02};
|
||||||
const UI_8 NVM_DID_CD_SUPPLIER_ID[DLC_SYSTEM_SUPPLIER_ID] = {'2','4','0','7','2','2'};
|
const UI_8 NVM_DID_CD_SUPPLIER_ID[DLC_SYSTEM_SUPPLIER_ID] = {'2','4','1','2','0','2'};
|
||||||
const UI_8 NVM_Repair_Shop_Code[DLC_REPAIR_SHOP_CODE] = GAC_ECU_REPAIR_SHOP_CODE;
|
const UI_8 NVM_Repair_Shop_Code[DLC_REPAIR_SHOP_CODE] = GAC_ECU_REPAIR_SHOP_CODE;
|
||||||
const UI_8 NVM_DID_CD_HW_VERSION[DLC_GAC_HW_VERSION] = {'H','W','0','5',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};
|
const UI_8 NVM_DID_CD_HW_VERSION[DLC_GAC_HW_VERSION] = {'H','W','0','6',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};
|
||||||
static uint8 RAM_DID_CD_VIN[DLC_DID_CD_VIN];
|
static uint8 RAM_DID_CD_VIN[DLC_DID_CD_VIN];
|
||||||
static uint8 RAM_DID_CD_REPROGRAMMING_DATE[DLC_DID_REPROGRAMMING_DATE];
|
static uint8 RAM_DID_CD_REPROGRAMMING_DATE[DLC_DID_REPROGRAMMING_DATE];
|
||||||
static uint8 RAM_DID_CD_SUPPLIER_ID[DLC_SYSTEM_SUPPLIER_ID];
|
static uint8 RAM_DID_CD_SUPPLIER_ID[DLC_SYSTEM_SUPPLIER_ID];
|
||||||
@ -570,6 +570,16 @@ t_UDS_ERR Get_DID_Pre_Value(uint8 *data)
|
|||||||
return ISO15765_3_POSITIVE_RESPONSE;
|
return ISO15765_3_POSITIVE_RESPONSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t_UDS_ERR Get_DID_ResetSource(uint8 *data)
|
||||||
|
{
|
||||||
|
uint8_t reset_source_buf[20];
|
||||||
|
SmartEE_Read(0x400,reset_source_buf,20);
|
||||||
|
|
||||||
|
memcpy(data,reset_source_buf,20);
|
||||||
|
|
||||||
|
return ISO15765_3_POSITIVE_RESPONSE;
|
||||||
|
}
|
||||||
|
|
||||||
t_UDS_ERR Get_DID_Reprogramming_Date(uint8 *data)
|
t_UDS_ERR Get_DID_Reprogramming_Date(uint8 *data)
|
||||||
{
|
{
|
||||||
//memcpy(data, RAM_DID_CD_REPROGRAMMING_DATE, sizeof(RAM_DID_CD_REPROGRAMMING_DATE));
|
//memcpy(data, RAM_DID_CD_REPROGRAMMING_DATE, sizeof(RAM_DID_CD_REPROGRAMMING_DATE));
|
||||||
@ -813,6 +823,7 @@ t_UDS_ERR Get_DID_GAC_Repair_Shop_Id(uint8 *data)
|
|||||||
{
|
{
|
||||||
//memcpy(data, RAM_DID_REPAIR_SHOP_CODE,DLC_REPAIR_SHOP_CODE);
|
//memcpy(data, RAM_DID_REPAIR_SHOP_CODE,DLC_REPAIR_SHOP_CODE);
|
||||||
SmartEE_Read(0x51B, data, 16);
|
SmartEE_Read(0x51B, data, 16);
|
||||||
|
|
||||||
return ISO15765_3_POSITIVE_RESPONSE;
|
return ISO15765_3_POSITIVE_RESPONSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,6 +218,7 @@ t_UDSReadDidSubCommands uds_did_read_commands[] =
|
|||||||
{ DID_PRESEE_SEN_BASELINE , 2, UDS_DEFAULT_SESSION, Get_DID_PressSen_Baseline },
|
{ DID_PRESEE_SEN_BASELINE , 2, UDS_DEFAULT_SESSION, Get_DID_PressSen_Baseline },
|
||||||
{ DID_PRESEE_SEN_SIGNAL , 2, UDS_DEFAULT_SESSION, Get_DID_PressSen_Signal },
|
{ DID_PRESEE_SEN_SIGNAL , 2, UDS_DEFAULT_SESSION, Get_DID_PressSen_Signal },
|
||||||
{ DID_PRESEE_SEN_PRE_VAL , 2, UDS_DEFAULT_SESSION, Get_DID_Pre_Value },
|
{ DID_PRESEE_SEN_PRE_VAL , 2, UDS_DEFAULT_SESSION, Get_DID_Pre_Value },
|
||||||
|
{DID_RESET_SOURCE , 20, UDS_DEFAULT_SESSION , Get_DID_ResetSource },
|
||||||
|
|
||||||
|
|
||||||
{DID_FUN1, 2, UDS_DEFAULT_SESSION, Get_DID_Fun1},
|
{DID_FUN1, 2, UDS_DEFAULT_SESSION, Get_DID_Fun1},
|
||||||
|
@ -159,6 +159,7 @@ t_UDS_ERR Get_DID_TouchSen13_Signal(uint8 *data);
|
|||||||
t_UDS_ERR Get_DID_PressSen_Baseline(uint8 *data);
|
t_UDS_ERR Get_DID_PressSen_Baseline(uint8 *data);
|
||||||
t_UDS_ERR Get_DID_PressSen_Signal(uint8 *data);
|
t_UDS_ERR Get_DID_PressSen_Signal(uint8 *data);
|
||||||
t_UDS_ERR Get_DID_Pre_Value(uint8 *data);
|
t_UDS_ERR Get_DID_Pre_Value(uint8 *data);
|
||||||
|
t_UDS_ERR Get_DID_ResetSource(uint8 *data);
|
||||||
|
|
||||||
t_UDS_ERR Get_DID_CD_SYSID_CALIRATION_DATE(uint8 *data);
|
t_UDS_ERR Get_DID_CD_SYSID_CALIRATION_DATE(uint8 *data);
|
||||||
t_UDS_ERR Set_DID_CD_CALIRATION_DATE(uint8 *data);
|
t_UDS_ERR Set_DID_CD_CALIRATION_DATE(uint8 *data);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "FunctionState.h"
|
#include "FunctionState.h"
|
||||||
#include "plib_port.h"
|
#include "plib_port.h"
|
||||||
#include "plib_adc1.h"
|
#include "plib_adc1.h"
|
||||||
|
#include "OsekCom.h"
|
||||||
|
|
||||||
extern uint16 adc[2] ;
|
extern uint16 adc[2] ;
|
||||||
uint8 Fuction_State = 1 ;
|
uint8 Fuction_State = 1 ;
|
||||||
@ -23,11 +24,12 @@ void FunctionState_Task(void)
|
|||||||
{
|
{
|
||||||
ADC1_Initialize();
|
ADC1_Initialize();
|
||||||
ADC1_Enable();
|
ADC1_Enable();
|
||||||
ADC1_ChannelSelect(ADC_POSINPUT_AIN6, ADC_NEGINPUT_GND);
|
//ADC1_ChannelSelect(ADC_POSINPUT_AIN7, ADC_NEGINPUT_GND);
|
||||||
ADC1_ConversionStart();
|
ADC1_ConversionStart();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//InitMessage(SIG_SWTLSENSOR1_BASELINE, &adc[0]);
|
||||||
LD_AD_Val = adc[1];
|
LD_AD_Val = adc[1];
|
||||||
|
|
||||||
switch(Fuction_State)
|
switch(Fuction_State)
|
||||||
|
@ -135,12 +135,10 @@
|
|||||||
#define RST_FLAG_TX_REQ_FRM_SWTLSENSORFR08() (flag_swtl_com_tx_req1 &= ((uint8_t)0xBF))
|
#define RST_FLAG_TX_REQ_FRM_SWTLSENSORFR08() (flag_swtl_com_tx_req1 &= ((uint8_t)0xBF))
|
||||||
#define TST_FLAG_TX_REQ_FRM_SWTLSENSORFR08() ((flag_swtl_com_tx_req1 & ((uint8_t)0x40)) == ((uint8_t)0x40))
|
#define TST_FLAG_TX_REQ_FRM_SWTLSENSORFR08() ((flag_swtl_com_tx_req1 & ((uint8_t)0x40)) == ((uint8_t)0x40))
|
||||||
|
|
||||||
|
|
||||||
#define SET_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL() (flag_swtl_com_tx_req1 |= ((UI_8)0x80))
|
#define SET_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL() (flag_swtl_com_tx_req1 |= ((UI_8)0x80))
|
||||||
#define RST_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL() (flag_swtl_com_tx_req1 &= ((UI_8)0x7F))
|
#define RST_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL() (flag_swtl_com_tx_req1 &= ((UI_8)0x7F))
|
||||||
#define TST_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL() ((flag_swtl_com_tx_req1 & ((UI_8)0x80)) == ((UI_8)0x80))
|
#define TST_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL() ((flag_swtl_com_tx_req1 & ((UI_8)0x80)) == ((UI_8)0x80))
|
||||||
|
|
||||||
|
|
||||||
/* Cancel value to cancel a timer */
|
/* Cancel value to cancel a timer */
|
||||||
#define TIMER_CANCEL ((uint16_t)0xFFFF)
|
#define TIMER_CANCEL ((uint16_t)0xFFFF)
|
||||||
|
|
||||||
@ -152,7 +150,7 @@
|
|||||||
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR04 ((uint32_t)(0))
|
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR04 ((uint32_t)(0))
|
||||||
#define PT_TX_FRM_SWTLPRIVATEDHUCANFR04 ((uint32_t)(400))
|
#define PT_TX_FRM_SWTLPRIVATEDHUCANFR04 ((uint32_t)(400))
|
||||||
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR03 ((uint32_t)(0))
|
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR03 ((uint32_t)(0))
|
||||||
#define PT_TX_FRM_SWTLPRIVATEDHUCANFR03 ((uint32_t) (100))
|
#define PT_TX_FRM_SWTLPRIVATEDHUCANFR03 ((uint32_t)(400))
|
||||||
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR02 ((uint32_t)(0))
|
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR02 ((uint32_t)(0))
|
||||||
#define PT_TX_FRM_SWTLPRIVATEDHUCANFR02 ((uint32_t)(100))
|
#define PT_TX_FRM_SWTLPRIVATEDHUCANFR02 ((uint32_t)(100))
|
||||||
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR01 ((uint32_t)(0))
|
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR01 ((uint32_t)(0))
|
||||||
@ -253,7 +251,6 @@
|
|||||||
#define RST_FLAG_OSEK_COM_PER_TX() (flag_st_mode &= ((uint8_t)0xDF))
|
#define RST_FLAG_OSEK_COM_PER_TX() (flag_st_mode &= ((uint8_t)0xDF))
|
||||||
#define TST_FLAG_OSEK_COM_PER_TX() ((flag_st_mode & ((uint8_t)0x20)) == ((uint8_t)0x20))
|
#define TST_FLAG_OSEK_COM_PER_TX() ((flag_st_mode & ((uint8_t)0x20)) == ((uint8_t)0x20))
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------- Data Types ------------------------------- */
|
/* ------------------------------- Data Types ------------------------------- */
|
||||||
|
|
||||||
/* Type to allocate data structure for managed signals */
|
/* Type to allocate data structure for managed signals */
|
||||||
@ -304,6 +301,10 @@ static uint8_t frm_swtlsensorfr05[MAX_LEN_FRM_SWTLSENSORFR05];
|
|||||||
static uint8_t frm_swtlsensorfr06[MAX_LEN_FRM_SWTLSENSORFR06];
|
static uint8_t frm_swtlsensorfr06[MAX_LEN_FRM_SWTLSENSORFR06];
|
||||||
static uint8_t frm_swtlsensorfr07[MAX_LEN_FRM_SWTLSENSORFR07];
|
static uint8_t frm_swtlsensorfr07[MAX_LEN_FRM_SWTLSENSORFR07];
|
||||||
static uint8_t frm_swtlsensorfr08[MAX_LEN_FRM_SWTLSENSORFR08];
|
static uint8_t frm_swtlsensorfr08[MAX_LEN_FRM_SWTLSENSORFR08];
|
||||||
|
static uint8_t frm_swtlsensorfr09[8];
|
||||||
|
static uint8_t frm_swtlsensorfr0A[8];
|
||||||
|
static uint8_t frm_swtlsensorfr0B[8];
|
||||||
|
static uint8_t frm_swtlsensorfr0C[8];
|
||||||
UI_8 frm_diag_physresp_swtl[MAX_LEN_FRM_DIAG_PHYSRESP_SWTL];
|
UI_8 frm_diag_physresp_swtl[MAX_LEN_FRM_DIAG_PHYSRESP_SWTL];
|
||||||
static UI_8 len_frm_diag_physresp_swtl;
|
static UI_8 len_frm_diag_physresp_swtl;
|
||||||
/* Tx request flags declaration */
|
/* Tx request flags declaration */
|
||||||
@ -346,8 +347,6 @@ uint8_t flag_rx0;
|
|||||||
/* Declaration of timer diff between last tick and current tick */
|
/* Declaration of timer diff between last tick and current tick */
|
||||||
static uint32_t time_diff;
|
static uint32_t time_diff;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* --------------------------- Routine Prototypes --------------------------- */
|
/* --------------------------- Routine Prototypes --------------------------- */
|
||||||
static void OsekComPeriodicTx(void);
|
static void OsekComPeriodicTx(void);
|
||||||
static void OsekComDeadlineMonitRx(void);
|
static void OsekComDeadlineMonitRx(void);
|
||||||
@ -375,75 +374,92 @@ void OsekComRxNotifCallbackSWTL(t_com_buf_hdl bhdl)
|
|||||||
uint32_t buf_idtp = CanBufQueryIdTp();
|
uint32_t buf_idtp = CanBufQueryIdTp();
|
||||||
uint8_t frm_len = 8;
|
uint8_t frm_len = 8;
|
||||||
|
|
||||||
if (TST_FLAG_OSEK_COM_INIT()) {
|
if (TST_FLAG_OSEK_COM_INIT())
|
||||||
|
{
|
||||||
/* Rx Com frames with static ID */
|
/* Rx Com frames with static ID */
|
||||||
switch (buf_idtp) {
|
switch (buf_idtp)
|
||||||
|
{
|
||||||
case ID_TP_FRM_IHUPRIVATEDHUCANFR01:
|
case ID_TP_FRM_IHUPRIVATEDHUCANFR01:
|
||||||
/* Test of the minimum Rx frames length required to decode the signal */
|
/* Test of the minimum Rx frames length required to decode the signal */
|
||||||
if (frm_len >= MIN_LEN_FRM_SIG_TWLIBRISTS_UB) {
|
if (frm_len >= MIN_LEN_FRM_SIG_TWLIBRISTS_UB)
|
||||||
|
{
|
||||||
/* Decoding of signal sig_TwliBriSts_UB */
|
/* Decoding of signal sig_TwliBriSts_UB */
|
||||||
sig_twlibrists_ub[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 2)) >> ((uint8_t)7));
|
sig_twlibrists_ub[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 2)) >> ((uint8_t)7));
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test of the minimum Rx frames length required to decode the signal */
|
/* Test of the minimum Rx frames length required to decode the signal */
|
||||||
if (frm_len >= MIN_LEN_FRM_SIG_TWLIBRISTS) {
|
if (frm_len >= MIN_LEN_FRM_SIG_TWLIBRISTS)
|
||||||
|
{
|
||||||
/* Decoding of signal sig_TwliBriSts */
|
/* Decoding of signal sig_TwliBriSts */
|
||||||
sig_twlibrists[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 2) & ((uint8_t)127)) >> ((uint8_t)6));
|
sig_twlibrists[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 2) & ((uint8_t)127)) >> ((uint8_t)6));
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test of the minimum Rx frames length required to decode the signal */
|
/* Test of the minimum Rx frames length required to decode the signal */
|
||||||
if (frm_len >= MIN_LEN_FRM_SIG_SWTOFKEYTONE_UB) {
|
if (frm_len >= MIN_LEN_FRM_SIG_SWTOFKEYTONE_UB)
|
||||||
|
{
|
||||||
/* Decoding of signal sig_SwtOfKeyTone_UB */
|
/* Decoding of signal sig_SwtOfKeyTone_UB */
|
||||||
sig_swtofkeytone_ub[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 0) & ((uint8_t)63)) >> ((uint8_t)5));
|
sig_swtofkeytone_ub[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 0) & ((uint8_t)63)) >> ((uint8_t)5));
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test of the minimum Rx frames length required to decode the signal */
|
/* Test of the minimum Rx frames length required to decode the signal */
|
||||||
if (frm_len >= MIN_LEN_FRM_SIG_SWTOFKEYTONE) {
|
if (frm_len >= MIN_LEN_FRM_SIG_SWTOFKEYTONE)
|
||||||
|
{
|
||||||
/* Decoding of signal sig_SwtOfKeyTone */
|
/* Decoding of signal sig_SwtOfKeyTone */
|
||||||
sig_swtofkeytone[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 0)) >> ((uint8_t)6));
|
sig_swtofkeytone[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 0)) >> ((uint8_t)6));
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test of the minimum Rx frames length required to decode the signal */
|
/* Test of the minimum Rx frames length required to decode the signal */
|
||||||
if (frm_len >= MIN_LEN_FRM_SIG_INTRBRISTS_UB) {
|
if (frm_len >= MIN_LEN_FRM_SIG_INTRBRISTS_UB)
|
||||||
|
{
|
||||||
/* Decoding of signal sig_IntrBriSts_UB */
|
/* Decoding of signal sig_IntrBriSts_UB */
|
||||||
sig_intrbrists_ub[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 0) & ((uint8_t)31)) >> ((uint8_t)4));
|
sig_intrbrists_ub[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 0) & ((uint8_t)31)) >> ((uint8_t)4));
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test of the minimum Rx frames length required to decode the signal */
|
/* Test of the minimum Rx frames length required to decode the signal */
|
||||||
if (frm_len >= MIN_LEN_FRM_SIG_INTRBRISTS) {
|
if (frm_len >= MIN_LEN_FRM_SIG_INTRBRISTS)
|
||||||
|
{
|
||||||
/* Decoding of signal sig_IntrBriSts */
|
/* Decoding of signal sig_IntrBriSts */
|
||||||
sig_intrbrists[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 0) & ((uint8_t)15)));
|
sig_intrbrists[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 0) & ((uint8_t)15)));
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test of the minimum Rx frames length required to decode the signal */
|
/* Test of the minimum Rx frames length required to decode the signal */
|
||||||
if (frm_len >= MIN_LEN_FRM_SIG_ACTVNOFSTEERWHLILLMN_UB) {
|
if (frm_len >= MIN_LEN_FRM_SIG_ACTVNOFSTEERWHLILLMN_UB)
|
||||||
|
{
|
||||||
/* Decoding of signal sig_ActvnOfSteerWhlIllmn_UB */
|
/* Decoding of signal sig_ActvnOfSteerWhlIllmn_UB */
|
||||||
sig_actvnofsteerwhlillmn_ub[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 5) & ((uint8_t)7)) >> ((uint8_t)2));
|
sig_actvnofsteerwhlillmn_ub[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl, 5) & ((uint8_t)7)) >> ((uint8_t)2));
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test of the minimum Rx frames length required to decode the signal */
|
/* Test of the minimum Rx frames length required to decode the signal */
|
||||||
if (frm_len >= MIN_LEN_FRM_SIG_ACTVNOFSTEERWHLILLMN) {
|
if (frm_len >= MIN_LEN_FRM_SIG_ACTVNOFSTEERWHLILLMN)
|
||||||
|
{
|
||||||
/* Reset of the deadline monitoring timer */
|
/* Reset of the deadline monitoring timer */
|
||||||
dmt_rx_sig_actvnofsteerwhlillmn = 0;
|
dmt_rx_sig_actvnofsteerwhlillmn = 0;
|
||||||
/* Decoding of signal sig_ActvnOfSteerWhlIllmn */
|
/* Decoding of signal sig_ActvnOfSteerWhlIllmn */
|
||||||
@ -451,7 +467,8 @@ void OsekComRxNotifCallbackSWTL(t_com_buf_hdl bhdl)
|
|||||||
/* Rx notification callback */
|
/* Rx notification callback */
|
||||||
IhuPrivateDHUCanFr01_CALLBACK();
|
IhuPrivateDHUCanFr01_CALLBACK();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,8 +476,8 @@ void OsekComRxNotifCallbackSWTL(t_com_buf_hdl bhdl)
|
|||||||
case ID_TP_FRM_DIAG_PHYSREQ_SWTL:
|
case ID_TP_FRM_DIAG_PHYSREQ_SWTL:
|
||||||
/* Test of the minimum Rx frames length required to decode the signal */
|
/* Test of the minimum Rx frames length required to decode the signal */
|
||||||
|
|
||||||
|
if (frm_len >= MIN_LEN_FRM_SIG_DIAGNOSTICREQSWTL)
|
||||||
if (frm_len >= MIN_LEN_FRM_SIG_DIAGNOSTICREQSWTL) {
|
{
|
||||||
/* Decoding of signal sig_DiagnosticReqSWTL */
|
/* Decoding of signal sig_DiagnosticReqSWTL */
|
||||||
sig_diagnosticreqswtl[0] = (CAN_BUF_QUERY_DATA_BYTE(bhdl, 0));
|
sig_diagnosticreqswtl[0] = (CAN_BUF_QUERY_DATA_BYTE(bhdl, 0));
|
||||||
sig_diagnosticreqswtl[1] = (CAN_BUF_QUERY_DATA_BYTE(bhdl, 1));
|
sig_diagnosticreqswtl[1] = (CAN_BUF_QUERY_DATA_BYTE(bhdl, 1));
|
||||||
@ -476,13 +493,15 @@ void OsekComRxNotifCallbackSWTL(t_com_buf_hdl bhdl)
|
|||||||
/* Set of the Rx notification flag */
|
/* Set of the Rx notification flag */
|
||||||
SET_FLAG_RX_SIG_DIAGNOSTICREQSWTL();
|
SET_FLAG_RX_SIG_DIAGNOSTICREQSWTL();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ID_TP_FRM_DIAG_FUNCREQ:
|
case ID_TP_FRM_DIAG_FUNCREQ:
|
||||||
/* Test of the minimum Rx frames length required to decode the signal */
|
/* Test of the minimum Rx frames length required to decode the signal */
|
||||||
if (frm_len >= MIN_LEN_FRM_SIG_DIAGNOSTICFUNCADDRREQ) {
|
if (frm_len >= MIN_LEN_FRM_SIG_DIAGNOSTICFUNCADDRREQ)
|
||||||
|
{
|
||||||
/* Decoding of signal sig_DiagnosticFuncAddrReq */
|
/* Decoding of signal sig_DiagnosticFuncAddrReq */
|
||||||
sig_diagnosticfuncaddrreq[0] = (CAN_BUF_QUERY_DATA_BYTE(bhdl, 0));
|
sig_diagnosticfuncaddrreq[0] = (CAN_BUF_QUERY_DATA_BYTE(bhdl, 0));
|
||||||
sig_diagnosticfuncaddrreq[1] = (CAN_BUF_QUERY_DATA_BYTE(bhdl, 1));
|
sig_diagnosticfuncaddrreq[1] = (CAN_BUF_QUERY_DATA_BYTE(bhdl, 1));
|
||||||
@ -497,7 +516,8 @@ void OsekComRxNotifCallbackSWTL(t_com_buf_hdl bhdl)
|
|||||||
/* Set of the Rx notification flag */
|
/* Set of the Rx notification flag */
|
||||||
SET_FLAG_RX_SIG_DIAGNOSTICFUNCADDRREQ();
|
SET_FLAG_RX_SIG_DIAGNOSTICFUNCADDRREQ();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -508,11 +528,13 @@ void OsekComRxNotifCallbackSWTL(t_com_buf_hdl bhdl)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
/* Com traffic flag */
|
/* Com traffic flag */
|
||||||
if ((com_traffic_swtl == COM_FALSE) && (aux_com_traffic == COM_TRUE)) {
|
if ((com_traffic_swtl == COM_FALSE) && (aux_com_traffic == COM_TRUE))
|
||||||
|
{
|
||||||
com_traffic_swtl = COM_TRUE;
|
com_traffic_swtl = COM_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -534,7 +556,8 @@ void CanTx(t_can_handler can_handler, bool notif, uint32_t idtp, uint16_t len, t
|
|||||||
bool OsekComTxReqCallbackSWTL(void)
|
bool OsekComTxReqCallbackSWTL(void)
|
||||||
{
|
{
|
||||||
/* Check of the Tx request flag */
|
/* Check of the Tx request flag */
|
||||||
if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR06()) {
|
if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR06())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlPrivateDHUCanFr06*/
|
/* Transmission of the frame SwtlPrivateDHUCanFr06*/
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -542,7 +565,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR06();
|
RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR06();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR01()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR01())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlPrivateDHUCanFr01 */
|
/* Transmission of the frame SwtlPrivateDHUCanFr01 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -550,7 +574,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR01();
|
RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR01();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR02()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR02())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlPrivateDHUCanFr02 */
|
/* Transmission of the frame SwtlPrivateDHUCanFr02 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -558,7 +583,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR02();
|
RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR02();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR03()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR03())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlPrivateDHUCanFr03 */
|
/* Transmission of the frame SwtlPrivateDHUCanFr03 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -566,7 +592,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR03();
|
RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR03();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR04()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR04())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlPrivateDHUCanFr04 */
|
/* Transmission of the frame SwtlPrivateDHUCanFr04 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -574,7 +601,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR04();
|
RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR04();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR05()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR05())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlPrivateDHUCanFr05 */
|
/* Transmission of the frame SwtlPrivateDHUCanFr05 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -582,7 +610,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR05();
|
RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR05();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLPRESSFR01()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLPRESSFR01())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlPressFr01 */
|
/* Transmission of the frame SwtlPressFr01 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -591,7 +620,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLPRESSFR01();
|
RST_FLAG_TX_REQ_FRM_SWTLPRESSFR01();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR01()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR01())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlSensorFr01 */
|
/* Transmission of the frame SwtlSensorFr01 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -600,7 +630,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR01();
|
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR01();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR02()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR02())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlSensorFr02 */
|
/* Transmission of the frame SwtlSensorFr02 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -609,7 +640,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR02();
|
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR02();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR03()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR03())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlSensorFr03 */
|
/* Transmission of the frame SwtlSensorFr03 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -618,7 +650,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR03();
|
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR03();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR04()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR04())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlSensorFr04 */
|
/* Transmission of the frame SwtlSensorFr04 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -627,7 +660,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR04();
|
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR04();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR05()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR05())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlSensorFr05 */
|
/* Transmission of the frame SwtlSensorFr05 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -636,7 +670,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR05();
|
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR05();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR06()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR06())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlSensorFr06 */
|
/* Transmission of the frame SwtlSensorFr06 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -645,7 +680,8 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR06();
|
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR06();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR07()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR07())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlSensorFr07 */
|
/* Transmission of the frame SwtlSensorFr07 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
@ -654,12 +690,19 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR07();
|
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR07();
|
||||||
}
|
}
|
||||||
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR08()) {
|
else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR08())
|
||||||
|
{
|
||||||
/* Transmission of the frame SwtlSensorFr08 */
|
/* Transmission of the frame SwtlSensorFr08 */
|
||||||
if (Fuction_State != Function_State_C)
|
if (Fuction_State != Function_State_C)
|
||||||
{
|
{
|
||||||
if (Test_frame_On == 1)
|
if (Test_frame_On == 1)
|
||||||
|
{
|
||||||
CanTx(0, true, ID_TP_FRM_SWTLSENSORFR08, MAX_LEN_FRM_SWTLSENSORFR08, frm_swtlsensorfr08);
|
CanTx(0, true, ID_TP_FRM_SWTLSENSORFR08, MAX_LEN_FRM_SWTLSENSORFR08, frm_swtlsensorfr08);
|
||||||
|
CanTx(0, true, 0x409, 8, frm_swtlsensorfr09);
|
||||||
|
CanTx(0, true, 0x40A, 8, frm_swtlsensorfr0A);
|
||||||
|
CanTx(0, true, 0x40B, 8, frm_swtlsensorfr0B);
|
||||||
|
CanTx(0, true, 0x40C, 8, frm_swtlsensorfr0C);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR08();
|
RST_FLAG_TX_REQ_FRM_SWTLSENSORFR08();
|
||||||
}
|
}
|
||||||
@ -669,14 +712,47 @@ bool OsekComTxReqCallbackSWTL(void)
|
|||||||
CanTx(0, true, ID_TP_FRM_DIAG_PHYSRESP_SWTL, MAX_LEN_FRM_DIAG_PHYSRESP_SWTL, frm_diag_physresp_swtl);
|
CanTx(0, true, ID_TP_FRM_DIAG_PHYSRESP_SWTL, MAX_LEN_FRM_DIAG_PHYSRESP_SWTL, frm_diag_physresp_swtl);
|
||||||
RST_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL();
|
RST_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* return checking pending transmissions */
|
/* return checking pending transmissions */
|
||||||
return (((flag_swtl_com_tx_req0 != 0) || (flag_swtl_com_tx_req1 != 0)) ? true : false);
|
return (((flag_swtl_com_tx_req0 != 0) || (flag_swtl_com_tx_req1 != 0)) ? true : false);
|
||||||
}
|
}
|
||||||
|
void OsekComSetFR09data(uint8_t data[])
|
||||||
|
{
|
||||||
|
uint8_t i;
|
||||||
|
for (i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
frm_swtlsensorfr09[i] = data[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
void OsekComSetFR0Adata(uint8_t data[])
|
||||||
|
{
|
||||||
|
uint8_t i;
|
||||||
|
for (i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
frm_swtlsensorfr0A[i] = data[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void OsekComSetFR0Bdata(uint8_t data[])
|
||||||
|
{
|
||||||
|
uint8_t i;
|
||||||
|
for (i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
frm_swtlsensorfr0B[i] = data[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void OsekComSetFR0Cdata(uint8_t data[])
|
||||||
|
{
|
||||||
|
uint8_t i;
|
||||||
|
for (i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
frm_swtlsensorfr0C[i] = data[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
uint32_t CanBufQueryIdTp_Tx(void);
|
uint32_t CanBufQueryIdTp_Tx(void);
|
||||||
/*---------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------
|
||||||
| Portability: Target platform independent
|
| Portability: Target platform independent
|
||||||
@ -695,7 +771,8 @@ void OsekComTxNotifCallbackSWTL(t_com_buf_hdl bhdl)
|
|||||||
uint32_t buf_idtp = CanBufQueryIdTp();
|
uint32_t buf_idtp = CanBufQueryIdTp();
|
||||||
buf_idtp = ID_TP_FRM_DIAG_PHYSREQ_SWTL;
|
buf_idtp = ID_TP_FRM_DIAG_PHYSREQ_SWTL;
|
||||||
|
|
||||||
switch (buf_idtp) {
|
switch (buf_idtp)
|
||||||
|
{
|
||||||
// case ID_TP_FRM_SWTLPRIVATEDHUCANFR01:
|
// case ID_TP_FRM_SWTLPRIVATEDHUCANFR01:
|
||||||
/* Set of Tx the notification flag */
|
/* Set of Tx the notification flag */
|
||||||
// SET_FLAG_TX_SIG_STEERWHLTOUCHBDLETOUCHPOSNY();
|
// SET_FLAG_TX_SIG_STEERWHLTOUCHBDLETOUCHPOSNY();
|
||||||
@ -865,7 +942,8 @@ t_status_type StartCom(t_com_application_mode_type app_mode)
|
|||||||
/* Get current timer tick */
|
/* Get current timer tick */
|
||||||
|
|
||||||
/* Buffer initialization */
|
/* Buffer initialization */
|
||||||
for(ind=0; ind < (uint16_t)8; ind++){
|
for (ind = 0; ind < (uint16_t)8; ind++)
|
||||||
|
{
|
||||||
aux[ind] = (uint8_t)0;
|
aux[ind] = (uint8_t)0;
|
||||||
}
|
}
|
||||||
/* Register of the COM mode */
|
/* Register of the COM mode */
|
||||||
@ -875,12 +953,12 @@ t_status_type StartCom(t_com_application_mode_type app_mode)
|
|||||||
SET_FLAG_OSEK_COM_INIT();
|
SET_FLAG_OSEK_COM_INIT();
|
||||||
|
|
||||||
/* Signals initialization to zero */
|
/* Signals initialization to zero */
|
||||||
for(ind=(uint16_t)0;ind<LAST_OSEK_COM_SIGNAL_SYMBOLIC_NAME;ind++){
|
for (ind = (uint16_t)0; ind < LAST_OSEK_COM_SIGNAL_SYMBOLIC_NAME; ind++)
|
||||||
|
{
|
||||||
(void)InitMessage(ind, aux_ref);
|
(void)InitMessage(ind, aux_ref);
|
||||||
}
|
}
|
||||||
/* Signals initialization to a specific value */
|
/* Signals initialization to a specific value */
|
||||||
|
|
||||||
|
|
||||||
/* Initialization of the Tx request flags */
|
/* Initialization of the Tx request flags */
|
||||||
flag_swtl_com_tx_req0 = (uint8_t)0;
|
flag_swtl_com_tx_req0 = (uint8_t)0;
|
||||||
flag_swtl_com_tx_req1 = (uint8_t)0;
|
flag_swtl_com_tx_req1 = (uint8_t)0;
|
||||||
@ -959,7 +1037,8 @@ t_status_type StartPeriodic(void)
|
|||||||
{
|
{
|
||||||
t_status_type status = E_OK;
|
t_status_type status = E_OK;
|
||||||
|
|
||||||
if (TST_FLAG_OSEK_COM_INIT()) {
|
if (TST_FLAG_OSEK_COM_INIT())
|
||||||
|
{
|
||||||
/* Initialization of periodic or mixed tx timers */
|
/* Initialization of periodic or mixed tx timers */
|
||||||
ptt_tx_frm_swtlprivatedhucanfr06 = PT_TX_FRM_SWTLPRIVATEDHUCANFR06 - OT_TX_FRM_SWTLPRIVATEDHUCANFR06;
|
ptt_tx_frm_swtlprivatedhucanfr06 = PT_TX_FRM_SWTLPRIVATEDHUCANFR06 - OT_TX_FRM_SWTLPRIVATEDHUCANFR06;
|
||||||
ptt_tx_frm_swtlprivatedhucanfr05 = PT_TX_FRM_SWTLPRIVATEDHUCANFR05 - OT_TX_FRM_SWTLPRIVATEDHUCANFR05;
|
ptt_tx_frm_swtlprivatedhucanfr05 = PT_TX_FRM_SWTLPRIVATEDHUCANFR05 - OT_TX_FRM_SWTLPRIVATEDHUCANFR05;
|
||||||
@ -980,7 +1059,8 @@ t_status_type StartPeriodic(void)
|
|||||||
/* Activation of the periodic Tx management runnable */
|
/* Activation of the periodic Tx management runnable */
|
||||||
SET_FLAG_OSEK_COM_PER_TX();
|
SET_FLAG_OSEK_COM_PER_TX();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
status = E_COM_SYS_NOINIT;
|
status = E_COM_SYS_NOINIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1051,7 +1131,8 @@ t_status_type ReceiveMessage(t_symbolic_name message,
|
|||||||
|
|
||||||
/* Mutual exclusive access begin */
|
/* Mutual exclusive access begin */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
switch (message) {
|
switch (message)
|
||||||
|
{
|
||||||
case SIG_TWLIBRISTS_UB:
|
case SIG_TWLIBRISTS_UB:
|
||||||
((uint8_t *)data_ref)[0] = sig_twlibrists_ub[0];
|
((uint8_t *)data_ref)[0] = sig_twlibrists_ub[0];
|
||||||
break;
|
break;
|
||||||
@ -1093,7 +1174,8 @@ t_status_type ReceiveDynamicMessage(t_symbolic_name message,
|
|||||||
|
|
||||||
/* Mutual exclusive access begin */
|
/* Mutual exclusive access begin */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
switch (message) {
|
switch (message)
|
||||||
|
{
|
||||||
case SIG_DIAGNOSTICREQSWTL:
|
case SIG_DIAGNOSTICREQSWTL:
|
||||||
((UI_8 *)data_ref)[0] = sig_diagnosticreqswtl[0];
|
((UI_8 *)data_ref)[0] = sig_diagnosticreqswtl[0];
|
||||||
((UI_8 *)data_ref)[1] = sig_diagnosticreqswtl[1];
|
((UI_8 *)data_ref)[1] = sig_diagnosticreqswtl[1];
|
||||||
@ -1168,16 +1250,19 @@ t_status_type SendMessage(t_symbolic_name message,
|
|||||||
t_symbolic_name aux_msg = message & (~NODE_ID_MASK);
|
t_symbolic_name aux_msg = message & (~NODE_ID_MASK);
|
||||||
|
|
||||||
/* Case when FicOsek is initialized */
|
/* Case when FicOsek is initialized */
|
||||||
if (TST_FLAG_OSEK_COM_INIT()) {
|
if (TST_FLAG_OSEK_COM_INIT())
|
||||||
|
{
|
||||||
/* Case when message is not out of the range */
|
/* Case when message is not out of the range */
|
||||||
if ((aux_msg >= FIRST_TX_STA_LEN_SIGNAL_SYMBOLIC_NAME) &&
|
if ((aux_msg >= FIRST_TX_STA_LEN_SIGNAL_SYMBOLIC_NAME) &&
|
||||||
(aux_msg <= LAST_TX_STA_LEN_SIGNAL_SYMBOLIC_NAME)) {
|
(aux_msg <= LAST_TX_STA_LEN_SIGNAL_SYMBOLIC_NAME))
|
||||||
|
{
|
||||||
/* Mutual exclusive access begin */
|
/* Mutual exclusive access begin */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
/* Set of message data */
|
/* Set of message data */
|
||||||
status = InitMessage(message, data_ref);
|
status = InitMessage(message, data_ref);
|
||||||
/* Switch for signals with Tx or TxError flags to reset */
|
/* Switch for signals with Tx or TxError flags to reset */
|
||||||
switch (message) {
|
switch (message)
|
||||||
|
{
|
||||||
case SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS:
|
case SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS:
|
||||||
/* Reset Tx notification flag */
|
/* Reset Tx notification flag */
|
||||||
ResetFlagTxSigDiagcFailrTouchPanSWTLVibrationFltSts();
|
ResetFlagTxSigDiagcFailrTouchPanSWTLVibrationFltSts();
|
||||||
@ -1413,12 +1498,14 @@ t_status_type SendMessage(t_symbolic_name message,
|
|||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
}
|
}
|
||||||
/* Case when message is out of the range */
|
/* Case when message is out of the range */
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
status = E_COM_ID;
|
status = E_COM_ID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Case when FicOsek is not initialized */
|
/* Case when FicOsek is not initialized */
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
status = E_COM_SYS_NOINIT;
|
status = E_COM_SYS_NOINIT;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
@ -1431,16 +1518,19 @@ t_status_type SendDynamicMessage(t_symbolic_name message,
|
|||||||
t_status_type status;
|
t_status_type status;
|
||||||
t_symbolic_name aux_msg = message & (~NODE_ID_MASK);
|
t_symbolic_name aux_msg = message & (~NODE_ID_MASK);
|
||||||
/* Case when FicOsek is initialized */
|
/* Case when FicOsek is initialized */
|
||||||
if (TST_FLAG_OSEK_COM_INIT()) {
|
if (TST_FLAG_OSEK_COM_INIT())
|
||||||
|
{
|
||||||
/* Case when message is not out of the range */
|
/* Case when message is not out of the range */
|
||||||
if ((aux_msg >= FIRST_TX_DYN_LEN_SIGNAL_SYMBOLIC_NAME) &&
|
if ((aux_msg >= FIRST_TX_DYN_LEN_SIGNAL_SYMBOLIC_NAME) &&
|
||||||
(aux_msg <= LAST_TX_DYN_LEN_SIGNAL_SYMBOLIC_NAME)) {
|
(aux_msg <= LAST_TX_DYN_LEN_SIGNAL_SYMBOLIC_NAME))
|
||||||
|
{
|
||||||
/* Mutual exclusive access begin */
|
/* Mutual exclusive access begin */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
/* Set of signal data */
|
/* Set of signal data */
|
||||||
status = InitMessage(message, data_ref);
|
status = InitMessage(message, data_ref);
|
||||||
/* Switch for signals */
|
/* Switch for signals */
|
||||||
switch (message) {
|
switch (message)
|
||||||
|
{
|
||||||
case SIG_DIAGNOSTICRESPSWTL:
|
case SIG_DIAGNOSTICRESPSWTL:
|
||||||
/* Set of signal length */
|
/* Set of signal length */
|
||||||
len_frm_diag_physresp_swtl = MAX_LEN_FRM_DIAG_PHYSRESP_SWTL - MAX_LEN_SIG_DIAGNOSTICRESPSWTL + (*((UI_8 *)length_ref));
|
len_frm_diag_physresp_swtl = MAX_LEN_FRM_DIAG_PHYSRESP_SWTL - MAX_LEN_SIG_DIAGNOSTICRESPSWTL + (*((UI_8 *)length_ref));
|
||||||
@ -1456,7 +1546,8 @@ t_status_type SendDynamicMessage(t_symbolic_name message,
|
|||||||
/* Mutual exclusive access end */
|
/* Mutual exclusive access end */
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
/* Switch for triggered signal of direct or mixed frames */
|
/* Switch for triggered signal of direct or mixed frames */
|
||||||
switch (message) {
|
switch (message)
|
||||||
|
{
|
||||||
case SIG_DIAGNOSTICRESPSWTL:
|
case SIG_DIAGNOSTICRESPSWTL:
|
||||||
/* Trigger event to initiate the transmission of the frame */
|
/* Trigger event to initiate the transmission of the frame */
|
||||||
OsekComTxReqFrmDIAG_PhysResp_SWTL();
|
OsekComTxReqFrmDIAG_PhysResp_SWTL();
|
||||||
@ -1467,12 +1558,14 @@ t_status_type SendDynamicMessage(t_symbolic_name message,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Case when message is out of the range */
|
/* Case when message is out of the range */
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
status = E_COM_ID;
|
status = E_COM_ID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Case when FicOsek is not initialized */
|
/* Case when FicOsek is not initialized */
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
status = E_COM_SYS_NOINIT;
|
status = E_COM_SYS_NOINIT;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
@ -1506,7 +1599,8 @@ t_status_type InitMessage(t_symbolic_name message,
|
|||||||
|
|
||||||
/* Mutual exclusive access begin */
|
/* Mutual exclusive access begin */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
switch (message) {
|
switch (message)
|
||||||
|
{
|
||||||
case SIG_TWLIBRISTS_UB:
|
case SIG_TWLIBRISTS_UB:
|
||||||
/* Initialization of signal sig_TwliBriSts_UB */
|
/* Initialization of signal sig_TwliBriSts_UB */
|
||||||
sig_twlibrists_ub[0] = ((uint8_t *)data_ref)[0];
|
sig_twlibrists_ub[0] = ((uint8_t *)data_ref)[0];
|
||||||
@ -2157,7 +2251,8 @@ void ResetFlagComTrafficSWTL(void)
|
|||||||
t_flag_value ReadFlagTxSig(t_symbolic_name message)
|
t_flag_value ReadFlagTxSig(t_symbolic_name message)
|
||||||
{
|
{
|
||||||
t_flag_value result;
|
t_flag_value result;
|
||||||
switch (message) {
|
switch (message)
|
||||||
|
{
|
||||||
case SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS:
|
case SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS:
|
||||||
result = ReadFlagTxSigDiagcFailrTouchPanSWTLVibrationFltSts();
|
result = ReadFlagTxSigDiagcFailrTouchPanSWTLVibrationFltSts();
|
||||||
break;
|
break;
|
||||||
@ -2664,7 +2759,8 @@ t_flag_value ReadFlagRxSig(t_symbolic_name message)
|
|||||||
/---------------------------------------------------------------------------*/
|
/---------------------------------------------------------------------------*/
|
||||||
void ResetFlagTxSig(t_symbolic_name message)
|
void ResetFlagTxSig(t_symbolic_name message)
|
||||||
{
|
{
|
||||||
switch (message) {
|
switch (message)
|
||||||
|
{
|
||||||
case SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS:
|
case SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS:
|
||||||
ResetFlagTxSigDiagcFailrTouchPanSWTLVibrationFltSts();
|
ResetFlagTxSigDiagcFailrTouchPanSWTLVibrationFltSts();
|
||||||
break;
|
break;
|
||||||
@ -3122,7 +3218,6 @@ void ResetFlagTxSigSteerWhlTouchBdLe_UB(void)
|
|||||||
flag_tx6 &= ((uint8_t)0x7F);
|
flag_tx6 &= ((uint8_t)0x7F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ResetFlagTxSigDiagnosticRespSWTL(void)
|
void ResetFlagTxSigDiagnosticRespSWTL(void)
|
||||||
{
|
{
|
||||||
flag_tx6 &= ((UI_8)0xBF);
|
flag_tx6 &= ((UI_8)0xBF);
|
||||||
@ -3149,7 +3244,8 @@ t_flag_value ReadFlagRxSigDiagnosticFuncAddrReq(void)
|
|||||||
/---------------------------------------------------------------------------*/
|
/---------------------------------------------------------------------------*/
|
||||||
void ResetFlagRxSig(t_symbolic_name message)
|
void ResetFlagRxSig(t_symbolic_name message)
|
||||||
{
|
{
|
||||||
switch (message) {
|
switch (message)
|
||||||
|
{
|
||||||
|
|
||||||
case SIG_DIAGNOSTICREQSWTL:
|
case SIG_DIAGNOSTICREQSWTL:
|
||||||
ResetFlagRxSigDiagnosticReqSWTL();
|
ResetFlagRxSigDiagnosticReqSWTL();
|
||||||
@ -3163,7 +3259,6 @@ void ResetFlagRxSig(t_symbolic_name message)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ResetFlagRxSigDiagnosticReqSWTL(void)
|
void ResetFlagRxSigDiagnosticReqSWTL(void)
|
||||||
{
|
{
|
||||||
flag_rx0 &= ((UI_8)0xFE);
|
flag_rx0 &= ((UI_8)0xFE);
|
||||||
@ -3184,7 +3279,8 @@ void ResetFlagRxSigDiagnosticFuncAddrReq(void)
|
|||||||
/---------------------------------------------------------------------------*/
|
/---------------------------------------------------------------------------*/
|
||||||
void OsekComTask(void)
|
void OsekComTask(void)
|
||||||
{
|
{
|
||||||
if (TST_FLAG_OSEK_COM_INIT()) {
|
if (TST_FLAG_OSEK_COM_INIT())
|
||||||
|
{
|
||||||
/* Get timer difference since last task execution */
|
/* Get timer difference since last task execution */
|
||||||
time_diff = FICOSEK_COM_TASK_TICKS;
|
time_diff = FICOSEK_COM_TASK_TICKS;
|
||||||
|
|
||||||
@ -3207,12 +3303,14 @@ void OsekComTask(void)
|
|||||||
static void OsekComPeriodicTx(void)
|
static void OsekComPeriodicTx(void)
|
||||||
{
|
{
|
||||||
/* Test whether Tx of periodic frames is active */
|
/* Test whether Tx of periodic frames is active */
|
||||||
if (TST_FLAG_OSEK_COM_PER_TX()) {
|
if (TST_FLAG_OSEK_COM_PER_TX())
|
||||||
|
{
|
||||||
/* Com frames monitoring */
|
/* Com frames monitoring */
|
||||||
|
|
||||||
/* Tx frame SwtlPrivateDHUCanFr06 end of period monitoring */
|
/* Tx frame SwtlPrivateDHUCanFr06 end of period monitoring */
|
||||||
ptt_tx_frm_swtlprivatedhucanfr06 += time_diff;
|
ptt_tx_frm_swtlprivatedhucanfr06 += time_diff;
|
||||||
if (ptt_tx_frm_swtlprivatedhucanfr06 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR06) {
|
if (ptt_tx_frm_swtlprivatedhucanfr06 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR06)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlprivatedhucanfr06 = 0; /* Tx frame */
|
ptt_tx_frm_swtlprivatedhucanfr06 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3222,13 +3320,15 @@ static void OsekComPeriodicTx(void)
|
|||||||
|
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tx frame SwtlPrivateDHUCanFr05 end of period monitoring */
|
/* Tx frame SwtlPrivateDHUCanFr05 end of period monitoring */
|
||||||
ptt_tx_frm_swtlprivatedhucanfr05 += time_diff;
|
ptt_tx_frm_swtlprivatedhucanfr05 += time_diff;
|
||||||
if (ptt_tx_frm_swtlprivatedhucanfr05 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR05) {
|
if (ptt_tx_frm_swtlprivatedhucanfr05 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR05)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlprivatedhucanfr05 = 0; /* Tx frame */
|
ptt_tx_frm_swtlprivatedhucanfr05 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3238,13 +3338,15 @@ static void OsekComPeriodicTx(void)
|
|||||||
|
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tx frame SwtlPrivateDHUCanFr04 end of period monitoring */
|
/* Tx frame SwtlPrivateDHUCanFr04 end of period monitoring */
|
||||||
ptt_tx_frm_swtlprivatedhucanfr04 += time_diff;
|
ptt_tx_frm_swtlprivatedhucanfr04 += time_diff;
|
||||||
if (ptt_tx_frm_swtlprivatedhucanfr04 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR04) {
|
if (ptt_tx_frm_swtlprivatedhucanfr04 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR04)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlprivatedhucanfr04 = 0; /* Tx frame */
|
ptt_tx_frm_swtlprivatedhucanfr04 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3254,13 +3356,15 @@ static void OsekComPeriodicTx(void)
|
|||||||
|
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tx frame SwtlPrivateDHUCanFr03 end of period monitoring */
|
/* Tx frame SwtlPrivateDHUCanFr03 end of period monitoring */
|
||||||
ptt_tx_frm_swtlprivatedhucanfr03 += time_diff;
|
ptt_tx_frm_swtlprivatedhucanfr03 += time_diff;
|
||||||
if (ptt_tx_frm_swtlprivatedhucanfr03 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR03) {
|
if (ptt_tx_frm_swtlprivatedhucanfr03 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR03)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlprivatedhucanfr03 = 0; /* Tx frame */
|
ptt_tx_frm_swtlprivatedhucanfr03 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3271,7 +3375,8 @@ static void OsekComPeriodicTx(void)
|
|||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
@ -3290,13 +3395,10 @@ static void OsekComPeriodicTx(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Tx frame SwtlPressFr01 end of period monitoring */
|
/* Tx frame SwtlPressFr01 end of period monitoring */
|
||||||
ptt_tx_frm_swtlpressfr01 += time_diff;
|
ptt_tx_frm_swtlpressfr01 += time_diff;
|
||||||
if (ptt_tx_frm_swtlpressfr01 >= PT_TX_FRM_SWTLPRESSFR01) {
|
if (ptt_tx_frm_swtlpressfr01 >= PT_TX_FRM_SWTLPRESSFR01)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlpressfr01 = 0; /* Tx frame */
|
ptt_tx_frm_swtlpressfr01 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3305,15 +3407,16 @@ static void OsekComPeriodicTx(void)
|
|||||||
OsekComTxReqCallbackSWTL();
|
OsekComTxReqCallbackSWTL();
|
||||||
// CanTxRequest();
|
// CanTxRequest();
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tx frame SwtlSensorFr01 end of period monitoring */
|
/* Tx frame SwtlSensorFr01 end of period monitoring */
|
||||||
ptt_tx_frm_swtlsensorfr01 += time_diff;
|
ptt_tx_frm_swtlsensorfr01 += time_diff;
|
||||||
if (ptt_tx_frm_swtlsensorfr01 >= PT_TX_FRM_SWTLSENSORFR01) {
|
if (ptt_tx_frm_swtlsensorfr01 >= PT_TX_FRM_SWTLSENSORFR01)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlsensorfr01 = 0; /* Tx frame */
|
ptt_tx_frm_swtlsensorfr01 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3321,15 +3424,16 @@ static void OsekComPeriodicTx(void)
|
|||||||
|
|
||||||
OsekComTxReqCallbackSWTL();
|
OsekComTxReqCallbackSWTL();
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tx frame SwtlSensorFr02 end of period monitoring */
|
/* Tx frame SwtlSensorFr02 end of period monitoring */
|
||||||
ptt_tx_frm_swtlsensorfr02 += time_diff;
|
ptt_tx_frm_swtlsensorfr02 += time_diff;
|
||||||
if (ptt_tx_frm_swtlsensorfr02 >= PT_TX_FRM_SWTLSENSORFR02) {
|
if (ptt_tx_frm_swtlsensorfr02 >= PT_TX_FRM_SWTLSENSORFR02)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlsensorfr02 = 0; /* Tx frame */
|
ptt_tx_frm_swtlsensorfr02 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3337,15 +3441,16 @@ static void OsekComPeriodicTx(void)
|
|||||||
|
|
||||||
OsekComTxReqCallbackSWTL();
|
OsekComTxReqCallbackSWTL();
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tx frame SwtlSensorFr03 end of period monitoring */
|
/* Tx frame SwtlSensorFr03 end of period monitoring */
|
||||||
ptt_tx_frm_swtlsensorfr03 += time_diff;
|
ptt_tx_frm_swtlsensorfr03 += time_diff;
|
||||||
if (ptt_tx_frm_swtlsensorfr03 >= PT_TX_FRM_SWTLSENSORFR03) {
|
if (ptt_tx_frm_swtlsensorfr03 >= PT_TX_FRM_SWTLSENSORFR03)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlsensorfr03 = 0; /* Tx frame */
|
ptt_tx_frm_swtlsensorfr03 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3353,15 +3458,16 @@ static void OsekComPeriodicTx(void)
|
|||||||
|
|
||||||
OsekComTxReqCallbackSWTL();
|
OsekComTxReqCallbackSWTL();
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tx frame SwtlSensorFr04 end of period monitoring */
|
/* Tx frame SwtlSensorFr04 end of period monitoring */
|
||||||
ptt_tx_frm_swtlsensorfr04 += time_diff;
|
ptt_tx_frm_swtlsensorfr04 += time_diff;
|
||||||
if (ptt_tx_frm_swtlsensorfr04 >= PT_TX_FRM_SWTLSENSORFR04) {
|
if (ptt_tx_frm_swtlsensorfr04 >= PT_TX_FRM_SWTLSENSORFR04)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlsensorfr04 = 0; /* Tx frame */
|
ptt_tx_frm_swtlsensorfr04 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3369,15 +3475,16 @@ static void OsekComPeriodicTx(void)
|
|||||||
|
|
||||||
OsekComTxReqCallbackSWTL();
|
OsekComTxReqCallbackSWTL();
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tx frame SwtlSensorFr05 end of period monitoring */
|
/* Tx frame SwtlSensorFr05 end of period monitoring */
|
||||||
ptt_tx_frm_swtlsensorfr05 += time_diff;
|
ptt_tx_frm_swtlsensorfr05 += time_diff;
|
||||||
if (ptt_tx_frm_swtlsensorfr05 >= PT_TX_FRM_SWTLSENSORFR05) {
|
if (ptt_tx_frm_swtlsensorfr05 >= PT_TX_FRM_SWTLSENSORFR05)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlsensorfr05 = 0; /* Tx frame */
|
ptt_tx_frm_swtlsensorfr05 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3385,15 +3492,16 @@ static void OsekComPeriodicTx(void)
|
|||||||
|
|
||||||
OsekComTxReqCallbackSWTL();
|
OsekComTxReqCallbackSWTL();
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tx frame SwtlSensorFr06 end of period monitoring */
|
/* Tx frame SwtlSensorFr06 end of period monitoring */
|
||||||
ptt_tx_frm_swtlsensorfr06 += time_diff;
|
ptt_tx_frm_swtlsensorfr06 += time_diff;
|
||||||
if (ptt_tx_frm_swtlsensorfr06 >= PT_TX_FRM_SWTLSENSORFR06) {
|
if (ptt_tx_frm_swtlsensorfr06 >= PT_TX_FRM_SWTLSENSORFR06)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlsensorfr06 = 0; /* Tx frame */
|
ptt_tx_frm_swtlsensorfr06 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3401,15 +3509,16 @@ static void OsekComPeriodicTx(void)
|
|||||||
|
|
||||||
OsekComTxReqCallbackSWTL();
|
OsekComTxReqCallbackSWTL();
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tx frame SwtlSensorFr07 end of period monitoring */
|
/* Tx frame SwtlSensorFr07 end of period monitoring */
|
||||||
ptt_tx_frm_swtlsensorfr07 += time_diff;
|
ptt_tx_frm_swtlsensorfr07 += time_diff;
|
||||||
if (ptt_tx_frm_swtlsensorfr07 >= PT_TX_FRM_SWTLSENSORFR07) {
|
if (ptt_tx_frm_swtlsensorfr07 >= PT_TX_FRM_SWTLSENSORFR07)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlsensorfr07 = 0; /* Tx frame */
|
ptt_tx_frm_swtlsensorfr07 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3417,15 +3526,16 @@ static void OsekComPeriodicTx(void)
|
|||||||
|
|
||||||
OsekComTxReqCallbackSWTL();
|
OsekComTxReqCallbackSWTL();
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
#if 1
|
#if 1
|
||||||
/* Tx frame SwtlSensorFr08 end of period monitoring */
|
/* Tx frame SwtlSensorFr08 end of period monitoring */
|
||||||
ptt_tx_frm_swtlsensorfr08 += time_diff;
|
ptt_tx_frm_swtlsensorfr08 += time_diff;
|
||||||
if (ptt_tx_frm_swtlsensorfr08 >= PT_TX_FRM_SWTLSENSORFR08) {
|
if (ptt_tx_frm_swtlsensorfr08 >= PT_TX_FRM_SWTLSENSORFR08)
|
||||||
|
{
|
||||||
/* Reset timer */
|
/* Reset timer */
|
||||||
ptt_tx_frm_swtlsensorfr08 = 0; /* Tx frame */
|
ptt_tx_frm_swtlsensorfr08 = 0; /* Tx frame */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
@ -3433,13 +3543,12 @@ static void OsekComPeriodicTx(void)
|
|||||||
|
|
||||||
OsekComTxReqCallbackSWTL();
|
OsekComTxReqCallbackSWTL();
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------
|
||||||
@ -3459,14 +3568,16 @@ static void OsekComDeadlineMonitRx(void)
|
|||||||
/* Increasing Timer */
|
/* Increasing Timer */
|
||||||
dmt_rx_sig_actvnofsteerwhlillmn += time_diff;
|
dmt_rx_sig_actvnofsteerwhlillmn += time_diff;
|
||||||
/* Rx deadline case time out signal ActvnOfSteerWhlIllmn */
|
/* Rx deadline case time out signal ActvnOfSteerWhlIllmn */
|
||||||
if (dmt_rx_sig_actvnofsteerwhlillmn >= TO_RX_SIG_ACTVNOFSTEERWHLILLMN) {
|
if (dmt_rx_sig_actvnofsteerwhlillmn >= TO_RX_SIG_ACTVNOFSTEERWHLILLMN)
|
||||||
|
{
|
||||||
/* Reset monitoring timer */
|
/* Reset monitoring timer */
|
||||||
dmt_rx_sig_actvnofsteerwhlillmn = 0;
|
dmt_rx_sig_actvnofsteerwhlillmn = 0;
|
||||||
/* RxError notification callback */
|
/* RxError notification callback */
|
||||||
IhuPrivateDHUCanFr01_Timeout_CALLBACK();
|
IhuPrivateDHUCanFr01_Timeout_CALLBACK();
|
||||||
}
|
}
|
||||||
/* Case normal counting */
|
/* Case normal counting */
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do Nothing */
|
/* Do Nothing */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3507,10 +3618,12 @@ static void OsekComTxReqFrmDIAG_PhysResp_SWTL(void)
|
|||||||
{
|
{
|
||||||
/* Start of the Tx deadline monitoring timer */
|
/* Start of the Tx deadline monitoring timer */
|
||||||
// SuspendAllInterrupts();
|
// SuspendAllInterrupts();
|
||||||
if (dmt_tx_frm_diag_physresp_swtl == TIMER_CANCEL) {
|
if (dmt_tx_frm_diag_physresp_swtl == TIMER_CANCEL)
|
||||||
|
{
|
||||||
dmt_tx_frm_diag_physresp_swtl = 0;
|
dmt_tx_frm_diag_physresp_swtl = 0;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}
|
}
|
||||||
/* Tx frame */
|
/* Tx frame */
|
||||||
@ -3519,4 +3632,3 @@ static void OsekComTxReqFrmDIAG_PhysResp_SWTL(void)
|
|||||||
OsekComTxReqCallbackSWTL();
|
OsekComTxReqCallbackSWTL();
|
||||||
// ResumeAllInterrupts();
|
// ResumeAllInterrupts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -834,5 +834,14 @@ void ResetFlagRxSigDiagnosticFuncAddrReq(void);
|
|||||||
void OsekComTask(void);
|
void OsekComTask(void);
|
||||||
void OsekComTxReqFrmSwtlPrivateDHUCanFr01(void);
|
void OsekComTxReqFrmSwtlPrivateDHUCanFr01(void);
|
||||||
void OsekComTxReqFrmSwtlPrivateDHUCanFr02(void);
|
void OsekComTxReqFrmSwtlPrivateDHUCanFr02(void);
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void OsekComSetFR09data(uint8_t data[]);
|
||||||
|
void OsekComSetFR0Adata(uint8_t data[]);
|
||||||
|
void OsekComSetFR0Bdata(uint8_t data[]);
|
||||||
|
void OsekComSetFR0Cdata(uint8_t data[]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -49,7 +49,7 @@ typedef unsigned char uint8_T;
|
|||||||
typedef short int16_T;
|
typedef short int16_T;
|
||||||
typedef unsigned short uint16_T;
|
typedef unsigned short uint16_T;
|
||||||
typedef int int32_T;
|
typedef int int32_T;
|
||||||
typedef unsigned int uint32_T;
|
typedef long unsigned int uint32_T;
|
||||||
typedef float real32_T;
|
typedef float real32_T;
|
||||||
typedef double real64_T;
|
typedef double real64_T;
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -12,6 +12,7 @@ STATE_UINT16 speaker_cycle_u16;
|
|||||||
speaker_ctrl_Str speaker_ctrl_buf_str;
|
speaker_ctrl_Str speaker_ctrl_buf_str;
|
||||||
static uint8_t DAC_Initialize_status = 0;
|
static uint8_t DAC_Initialize_status = 0;
|
||||||
static uint8_t DAC_Initialize_RetryCnt = 3;
|
static uint8_t DAC_Initialize_RetryCnt = 3;
|
||||||
|
static uint8_t speaker_fault_status = 0;
|
||||||
/************************************
|
/************************************
|
||||||
Get Sw Fifo empty condition
|
Get Sw Fifo empty condition
|
||||||
************************************/
|
************************************/
|
||||||
@ -166,6 +167,8 @@ void speaker_MainTask(void)
|
|||||||
//SA51024_Set_State(SA51024_STOP,speaker_ctrl_buf_str.strenght);
|
//SA51024_Set_State(SA51024_STOP,speaker_ctrl_buf_str.strenght);
|
||||||
PORT_PinWrite(PORT_PIN_PA13,0);/*SHUTDOWN = 1,turn on chip*/
|
PORT_PinWrite(PORT_PIN_PA13,0);/*SHUTDOWN = 1,turn on chip*/
|
||||||
PORT_PinWrite(PORT_PIN_PA25,0);
|
PORT_PinWrite(PORT_PIN_PA25,0);
|
||||||
|
PORT_PinPeripheralFunctionConfig(PORT_PIN_PA02,PERIPHERAL_FUNCTION_B);
|
||||||
|
DAC_REGS->DAC_CTRLA |= DAC_CTRLA_ENABLE_Msk;
|
||||||
speaker_set_strenght(SA51024_STRENGTH_LEVEL0);
|
speaker_set_strenght(SA51024_STRENGTH_LEVEL0);
|
||||||
speaker_main_state_str = SPEAKER_INIT_CYCLE;
|
speaker_main_state_str = SPEAKER_INIT_CYCLE;
|
||||||
speaker_cycle_u16 = 0;
|
speaker_cycle_u16 = 0;
|
||||||
@ -178,7 +181,7 @@ void speaker_MainTask(void)
|
|||||||
|
|
||||||
if(speaker_cycle_u16++ >= ((SPEAKER_INTERVAL_CYCLE_TIMES)/(SPEAKER_TASK_PERIOD)))
|
if(speaker_cycle_u16++ >= ((SPEAKER_INTERVAL_CYCLE_TIMES)/(SPEAKER_TASK_PERIOD)))
|
||||||
{
|
{
|
||||||
DAC_REGS->DAC_CTRLA &= ~DAC_CTRLA_ENABLE_Msk;
|
//DAC_REGS->DAC_CTRLA &= ~DAC_CTRLA_ENABLE_Msk;
|
||||||
PORT_PinGPIOConfig(PORT_PIN_PA02);
|
PORT_PinGPIOConfig(PORT_PIN_PA02);
|
||||||
speaker_main_state_str = SPEAKER_IDLE;
|
speaker_main_state_str = SPEAKER_IDLE;
|
||||||
}
|
}
|
||||||
@ -211,9 +214,9 @@ void speaker_MainTask(void)
|
|||||||
|
|
||||||
case SPEAKER_START:
|
case SPEAKER_START:
|
||||||
{
|
{
|
||||||
PORT_PinPeripheralFunctionConfig(PORT_PIN_PA02,PERIPHERAL_FUNCTION_B);
|
|
||||||
PORT_PinWrite(PORT_PIN_PA25,0);
|
PORT_PinWrite(PORT_PIN_PA25,0);
|
||||||
DAC_REGS->DAC_CTRLA |= DAC_CTRLA_ENABLE_Msk;
|
|
||||||
SA51024_Set_State(SA51024_WORKING,speaker_ctrl_buf_str.strenght);
|
SA51024_Set_State(SA51024_WORKING,speaker_ctrl_buf_str.strenght);
|
||||||
speaker_cycle_u16 = 0;
|
speaker_cycle_u16 = 0;
|
||||||
speaker_main_state_str = SPEAKER_UPDATE_CYCLE;
|
speaker_main_state_str = SPEAKER_UPDATE_CYCLE;
|
||||||
@ -225,7 +228,14 @@ void speaker_MainTask(void)
|
|||||||
if(speaker_cycle_u16 >= SA51024_WAVE_MAX_NUM)
|
if(speaker_cycle_u16 >= SA51024_WAVE_MAX_NUM)
|
||||||
{
|
{
|
||||||
speaker_main_state_str = SPEAKER_STOP;
|
speaker_main_state_str = SPEAKER_STOP;
|
||||||
|
speaker_fault_status = 0;
|
||||||
}
|
}
|
||||||
|
if (PORT_PinRead(FAULT_OUT_PIN) == false)
|
||||||
|
{
|
||||||
|
speaker_main_state_str = SPEAKER_STOP;
|
||||||
|
speaker_fault_status = 1;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -240,7 +250,7 @@ void speaker_MainTask(void)
|
|||||||
|
|
||||||
/* Disable DAC */
|
/* Disable DAC */
|
||||||
// DAC_REGS->DAC_CTRLA &= ~DAC_CTRLA_ENABLE_Msk;
|
// DAC_REGS->DAC_CTRLA &= ~DAC_CTRLA_ENABLE_Msk;
|
||||||
PORT_PinGPIOConfig(PORT_PIN_PA02);
|
//PORT_PinGPIOConfig(PORT_PIN_PA02);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -282,5 +292,9 @@ Speaker_main_e_typ Get_Speaker_Main_State(void)
|
|||||||
return speaker_main_state_str;
|
return speaker_main_state_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t Get_Speaker_Fault(void)
|
||||||
|
{
|
||||||
|
return speaker_fault_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ extern void speaker_Init(void);
|
|||||||
extern void speaker_MainTask(void);
|
extern void speaker_MainTask(void);
|
||||||
extern STATE_UINT8 speeker_Tig_Once(uint16_t cycle_time,FA51024_ctrl_e_typ level);
|
extern STATE_UINT8 speeker_Tig_Once(uint16_t cycle_time,FA51024_ctrl_e_typ level);
|
||||||
extern Speaker_main_e_typ Get_Speaker_Main_State(void);
|
extern Speaker_main_e_typ Get_Speaker_Main_State(void);
|
||||||
|
extern uint8_t Get_Speaker_Fault(void);
|
||||||
/***************************extern function end************************************/
|
/***************************extern function end************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,15 +36,15 @@
|
|||||||
|
|
||||||
#define CW_BUS_CTRL_2 (0x0) /*decimal 0*/
|
#define CW_BUS_CTRL_2 (0x0) /*decimal 0*/
|
||||||
|
|
||||||
#define CW_GPIO_CTRL (0x0) /*decimal 0*/
|
#define CW_GPIO_CTRL (0x24) /*decimal 36*/
|
||||||
|
|
||||||
#define CW_HS_CTRL1 (0x0) /*decimal 0*/
|
#define CW_HS_CTRL1 (0x0) /*decimal 0*/
|
||||||
|
|
||||||
#define CW_HS_CTRL2 (0x0) /*decimal 0*/
|
#define CW_HS_CTRL2 (0x0) /*decimal 0*/
|
||||||
|
|
||||||
#define CW_HW_CTRL (0x80) /*decimal 128*/
|
#define CW_HW_CTRL (0x9) /*decimal 9*/
|
||||||
|
|
||||||
#define CW_M_S_CTRL (0x18) /*decimal 8*/
|
#define CW_M_S_CTRL (0x1C) /*decimal 28*/
|
||||||
|
|
||||||
#define CW_PWM1_CTRL (0x0) /*decimal 0*/
|
#define CW_PWM1_CTRL (0x0) /*decimal 0*/
|
||||||
|
|
||||||
@ -92,15 +92,15 @@
|
|||||||
|
|
||||||
#define CW_TIMER2_CTRL (0x0) /*decimal 0*/
|
#define CW_TIMER2_CTRL (0x0) /*decimal 0*/
|
||||||
|
|
||||||
#define CW_WD_CTRL (0x4) /*decimal 4*/
|
#define CW_WD_CTRL (0x84) /*decimal 132*/
|
||||||
|
|
||||||
#define CW_WK_CTRL_1 (0x0) /*decimal 0*/
|
#define CW_WK_CTRL_1 (0x0) /*decimal 0*/
|
||||||
|
|
||||||
#define CW_WK_CTRL_2 (0x7) /*decimal 7*/
|
#define CW_WK_CTRL_2 (0x0) /*decimal 0*/
|
||||||
|
|
||||||
#define CW_WK_FLT_CTRL (0x0) /*decimal 0*/
|
#define CW_WK_FLT_CTRL (0x0) /*decimal 0*/
|
||||||
|
|
||||||
#define CW_WK_PUPD_CTRL (0x3F) /*decimal 63*/
|
#define CW_WK_PUPD_CTRL (0x0) /*decimal 0*/
|
||||||
|
|
||||||
#define LED_EXTENDED_ID (0x1) /*decimal 1*/
|
#define LED_EXTENDED_ID (0x1) /*decimal 1*/
|
||||||
|
|
||||||
@ -120,6 +120,6 @@
|
|||||||
|
|
||||||
#define UI_SWK_MASK_IDx_CTRL 0x00000000
|
#define UI_SWK_MASK_IDx_CTRL 0x00000000
|
||||||
|
|
||||||
#define UI_VARIANT (0x3) /*decimal 3*/
|
#define UI_VARIANT (0x5) /*decimal 5*/
|
||||||
|
|
||||||
#endif /* SBC_TLE926X_H */
|
#endif /* SBC_TLE926X_H */
|
||||||
|
@ -206,11 +206,14 @@ SBC_ErrorCode sbc_init(void) {
|
|||||||
|
|
||||||
/* Describes initialization sequence.
|
/* Describes initialization sequence.
|
||||||
init Sequence containing {reg_address, reg_value}*/
|
init Sequence containing {reg_address, reg_value}*/
|
||||||
uint8_t initSequence[4][2] = {
|
uint8_t initSequence[8][2] = {
|
||||||
{SBC_WD_CTRL, WD_CTRL},//0x04 TimeOut; 200ms period
|
{SBC_WD_CTRL, WD_CTRL},//0x04 TimeOut; 200ms period
|
||||||
{SBC_M_S_CTRL, CW_M_S_CTRL},//0x18 SBC normal;vcc3off;vcc2 on in normal;
|
{SBC_M_S_CTRL, CW_M_S_CTRL},//0x18 SBC normal;vcc3off;vcc2 on in normal;
|
||||||
{SBC_BUS_CTRL_1, CW_BUS_CTRL_1},//0x03 lin off; can normal
|
{SBC_BUS_CTRL_1, CW_BUS_CTRL_1},//0x03 lin off; can normal
|
||||||
|
{SBC_WK_CTRL_2, CW_WK_CTRL_2},
|
||||||
|
{SBC_HW_CTRL, CW_HW_CTRL},
|
||||||
|
{SBC_GPIO_CTRL, CW_GPIO_CTRL},
|
||||||
|
{SBC_WK_PUPD_CTRL, CW_WK_PUPD_CTRL},
|
||||||
/* End Configuration */
|
/* End Configuration */
|
||||||
{0x00U, 0x00U}
|
{0x00U, 0x00U}
|
||||||
};
|
};
|
||||||
|
@ -1,24 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<icwpxml version="2.6.4">
|
<icwpxml version="2.6.4">
|
||||||
<checksum>938a5187cdcc759f78b6bae262f689a50c384e539a95618defe57f554fa7fafd</checksum>
|
<checksum>b31f5011f3959a9e7cc2c9ca70f9a9d697b17587a54185c423e628478807656e</checksum>
|
||||||
<XmlFile>TLE926x_Lib.xml</XmlFile>
|
<XmlFile>TLE926x_Lib.xml</XmlFile>
|
||||||
<XmlVersion>V0.0.1</XmlVersion>
|
<XmlVersion>V0.0.1</XmlVersion>
|
||||||
<ActiveElements>
|
<ActiveElements>
|
||||||
<CheckBox>
|
|
||||||
<define>CW.M_S_CTRL[2]</define>
|
|
||||||
<value>0</value>
|
|
||||||
<dispValue>0</dispValue>
|
|
||||||
</CheckBox>
|
|
||||||
<ComboBox>
|
<ComboBox>
|
||||||
<define>CW.M_S_CTRL[1:0]</define>
|
<define>CW.M_S_CTRL[1:0]</define>
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
<dispValue>0</dispValue>
|
<dispValue>0</dispValue>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<CheckBox>
|
|
||||||
<define>CW.HW_CTRL[3]</define>
|
|
||||||
<value>0</value>
|
|
||||||
<dispValue>0</dispValue>
|
|
||||||
</CheckBox>
|
|
||||||
<CheckBox>
|
<CheckBox>
|
||||||
<define>CW.HW_CTRL[1]</define>
|
<define>CW.HW_CTRL[1]</define>
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@ -34,21 +24,11 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
<dispValue>0</dispValue>
|
<dispValue>0</dispValue>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<CheckBox>
|
|
||||||
<define>CW.BUS_CTRL_1[5]</define>
|
|
||||||
<value>1</value>
|
|
||||||
<dispValue>1</dispValue>
|
|
||||||
</CheckBox>
|
|
||||||
<CheckBox>
|
<CheckBox>
|
||||||
<define>CW.BUS_CTRL_1[6]</define>
|
<define>CW.BUS_CTRL_1[6]</define>
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
<dispValue>0</dispValue>
|
<dispValue>0</dispValue>
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox>
|
|
||||||
<define>CW.BUS_CTRL_1[7]</define>
|
|
||||||
<value>0</value>
|
|
||||||
<dispValue>0</dispValue>
|
|
||||||
</CheckBox>
|
|
||||||
<CheckBox>
|
<CheckBox>
|
||||||
<define>MATH.EN_PN</define>
|
<define>MATH.EN_PN</define>
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@ -79,11 +59,6 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
<dispValue>0</dispValue>
|
<dispValue>0</dispValue>
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<Slider>
|
|
||||||
<define>CW.SWK_BTL2_CTRL[5:0]</define>
|
|
||||||
<value>0</value>
|
|
||||||
<dispValue>0</dispValue>
|
|
||||||
</Slider>
|
|
||||||
<CheckBox>
|
<CheckBox>
|
||||||
<define>CW.SWK_ID0_CTRL[0]</define>
|
<define>CW.SWK_ID0_CTRL[0]</define>
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@ -114,16 +89,6 @@
|
|||||||
<value>0x00000000</value>
|
<value>0x00000000</value>
|
||||||
<dispValue>0x00000000</dispValue>
|
<dispValue>0x00000000</dispValue>
|
||||||
</LineEdit>
|
</LineEdit>
|
||||||
<ComboBox>
|
|
||||||
<define>CW.GPIO_CTRL[2:0]</define>
|
|
||||||
<value>0</value>
|
|
||||||
<dispValue>0</dispValue>
|
|
||||||
</ComboBox>
|
|
||||||
<ComboBox>
|
|
||||||
<define>CW.GPIO_CTRL[5:3]</define>
|
|
||||||
<value>0</value>
|
|
||||||
<dispValue>0</dispValue>
|
|
||||||
</ComboBox>
|
|
||||||
<ComboBox>
|
<ComboBox>
|
||||||
<define>CW.GPIO_CTRL[7:6]</define>
|
<define>CW.GPIO_CTRL[7:6]</define>
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@ -134,11 +99,6 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
<dispValue>0</dispValue>
|
<dispValue>0</dispValue>
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox>
|
|
||||||
<define>CW.HW_CTRL[0]</define>
|
|
||||||
<value>0</value>
|
|
||||||
<dispValue>0</dispValue>
|
|
||||||
</CheckBox>
|
|
||||||
<CheckBox>
|
<CheckBox>
|
||||||
<define>CW.HW_CTRL[5]</define>
|
<define>CW.HW_CTRL[5]</define>
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@ -164,21 +124,6 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
<dispValue>0</dispValue>
|
<dispValue>0</dispValue>
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox>
|
|
||||||
<define>CW.WK_CTRL_2[0]</define>
|
|
||||||
<value>1</value>
|
|
||||||
<dispValue>1</dispValue>
|
|
||||||
</CheckBox>
|
|
||||||
<CheckBox>
|
|
||||||
<define>CW.WK_CTRL_2[1]</define>
|
|
||||||
<value>1</value>
|
|
||||||
<dispValue>1</dispValue>
|
|
||||||
</CheckBox>
|
|
||||||
<CheckBox>
|
|
||||||
<define>CW.WK_CTRL_2[2]</define>
|
|
||||||
<value>1</value>
|
|
||||||
<dispValue>1</dispValue>
|
|
||||||
</CheckBox>
|
|
||||||
<ComboBox>
|
<ComboBox>
|
||||||
<define>CW.WK_FLT_CTRL[1:0]</define>
|
<define>CW.WK_FLT_CTRL[1:0]</define>
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@ -279,50 +224,105 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
<dispValue>0</dispValue>
|
<dispValue>0</dispValue>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<ButtonGroup>
|
|
||||||
<define>UI.VARIANT</define>
|
|
||||||
<value>3</value>
|
|
||||||
<dispValue>3</dispValue>
|
|
||||||
</ButtonGroup>
|
|
||||||
<ButtonGroup>
|
|
||||||
<define>CW.M_S_CTRL[4:3]</define>
|
|
||||||
<value>1</value>
|
|
||||||
<dispValue>1</dispValue>
|
|
||||||
</ButtonGroup>
|
|
||||||
<ComboBox>
|
<ComboBox>
|
||||||
<define>CW.BUS_CTRL_1[2:0]</define>
|
<define>CW.BUS_CTRL_1[2:0]</define>
|
||||||
<value>3</value>
|
<value>3</value>
|
||||||
<dispValue>3</dispValue>
|
<dispValue>3</dispValue>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<ComboBox>
|
|
||||||
<define>CW.BUS_CTRL_1[4:3]</define>
|
|
||||||
<value>3</value>
|
|
||||||
<dispValue>3</dispValue>
|
|
||||||
</ComboBox>
|
|
||||||
<ComboBox>
|
|
||||||
<define>CW.WD_CTRL[2:0]</define>
|
|
||||||
<value>6</value>
|
|
||||||
<dispValue>6</dispValue>
|
|
||||||
</ComboBox>
|
|
||||||
<CheckBox>
|
<CheckBox>
|
||||||
<define>CW.HW_CTRL[7]</define>
|
<define>CW.HW_CTRL[7]</define>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
|
<dispValue>0</dispValue>
|
||||||
|
</CheckBox>
|
||||||
|
<ComboBox>
|
||||||
|
<define>CW.BUS_CTRL_1[4:3]</define>
|
||||||
|
<value>0</value>
|
||||||
|
<dispValue>0</dispValue>
|
||||||
|
</ComboBox>
|
||||||
|
<ButtonGroup>
|
||||||
|
<define>UI.VARIANT</define>
|
||||||
|
<value>5</value>
|
||||||
|
<dispValue>5</dispValue>
|
||||||
|
</ButtonGroup>
|
||||||
|
<ComboBox>
|
||||||
|
<define>CW.GPIO_CTRL[2:0]</define>
|
||||||
|
<value>4</value>
|
||||||
|
<dispValue>4</dispValue>
|
||||||
|
</ComboBox>
|
||||||
|
<ComboBox>
|
||||||
|
<define>CW.GPIO_CTRL[5:3]</define>
|
||||||
|
<value>4</value>
|
||||||
|
<dispValue>4</dispValue>
|
||||||
|
</ComboBox>
|
||||||
|
<CheckBox>
|
||||||
|
<define>CW.M_S_CTRL[2]</define>
|
||||||
|
<value>1</value>
|
||||||
|
<dispValue>1</dispValue>
|
||||||
|
</CheckBox>
|
||||||
|
<ButtonGroup>
|
||||||
|
<define>CW.M_S_CTRL[4:3]</define>
|
||||||
|
<value>3</value>
|
||||||
|
<dispValue>3</dispValue>
|
||||||
|
</ButtonGroup>
|
||||||
|
<CheckBox>
|
||||||
|
<define>CW.HW_CTRL[3]</define>
|
||||||
|
<value>1</value>
|
||||||
|
<dispValue>1</dispValue>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox>
|
||||||
|
<define>CW.BUS_CTRL_1[5]</define>
|
||||||
|
<value>0</value>
|
||||||
|
<dispValue>0</dispValue>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox>
|
||||||
|
<define>CW.BUS_CTRL_1[7]</define>
|
||||||
|
<value>1</value>
|
||||||
|
<dispValue>1</dispValue>
|
||||||
|
</CheckBox>
|
||||||
|
<Slider>
|
||||||
|
<define>CW.SWK_BTL2_CTRL[5:0]</define>
|
||||||
|
<value>52</value>
|
||||||
|
<dispValue>52</dispValue>
|
||||||
|
</Slider>
|
||||||
|
<CheckBox>
|
||||||
|
<define>CW.HW_CTRL[0]</define>
|
||||||
|
<value>1</value>
|
||||||
<dispValue>1</dispValue>
|
<dispValue>1</dispValue>
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
|
<ComboBox>
|
||||||
|
<define>CW.WD_CTRL[2:0]</define>
|
||||||
|
<value>4</value>
|
||||||
|
<dispValue>4</dispValue>
|
||||||
|
</ComboBox>
|
||||||
|
<CheckBox>
|
||||||
|
<define>CW.WK_CTRL_2[0]</define>
|
||||||
|
<value>0</value>
|
||||||
|
<dispValue>0</dispValue>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox>
|
||||||
|
<define>CW.WK_CTRL_2[1]</define>
|
||||||
|
<value>0</value>
|
||||||
|
<dispValue>0</dispValue>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox>
|
||||||
|
<define>CW.WK_CTRL_2[2]</define>
|
||||||
|
<value>0</value>
|
||||||
|
<dispValue>0</dispValue>
|
||||||
|
</CheckBox>
|
||||||
<ComboBox>
|
<ComboBox>
|
||||||
<define>CW.WK_PUPD_CTRL[1:0]</define>
|
<define>CW.WK_PUPD_CTRL[1:0]</define>
|
||||||
<value>3</value>
|
<value>0</value>
|
||||||
<dispValue>3</dispValue>
|
<dispValue>0</dispValue>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<ComboBox>
|
<ComboBox>
|
||||||
<define>CW.WK_PUPD_CTRL[3:2]</define>
|
<define>CW.WK_PUPD_CTRL[3:2]</define>
|
||||||
<value>3</value>
|
<value>0</value>
|
||||||
<dispValue>3</dispValue>
|
<dispValue>0</dispValue>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<ComboBox>
|
<ComboBox>
|
||||||
<define>CW.WK_PUPD_CTRL[5:4]</define>
|
<define>CW.WK_PUPD_CTRL[5:4]</define>
|
||||||
<value>3</value>
|
<value>0</value>
|
||||||
<dispValue>3</dispValue>
|
<dispValue>0</dispValue>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</ActiveElements>
|
</ActiveElements>
|
||||||
</icwpxml>
|
</icwpxml>
|
File diff suppressed because it is too large
Load Diff
@ -23,25 +23,11 @@
|
|||||||
#define TOUCH_KET_ON 1
|
#define TOUCH_KET_ON 1
|
||||||
#define TOUCH_KET_OFF 0
|
#define TOUCH_KET_OFF 0
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
TP_SlideDirection_NONE = 0,
|
|
||||||
TP_SlideDirection_ShortUP,
|
|
||||||
TP_SlideDirection_LongUP,
|
|
||||||
TP_SlideDirection_ShortDOWN,
|
|
||||||
TP_SlideDirection_LongDOWN,
|
|
||||||
TP_SlideDirection_ShortLEFT,
|
|
||||||
TP_SlideDirection_LongLEFT,
|
|
||||||
TP_SlideDirection_ShortRIGHT,
|
|
||||||
TP_SlideDirection_LongRIGHT
|
|
||||||
} TP_SlideDirection_Enum;
|
|
||||||
|
|
||||||
typedef enum{
|
typedef enum{
|
||||||
TOUCH_PANEL_NONE_EVENT = 0,
|
TOUCH_PANEL_NONE_EVENT = 0,
|
||||||
TOUCH_PANEL_PRESS_EVENT,
|
TOUCH_PANEL_PRESS_EVENT,
|
||||||
TOUCH_PANEL_RES_EVENT,
|
|
||||||
TOUCH_PANEL_MOVE_EVENT,
|
|
||||||
TOUCH_PANEL_BERR_EVENT
|
|
||||||
}TouchPanel_EventType;
|
}TouchPanel_EventType;
|
||||||
|
|
||||||
typedef enum{
|
typedef enum{
|
||||||
@ -51,24 +37,8 @@ typedef enum{
|
|||||||
}PanelPress_LevelType;
|
}PanelPress_LevelType;
|
||||||
|
|
||||||
|
|
||||||
typedef struct{
|
|
||||||
boolean Event;
|
|
||||||
uint32 keep_cycle;
|
|
||||||
TP_SlideDirection_Enum Direction;
|
|
||||||
}TouchSlideEvent_type;
|
|
||||||
|
|
||||||
typedef struct{
|
|
||||||
uint8 x_position;
|
|
||||||
uint8 y_position;
|
|
||||||
uint8 origin_x_pos;
|
|
||||||
uint8 origin_y_pos;
|
|
||||||
uint8 end_x_pos;
|
|
||||||
uint8 end_y_pos;
|
|
||||||
|
|
||||||
TouchPanel_EventType Event;
|
|
||||||
uint32 CheckCycle;
|
|
||||||
uint32 TouchCycle;
|
|
||||||
}TouchSurface_type;
|
|
||||||
|
|
||||||
typedef struct{
|
typedef struct{
|
||||||
uint8 convert_x;
|
uint8 convert_x;
|
||||||
@ -122,7 +92,7 @@ void TouchPanel_init(void);
|
|||||||
void GetSurface_Position(uint8 *x, uint8 *y);
|
void GetSurface_Position(uint8 *x, uint8 *y);
|
||||||
Buttons_SignalType TouchPanel_BtnSignalRead(Buttons_ChType ChId);
|
Buttons_SignalType TouchPanel_BtnSignalRead(Buttons_ChType ChId);
|
||||||
void TouchPanel_MainFunction(void);
|
void TouchPanel_MainFunction(void);
|
||||||
TP_SlideDirection_Enum TouchPanel_SlideEventRead(void);
|
|
||||||
Buttons_SignalType TouchSurface_XY_StsRead(void);
|
Buttons_SignalType TouchSurface_XY_StsRead(void);
|
||||||
PanelPress_LevelType TouchPanel_PressLevelRead(void);
|
PanelPress_LevelType TouchPanel_PressLevelRead(void);
|
||||||
boolean TouchSurface_is_TouchActive(void);
|
boolean TouchSurface_is_TouchActive(void);
|
||||||
|
@ -50,8 +50,8 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "peripheral/nvmctrl/plib_nvmctrl.h"
|
#include "peripheral/nvmctrl/plib_nvmctrl.h"
|
||||||
#include "peripheral/sercom/i2c_master/plib_sercom1_i2c_master.h"
|
#include "peripheral/sercom/i2c_master/plib_sercom1_i2c_master.h"
|
||||||
#include "peripheral/evsys/plib_evsys.h"
|
|
||||||
#include "peripheral/sercom/spi_master/plib_sercom0_spi_master.h"
|
#include "peripheral/sercom/spi_master/plib_sercom0_spi_master.h"
|
||||||
|
#include "peripheral/evsys/plib_evsys.h"
|
||||||
#include "peripheral/can/plib_can1.h"
|
#include "peripheral/can/plib_can1.h"
|
||||||
#include "peripheral/port/plib_port.h"
|
#include "peripheral/port/plib_port.h"
|
||||||
#include "peripheral/clock/plib_clock.h"
|
#include "peripheral/clock/plib_clock.h"
|
||||||
@ -60,9 +60,9 @@
|
|||||||
#include "peripheral/wdt/plib_wdt.h"
|
#include "peripheral/wdt/plib_wdt.h"
|
||||||
#include "peripheral/cmcc/plib_cmcc.h"
|
#include "peripheral/cmcc/plib_cmcc.h"
|
||||||
#include "peripheral/tc/plib_tc1.h"
|
#include "peripheral/tc/plib_tc1.h"
|
||||||
#include "touch/touch.h"
|
|
||||||
#include "peripheral/rtc/plib_rtc.h"
|
#include "peripheral/rtc/plib_rtc.h"
|
||||||
#include "peripheral/tc/plib_tc0.h"
|
#include "peripheral/tc/plib_tc0.h"
|
||||||
|
#include "touch/touch.h"
|
||||||
#include "peripheral/tc/plib_tc2.h"
|
#include "peripheral/tc/plib_tc2.h"
|
||||||
#include "peripheral/dac/plib_dac.h"
|
#include "peripheral/dac/plib_dac.h"
|
||||||
#include "peripheral/tcc/plib_tcc0.h"
|
#include "peripheral/tcc/plib_tcc0.h"
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
|
|
||||||
project: P417_SWTL
|
project: P417_SWTL
|
||||||
creation_date: 2024-07-03T23:36:01.380+08:00[Asia/Shanghai] # ISO 8601 format: https://www.w3.org/TR/NOTE-datetime
|
creation_date: 2024-12-02T14:05:58.826+08:00[Asia/Shanghai] # ISO 8601 format: https://www.w3.org/TR/NOTE-datetime
|
||||||
operating_system: Windows 10
|
operating_system: Windows 10
|
||||||
mcc_mode: IDE # [IDE|Standalone|Headless]
|
mcc_mode: IDE # [IDE|Standalone|Headless]
|
||||||
mcc_version: v5.5.1
|
mcc_version: v5.5.1
|
||||||
mcc_core_version: v5.7.1
|
mcc_core_version: v5.7.1
|
||||||
mplabx_version: v6.20 # if MPLAB X plugin only
|
mplabx_version: v6.20 # if MPLAB X plugin only
|
||||||
harmony_version: v1.5.2
|
harmony_version: v1.5.2
|
||||||
compiler: XC32 4.40
|
compiler: XC32 4.10
|
||||||
|
|
||||||
modules:
|
modules:
|
||||||
- {name: "csp", version: "v3.18.5"}
|
- {name: "csp", version: "v3.18.5"}
|
||||||
|
@ -140,10 +140,10 @@ void SYS_Initialize ( void* data )
|
|||||||
|
|
||||||
SERCOM1_I2C_Initialize();
|
SERCOM1_I2C_Initialize();
|
||||||
|
|
||||||
EVSYS_Initialize();
|
|
||||||
|
|
||||||
SERCOM0_SPI_Initialize();
|
SERCOM0_SPI_Initialize();
|
||||||
|
|
||||||
|
EVSYS_Initialize();
|
||||||
|
|
||||||
CAN1_Initialize();
|
CAN1_Initialize();
|
||||||
|
|
||||||
SYSTICK_TimerInitialize();
|
SYSTICK_TimerInitialize();
|
||||||
|
@ -71,12 +71,12 @@
|
|||||||
void PORT_Initialize(void)
|
void PORT_Initialize(void)
|
||||||
{
|
{
|
||||||
/************************** GROUP 0 Initialization *************************/
|
/************************** GROUP 0 Initialization *************************/
|
||||||
PORT_REGS->GROUP[0].PORT_DIR = 0x20024ccU;
|
PORT_REGS->GROUP[0].PORT_DIR = 0x20024c4U;
|
||||||
PORT_REGS->GROUP[0].PORT_OUT = 0x2000400U;
|
PORT_REGS->GROUP[0].PORT_OUT = 0x2000400U;
|
||||||
PORT_REGS->GROUP[0].PORT_PINCFG[0] = 0x1U;
|
PORT_REGS->GROUP[0].PORT_PINCFG[0] = 0x1U;
|
||||||
PORT_REGS->GROUP[0].PORT_PINCFG[1] = 0x1U;
|
PORT_REGS->GROUP[0].PORT_PINCFG[1] = 0x1U;
|
||||||
PORT_REGS->GROUP[0].PORT_PINCFG[2] = 0x1U;
|
PORT_REGS->GROUP[0].PORT_PINCFG[2] = 0x1U;
|
||||||
PORT_REGS->GROUP[0].PORT_PINCFG[3] = 0x0U;
|
PORT_REGS->GROUP[0].PORT_PINCFG[3] = 0x1U;
|
||||||
PORT_REGS->GROUP[0].PORT_PINCFG[4] = 0x1U;
|
PORT_REGS->GROUP[0].PORT_PINCFG[4] = 0x1U;
|
||||||
PORT_REGS->GROUP[0].PORT_PINCFG[5] = 0x1U;
|
PORT_REGS->GROUP[0].PORT_PINCFG[5] = 0x1U;
|
||||||
PORT_REGS->GROUP[0].PORT_PINCFG[6] = 0x1U;
|
PORT_REGS->GROUP[0].PORT_PINCFG[6] = 0x1U;
|
||||||
@ -98,7 +98,7 @@ void PORT_Initialize(void)
|
|||||||
PORT_REGS->GROUP[0].PORT_PINCFG[25] = 0x0U;
|
PORT_REGS->GROUP[0].PORT_PINCFG[25] = 0x0U;
|
||||||
|
|
||||||
PORT_REGS->GROUP[0].PORT_PMUX[0] = 0x33U;
|
PORT_REGS->GROUP[0].PORT_PMUX[0] = 0x33U;
|
||||||
PORT_REGS->GROUP[0].PORT_PMUX[1] = 0x1U;
|
PORT_REGS->GROUP[0].PORT_PMUX[1] = 0x11U;
|
||||||
PORT_REGS->GROUP[0].PORT_PMUX[2] = 0x41U;
|
PORT_REGS->GROUP[0].PORT_PMUX[2] = 0x41U;
|
||||||
PORT_REGS->GROUP[0].PORT_PMUX[3] = 0x14U;
|
PORT_REGS->GROUP[0].PORT_PMUX[3] = 0x14U;
|
||||||
PORT_REGS->GROUP[0].PORT_PMUX[4] = 0x22U;
|
PORT_REGS->GROUP[0].PORT_PMUX[4] = 0x22U;
|
||||||
@ -114,7 +114,7 @@ void PORT_Initialize(void)
|
|||||||
PORT_REGS->GROUP[1].PORT_DIR = 0x4000c004U;
|
PORT_REGS->GROUP[1].PORT_DIR = 0x4000c004U;
|
||||||
PORT_REGS->GROUP[1].PORT_PINCFG[0] = 0x3U;
|
PORT_REGS->GROUP[1].PORT_PINCFG[0] = 0x3U;
|
||||||
PORT_REGS->GROUP[1].PORT_PINCFG[1] = 0x1U;
|
PORT_REGS->GROUP[1].PORT_PINCFG[1] = 0x1U;
|
||||||
PORT_REGS->GROUP[1].PORT_PINCFG[2] = 0x1U;
|
PORT_REGS->GROUP[1].PORT_PINCFG[2] = 0x0U;
|
||||||
PORT_REGS->GROUP[1].PORT_PINCFG[3] = 0x3U;
|
PORT_REGS->GROUP[1].PORT_PINCFG[3] = 0x3U;
|
||||||
PORT_REGS->GROUP[1].PORT_PINCFG[4] = 0x1U;
|
PORT_REGS->GROUP[1].PORT_PINCFG[4] = 0x1U;
|
||||||
PORT_REGS->GROUP[1].PORT_PINCFG[5] = 0x1U;
|
PORT_REGS->GROUP[1].PORT_PINCFG[5] = 0x1U;
|
||||||
@ -131,7 +131,7 @@ void PORT_Initialize(void)
|
|||||||
PORT_REGS->GROUP[1].PORT_PINCFG[31] = 0x3U;
|
PORT_REGS->GROUP[1].PORT_PINCFG[31] = 0x3U;
|
||||||
|
|
||||||
PORT_REGS->GROUP[1].PORT_PMUX[0] = 0x11U;
|
PORT_REGS->GROUP[1].PORT_PMUX[0] = 0x11U;
|
||||||
PORT_REGS->GROUP[1].PORT_PMUX[1] = 0x11U;
|
PORT_REGS->GROUP[1].PORT_PMUX[1] = 0x10U;
|
||||||
PORT_REGS->GROUP[1].PORT_PMUX[2] = 0x11U;
|
PORT_REGS->GROUP[1].PORT_PMUX[2] = 0x11U;
|
||||||
PORT_REGS->GROUP[1].PORT_PMUX[3] = 0x11U;
|
PORT_REGS->GROUP[1].PORT_PMUX[3] = 0x11U;
|
||||||
PORT_REGS->GROUP[1].PORT_PMUX[4] = 0x11U;
|
PORT_REGS->GROUP[1].PORT_PMUX[4] = 0x11U;
|
||||||
|
@ -77,14 +77,9 @@
|
|||||||
#define INP_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 2U)) & 0x01U)
|
#define INP_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 2U)) & 0x01U)
|
||||||
#define INP_PIN PORT_PIN_PA02
|
#define INP_PIN PORT_PIN_PA02
|
||||||
|
|
||||||
/*** Macros for Power_AD_Ctrl pin ***/
|
/*** Macros for BL_SNS1 pin ***/
|
||||||
#define Power_AD_Ctrl_Set() (PORT_REGS->GROUP[0].PORT_OUTSET = ((uint32_t)1U << 3U))
|
#define BL_SNS1_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 3U)) & 0x01U)
|
||||||
#define Power_AD_Ctrl_Clear() (PORT_REGS->GROUP[0].PORT_OUTCLR = ((uint32_t)1U << 3U))
|
#define BL_SNS1_PIN PORT_PIN_PA03
|
||||||
#define Power_AD_Ctrl_Toggle() (PORT_REGS->GROUP[0].PORT_OUTTGL = ((uint32_t)1U << 3U))
|
|
||||||
#define Power_AD_Ctrl_OutputEnable() (PORT_REGS->GROUP[0].PORT_DIRSET = ((uint32_t)1U << 3U))
|
|
||||||
#define Power_AD_Ctrl_InputEnable() (PORT_REGS->GROUP[0].PORT_DIRCLR = ((uint32_t)1U << 3U))
|
|
||||||
#define Power_AD_Ctrl_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 3U)) & 0x01U)
|
|
||||||
#define Power_AD_Ctrl_PIN PORT_PIN_PA03
|
|
||||||
|
|
||||||
/*** Macros for AD_LDO pin ***/
|
/*** Macros for AD_LDO pin ***/
|
||||||
#define AD_LDO_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 4U)) & 0x01U)
|
#define AD_LDO_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 4U)) & 0x01U)
|
||||||
@ -94,25 +89,25 @@
|
|||||||
#define LD_OUT_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 5U)) & 0x01U)
|
#define LD_OUT_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 5U)) & 0x01U)
|
||||||
#define LD_OUT_PIN PORT_PIN_PB05
|
#define LD_OUT_PIN PORT_PIN_PB05
|
||||||
|
|
||||||
/*** Macros for BL_SNS1 pin ***/
|
/*** Macros for X1_SNS pin ***/
|
||||||
#define BL_SNS1_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 6U)) & 0x01U)
|
#define X1_SNS_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 6U)) & 0x01U)
|
||||||
#define BL_SNS1_PIN PORT_PIN_PB06
|
#define X1_SNS_PIN PORT_PIN_PB06
|
||||||
|
|
||||||
/*** Macros for Y2_SNS pin ***/
|
/*** Macros for X2_SNS pin ***/
|
||||||
#define Y2_SNS_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 7U)) & 0x01U)
|
#define X2_SNS_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 7U)) & 0x01U)
|
||||||
#define Y2_SNS_PIN PORT_PIN_PB07
|
#define X2_SNS_PIN PORT_PIN_PB07
|
||||||
|
|
||||||
/*** Macros for Y3_SNS pin ***/
|
/*** Macros for X3_SNS pin ***/
|
||||||
#define Y3_SNS_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 8U)) & 0x01U)
|
#define X3_SNS_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 8U)) & 0x01U)
|
||||||
#define Y3_SNS_PIN PORT_PIN_PB08
|
#define X3_SNS_PIN PORT_PIN_PB08
|
||||||
|
|
||||||
/*** Macros for BL_SNS2 pin ***/
|
/*** Macros for X4_SNS pin ***/
|
||||||
#define BL_SNS2_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 9U)) & 0x01U)
|
#define X4_SNS_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 9U)) & 0x01U)
|
||||||
#define BL_SNS2_PIN PORT_PIN_PB09
|
#define X4_SNS_PIN PORT_PIN_PB09
|
||||||
|
|
||||||
/*** Macros for Y5_SNS pin ***/
|
/*** Macros for X5_SNS pin ***/
|
||||||
#define Y5_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 4U)) & 0x01U)
|
#define X5_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 4U)) & 0x01U)
|
||||||
#define Y5_SNS_PIN PORT_PIN_PA04
|
#define X5_SNS_PIN PORT_PIN_PA04
|
||||||
|
|
||||||
/*** Macros for TJP_EN_PWM pin ***/
|
/*** Macros for TJP_EN_PWM pin ***/
|
||||||
#define TJP_EN_PWM_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 5U)) & 0x01U)
|
#define TJP_EN_PWM_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 5U)) & 0x01U)
|
||||||
@ -122,9 +117,9 @@
|
|||||||
#define CANCEL_EN_PWM_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 6U)) & 0x01U)
|
#define CANCEL_EN_PWM_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 6U)) & 0x01U)
|
||||||
#define CANCEL_EN_PWM_PIN PORT_PIN_PA06
|
#define CANCEL_EN_PWM_PIN PORT_PIN_PA06
|
||||||
|
|
||||||
/*** Macros for Y4_SNS pin ***/
|
/*** Macros for BL_SNS2 pin ***/
|
||||||
#define Y4_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 7U)) & 0x01U)
|
#define BL_SNS2_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 7U)) & 0x01U)
|
||||||
#define Y4_SNS_PIN PORT_PIN_PA07
|
#define BL_SNS2_PIN PORT_PIN_PA07
|
||||||
|
|
||||||
/*** Macros for MOSI pin ***/
|
/*** Macros for MOSI pin ***/
|
||||||
#define MOSI_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 8U)) & 0x01U)
|
#define MOSI_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 8U)) & 0x01U)
|
||||||
@ -190,25 +185,25 @@
|
|||||||
#define SDZ_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 13U)) & 0x01U)
|
#define SDZ_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 13U)) & 0x01U)
|
||||||
#define SDZ_PIN PORT_PIN_PA13
|
#define SDZ_PIN PORT_PIN_PA13
|
||||||
|
|
||||||
/*** Macros for X1_SNS pin ***/
|
/*** Macros for Y1_SNS pin ***/
|
||||||
#define X1_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 16U)) & 0x01U)
|
#define Y1_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 16U)) & 0x01U)
|
||||||
#define X1_SNS_PIN PORT_PIN_PA16
|
#define Y1_SNS_PIN PORT_PIN_PA16
|
||||||
|
|
||||||
/*** Macros for X2_SNS pin ***/
|
/*** Macros for Y2_SNS pin ***/
|
||||||
#define X2_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 17U)) & 0x01U)
|
#define Y2_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 17U)) & 0x01U)
|
||||||
#define X2_SNS_PIN PORT_PIN_PA17
|
#define Y2_SNS_PIN PORT_PIN_PA17
|
||||||
|
|
||||||
/*** Macros for X3_SNS pin ***/
|
/*** Macros for Y3_SNS pin ***/
|
||||||
#define X3_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 18U)) & 0x01U)
|
#define Y3_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 18U)) & 0x01U)
|
||||||
#define X3_SNS_PIN PORT_PIN_PA18
|
#define Y3_SNS_PIN PORT_PIN_PA18
|
||||||
|
|
||||||
/*** Macros for X4_SNS pin ***/
|
/*** Macros for Y4_SNS pin ***/
|
||||||
#define X4_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 19U)) & 0x01U)
|
#define Y4_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 19U)) & 0x01U)
|
||||||
#define X4_SNS_PIN PORT_PIN_PA19
|
#define Y4_SNS_PIN PORT_PIN_PA19
|
||||||
|
|
||||||
/*** Macros for X5_SNS pin ***/
|
/*** Macros for Y5_SNS pin ***/
|
||||||
#define X5_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 20U)) & 0x01U)
|
#define Y5_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 20U)) & 0x01U)
|
||||||
#define X5_SNS_PIN PORT_PIN_PA20
|
#define Y5_SNS_PIN PORT_PIN_PA20
|
||||||
|
|
||||||
/*** Macros for CAP_RES1_SNS pin ***/
|
/*** Macros for CAP_RES1_SNS pin ***/
|
||||||
#define CAP_RES1_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 21U)) & 0x01U)
|
#define CAP_RES1_SNS_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 21U)) & 0x01U)
|
||||||
@ -247,9 +242,14 @@
|
|||||||
#define CAP_TJP1_SNS_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 1U)) & 0x01U)
|
#define CAP_TJP1_SNS_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 1U)) & 0x01U)
|
||||||
#define CAP_TJP1_SNS_PIN PORT_PIN_PB01
|
#define CAP_TJP1_SNS_PIN PORT_PIN_PB01
|
||||||
|
|
||||||
/*** Macros for Y1_SNS pin ***/
|
/*** Macros for Power_AD_Ctrl pin ***/
|
||||||
#define Y1_SNS_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 2U)) & 0x01U)
|
#define Power_AD_Ctrl_Set() (PORT_REGS->GROUP[1].PORT_OUTSET = ((uint32_t)1U << 2U))
|
||||||
#define Y1_SNS_PIN PORT_PIN_PB02
|
#define Power_AD_Ctrl_Clear() (PORT_REGS->GROUP[1].PORT_OUTCLR = ((uint32_t)1U << 2U))
|
||||||
|
#define Power_AD_Ctrl_Toggle() (PORT_REGS->GROUP[1].PORT_OUTTGL = ((uint32_t)1U << 2U))
|
||||||
|
#define Power_AD_Ctrl_OutputEnable() (PORT_REGS->GROUP[1].PORT_DIRSET = ((uint32_t)1U << 2U))
|
||||||
|
#define Power_AD_Ctrl_InputEnable() (PORT_REGS->GROUP[1].PORT_DIRCLR = ((uint32_t)1U << 2U))
|
||||||
|
#define Power_AD_Ctrl_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 2U)) & 0x01U)
|
||||||
|
#define Power_AD_Ctrl_PIN PORT_PIN_PB02
|
||||||
|
|
||||||
/*** Macros for CAP_RES2_SNS pin ***/
|
/*** Macros for CAP_RES2_SNS pin ***/
|
||||||
#define CAP_RES2_SNS_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 3U)) & 0x01U)
|
#define CAP_RES2_SNS_Get() (((PORT_REGS->GROUP[1].PORT_IN >> 3U)) & 0x01U)
|
||||||
|
@ -2,17 +2,17 @@ Pin Number,Pin ID,Custom Name,Function,Mode, Direction,Latch,Pull Up,Pull Down,D
|
|||||||
1,PA00,SDA,SERCOM1_PAD0,Digital,High Impedance,n/a,No,No,NORMAL
|
1,PA00,SDA,SERCOM1_PAD0,Digital,High Impedance,n/a,No,No,NORMAL
|
||||||
2,PA01,SCL,SERCOM1_PAD1,Digital,High Impedance,n/a,No,No,NORMAL
|
2,PA01,SCL,SERCOM1_PAD1,Digital,High Impedance,n/a,No,No,NORMAL
|
||||||
3,PA02,INP,DAC_VOUT0,Analog,Out,Low,,,NORMAL
|
3,PA02,INP,DAC_VOUT0,Analog,Out,Low,,,NORMAL
|
||||||
4,PA03,Power_AD_Ctrl,GPIO,Digital,Out,Low,,,NORMAL
|
4,PA03,BL_SNS1,ADC0_AIN1/X0/Y0/VREFA,Analog,High Impedance,n/a,,,NORMAL
|
||||||
5,PB04,AD_LDO,ADC1_AIN6,Analog,High Impedance,n/a,,,NORMAL
|
5,PB04,AD_LDO,ADC1_AIN6,Analog,High Impedance,n/a,,,NORMAL
|
||||||
6,PB05,LD_OUT,ADC1_AIN7,Analog,High Impedance,n/a,,,NORMAL
|
6,PB05,LD_OUT,ADC1_AIN7,Analog,High Impedance,n/a,,,NORMAL
|
||||||
9,PB06,BL_SNS1,ADC1_AIN8,Analog,High Impedance,n/a,,,NORMAL
|
9,PB06,X1_SNS,ADC1_AIN8,Analog,High Impedance,n/a,,,NORMAL
|
||||||
10,PB07,Y2_SNS,ADC0_X25/Y25,Analog,High Impedance,n/a,,,NORMAL
|
10,PB07,X2_SNS,ADC0_X25/Y25,Analog,High Impedance,n/a,,,NORMAL
|
||||||
11,PB08,Y3_SNS,ADC0_AIN2/X1/Y1,Analog,High Impedance,n/a,,,NORMAL
|
11,PB08,X3_SNS,ADC0_AIN2/X1/Y1,Analog,High Impedance,n/a,,,NORMAL
|
||||||
12,PB09,BL_SNS2,ADC1_AIN1,Analog,High Impedance,n/a,,,NORMAL
|
12,PB09,X4_SNS,ADC0_AIN3/X2/Y2,Analog,High Impedance,n/a,,,NORMAL
|
||||||
13,PA04,Y5_SNS,ADC0_AIN4/X3/Y3/VREFB,Analog,High Impedance,n/a,,,NORMAL
|
13,PA04,X5_SNS,ADC0_AIN4/X3/Y3/VREFB,Analog,High Impedance,n/a,,,NORMAL
|
||||||
14,PA05,TJP_EN_PWM,TC0_WO1,Digital,High Impedance,n/a,No,No,NORMAL
|
14,PA05,TJP_EN_PWM,TC0_WO1,Digital,High Impedance,n/a,No,No,NORMAL
|
||||||
15,PA06,CANCEL_EN_PWM,TC1_WO0,Digital,Out,Low,,,NORMAL
|
15,PA06,CANCEL_EN_PWM,TC1_WO0,Digital,Out,Low,,,NORMAL
|
||||||
16,PA07,Y4_SNS,ADC0_AIN7/X5/Y5,Analog,Out,Low,,,NORMAL
|
16,PA07,BL_SNS2,ADC0_AIN7/X5/Y5,Analog,Out,Low,,,NORMAL
|
||||||
17,PA08,MOSI,SERCOM0_PAD0,Digital,High Impedance,n/a,No,No,NORMAL
|
17,PA08,MOSI,SERCOM0_PAD0,Digital,High Impedance,n/a,No,No,NORMAL
|
||||||
18,PA09,CLK,SERCOM0_PAD1,Digital,High Impedance,n/a,No,No,NORMAL
|
18,PA09,CLK,SERCOM0_PAD1,Digital,High Impedance,n/a,No,No,NORMAL
|
||||||
19,PA10,Spi_Software_Trigger,GPIO,Digital,Out,High,,,NORMAL
|
19,PA10,Spi_Software_Trigger,GPIO,Digital,Out,High,,,NORMAL
|
||||||
@ -27,13 +27,13 @@ Pin Number,Pin ID,Custom Name,Function,Mode, Direction,Latch,Pull Up,Pull Down,D
|
|||||||
30,PA13,SDZ,GPIO,Digital,Out,Low,,,NORMAL
|
30,PA13,SDZ,GPIO,Digital,Out,Low,,,NORMAL
|
||||||
31,PA14,,Available,,,,,,NORMAL
|
31,PA14,,Available,,,,,,NORMAL
|
||||||
32,PA15,,Available,,,,,,NORMAL
|
32,PA15,,Available,,,,,,NORMAL
|
||||||
35,PA16,X1_SNS,ADC0_X10/Y10,Analog,High Impedance,n/a,,,NORMAL
|
35,PA16,Y1_SNS,ADC0_X10/Y10,Analog,High Impedance,n/a,,,NORMAL
|
||||||
36,PA17,X2_SNS,ADC0_X11/Y11,Analog,High Impedance,n/a,,,NORMAL
|
36,PA17,Y2_SNS,ADC0_X11/Y11,Analog,High Impedance,n/a,,,NORMAL
|
||||||
37,PA18,X3_SNS,ADC0_X12/Y12,Analog,High Impedance,n/a,,,NORMAL
|
37,PA18,Y3_SNS,ADC0_X12/Y12,Analog,High Impedance,n/a,,,NORMAL
|
||||||
38,PA19,X4_SNS,ADC0_X13/Y13,Analog,High Impedance,n/a,,,NORMAL
|
38,PA19,Y4_SNS,ADC0_X13/Y13,Analog,High Impedance,n/a,,,NORMAL
|
||||||
39,PB16,,Available,,,,,,NORMAL
|
39,PB16,,Available,,,,,,NORMAL
|
||||||
40,PB17,,Available,,,,,,NORMAL
|
40,PB17,,Available,,,,,,NORMAL
|
||||||
41,PA20,X5_SNS,ADC0_X14/Y14,Analog,High Impedance,n/a,,,NORMAL
|
41,PA20,Y5_SNS,ADC0_X14/Y14,Analog,High Impedance,n/a,,,NORMAL
|
||||||
42,PA21,CAP_RES1_SNS,ADC0_X15/Y15,Analog,High Impedance,n/a,,,NORMAL
|
42,PA21,CAP_RES1_SNS,ADC0_X15/Y15,Analog,High Impedance,n/a,,,NORMAL
|
||||||
43,PA22,CAP_CANCEL2_SNS,ADC0_X16/Y16,Analog,High Impedance,n/a,,,NORMAL
|
43,PA22,CAP_CANCEL2_SNS,ADC0_X16/Y16,Analog,High Impedance,n/a,,,NORMAL
|
||||||
44,PA23,CAP_CANCEL1_SNS,ADC0_X17/Y17,Analog,High Impedance,n/a,,,NORMAL
|
44,PA23,CAP_CANCEL1_SNS,ADC0_X17/Y17,Analog,High Impedance,n/a,,,NORMAL
|
||||||
@ -48,5 +48,5 @@ Pin Number,Pin ID,Custom Name,Function,Mode, Direction,Latch,Pull Up,Pull Down,D
|
|||||||
60,PB31,INTB_PRSS,EIC_EXTINT15,Digital,In,n/a,No,No,NORMAL
|
60,PB31,INTB_PRSS,EIC_EXTINT15,Digital,In,n/a,No,No,NORMAL
|
||||||
61,PB00,CAP_TJP2_SNS,ADC0_AIN12/X30/Y30,Analog,In,n/a,,,NORMAL
|
61,PB00,CAP_TJP2_SNS,ADC0_AIN12/X30/Y30,Analog,In,n/a,,,NORMAL
|
||||||
62,PB01,CAP_TJP1_SNS,ADC0_AIN13/X31/Y31,Analog,High Impedance,n/a,,,NORMAL
|
62,PB01,CAP_TJP1_SNS,ADC0_AIN13/X31/Y31,Analog,High Impedance,n/a,,,NORMAL
|
||||||
63,PB02,Y1_SNS,ADC0_AIN14/X20/Y20,Analog,Out,Low,,,NORMAL
|
63,PB02,Power_AD_Ctrl,GPIO,Digital,Out,Low,,,NORMAL
|
||||||
64,PB03,CAP_RES2_SNS,ADC0_AIN15/X21/Y21,Analog,In,n/a,,,NORMAL
|
64,PB03,CAP_RES2_SNS,ADC0_AIN15/X21/Y21,Analog,In,n/a,,,NORMAL
|
||||||
|
|
@ -64,7 +64,7 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
|
|||||||
* Range: 1 to 255.
|
* Range: 1 to 255.
|
||||||
* Default value: 20.
|
* Default value: 20.
|
||||||
*/
|
*/
|
||||||
#define DEF_TOUCH_MEASUREMENT_PERIOD_MS 4u
|
#define DEF_TOUCH_MEASUREMENT_PERIOD_MS 18u
|
||||||
|
|
||||||
/* Defines the Type of sensor
|
/* Defines the Type of sensor
|
||||||
* Default value: NODE_MUTUAL.
|
* Default value: NODE_MUTUAL.
|
||||||
@ -118,67 +118,67 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
|
|||||||
|
|
||||||
#define NODE_0_PARAMS \
|
#define NODE_0_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(31), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(31), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_1_PARAMS \
|
#define NODE_1_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(15), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(15), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_2_PARAMS \
|
#define NODE_2_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(17), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(17), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_3_PARAMS \
|
#define NODE_3_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(20), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(24), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_4_PARAMS \
|
#define NODE_4_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(25), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(25), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_5_PARAMS \
|
#define NODE_5_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(1), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(1), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_6_PARAMS \
|
#define NODE_6_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(5), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(2), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_7_PARAMS \
|
#define NODE_7_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(3), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(3), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_8_PARAMS \
|
#define NODE_8_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(10), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_4), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(10), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_4), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_9_PARAMS \
|
#define NODE_9_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(11), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_4), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(11), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_4), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_10_PARAMS \
|
#define NODE_10_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(12), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_4), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(12), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_4), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_11_PARAMS \
|
#define NODE_11_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(13), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_4), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(13), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_4), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_12_PARAMS \
|
#define NODE_12_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(14), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_4), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(14), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_4), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_13_PARAMS \
|
#define NODE_13_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(30), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(30), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_14_PARAMS \
|
#define NODE_14_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(21), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(21), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
#define NODE_15_PARAMS \
|
#define NODE_15_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
X_NONE, Y(16), 0,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_32 \
|
X_NONE, Y(16), 8,(uint8_t)PRSC_DIV_SEL_8, NODE_GAIN(GAIN_1, GAIN_8), (uint8_t)FILTER_LEVEL_16 \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************/
|
/**********************************************************/
|
||||||
@ -196,97 +196,97 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
|
|||||||
|
|
||||||
#define KEY_0_PARAMS \
|
#define KEY_0_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
48u, (uint8_t)HYST_12_5, (uint8_t)NO_AKS_GROUP \
|
59u, (uint8_t)RECAL_50, (uint8_t)NO_AKS_GROUP \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_1_PARAMS \
|
#define KEY_1_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
48u, (uint8_t)HYST_12_5, (uint8_t)NO_AKS_GROUP \
|
59u, (uint8_t)RECAL_50, (uint8_t)NO_AKS_GROUP \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_2_PARAMS \
|
#define KEY_2_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
54u, (uint8_t)HYST_12_5, (uint8_t)NO_AKS_GROUP \
|
52u, (uint8_t)RECAL_50, (uint8_t)NO_AKS_GROUP \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_3_PARAMS \
|
#define KEY_3_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
61u, (uint8_t)HYST_12_5, (uint8_t)AKS_GROUP_1 \
|
62u, (uint8_t)RECAL_50, (uint8_t)AKS_GROUP_1 \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_4_PARAMS \
|
#define KEY_4_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
60u, (uint8_t)HYST_12_5, (uint8_t)AKS_GROUP_1 \
|
60u, (uint8_t)RECAL_50, (uint8_t)AKS_GROUP_1 \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_5_PARAMS \
|
#define KEY_5_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
57u, (uint8_t)HYST_12_5, (uint8_t)AKS_GROUP_1 \
|
62u, (uint8_t)RECAL_50, (uint8_t)AKS_GROUP_1 \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_6_PARAMS \
|
#define KEY_6_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
63u, (uint8_t)HYST_12_5, (uint8_t)AKS_GROUP_1 \
|
64u, (uint8_t)RECAL_50, (uint8_t)AKS_GROUP_1 \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_7_PARAMS \
|
#define KEY_7_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
72u, (uint8_t)HYST_12_5, (uint8_t)AKS_GROUP_1 \
|
60u, (uint8_t)RECAL_50, (uint8_t)AKS_GROUP_1 \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_8_PARAMS \
|
#define KEY_8_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
49u, (uint8_t)HYST_12_5, (uint8_t)AKS_GROUP_1 \
|
56u, (uint8_t)RECAL_50, (uint8_t)AKS_GROUP_1 \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_9_PARAMS \
|
#define KEY_9_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
54u, (uint8_t)HYST_12_5, (uint8_t)AKS_GROUP_1 \
|
59u, (uint8_t)RECAL_50, (uint8_t)AKS_GROUP_1 \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_10_PARAMS \
|
#define KEY_10_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
47u, (uint8_t)HYST_12_5, (uint8_t)AKS_GROUP_1 \
|
57u, (uint8_t)RECAL_50, (uint8_t)AKS_GROUP_1 \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_11_PARAMS \
|
#define KEY_11_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
55u, (uint8_t)HYST_12_5, (uint8_t)AKS_GROUP_1 \
|
59u, (uint8_t)RECAL_50, (uint8_t)AKS_GROUP_1 \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_12_PARAMS \
|
#define KEY_12_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
59u, (uint8_t)HYST_12_5, (uint8_t)AKS_GROUP_1 \
|
59u, (uint8_t)RECAL_50, (uint8_t)AKS_GROUP_1 \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_13_PARAMS \
|
#define KEY_13_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
48u, (uint8_t)HYST_12_5, (uint8_t)NO_AKS_GROUP \
|
54u, (uint8_t)RECAL_50, (uint8_t)NO_AKS_GROUP \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_14_PARAMS \
|
#define KEY_14_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
48u, (uint8_t)HYST_12_5, (uint8_t)NO_AKS_GROUP \
|
58u, (uint8_t)RECAL_50, (uint8_t)NO_AKS_GROUP \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define KEY_15_PARAMS \
|
#define KEY_15_PARAMS \
|
||||||
{ \
|
{ \
|
||||||
60u, (uint8_t)HYST_12_5, (uint8_t)NO_AKS_GROUP \
|
52u, (uint8_t)RECAL_50, (uint8_t)NO_AKS_GROUP \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -301,13 +301,13 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
|
|||||||
* Range: 0 to 255.
|
* Range: 0 to 255.
|
||||||
* Default value: 5.
|
* Default value: 5.
|
||||||
*/
|
*/
|
||||||
#define DEF_ANTI_TCH_DET_INT 3u
|
#define DEF_ANTI_TCH_DET_INT 0u
|
||||||
|
|
||||||
/* Threshold beyond with automatic sensor recalibration is initiated.
|
/* Threshold beyond with automatic sensor recalibration is initiated.
|
||||||
* Range: RECAL_100/ RECAL_50 / RECAL_25 / RECAL_12_5 / RECAL_6_25 / MAX_RECAL
|
* Range: RECAL_100/ RECAL_50 / RECAL_25 / RECAL_12_5 / RECAL_6_25 / MAX_RECAL
|
||||||
* Default value: RECAL_100.
|
* Default value: RECAL_100.
|
||||||
*/
|
*/
|
||||||
#define DEF_ANTI_TCH_RECAL_THRSHLD (uint8_t)RECAL_50
|
#define DEF_ANTI_TCH_RECAL_THRSHLD (uint8_t)RECAL_100
|
||||||
|
|
||||||
/* Rate at which sensor reference value is adjusted towards sensor signal value
|
/* Rate at which sensor reference value is adjusted towards sensor signal value
|
||||||
* when signal value is greater than reference.
|
* when signal value is greater than reference.
|
||||||
@ -342,7 +342,7 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
|
|||||||
* Range: 0-255
|
* Range: 0-255
|
||||||
* Default value: 0
|
* Default value: 0
|
||||||
*/
|
*/
|
||||||
#define DEF_MAX_ON_DURATION 250u
|
#define DEF_MAX_ON_DURATION 0u
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************/
|
/**********************************************************/
|
||||||
@ -397,7 +397,7 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
|
|||||||
* The minimum contact size measurement for persistent contact tracking.
|
* The minimum contact size measurement for persistent contact tracking.
|
||||||
* Contact size is the sum of neighbouring keys' touch deltas forming the touch contact.
|
* Contact size is the sum of neighbouring keys' touch deltas forming the touch contact.
|
||||||
*/
|
*/
|
||||||
#define SURFACE_CS_MIN_CONTACT 140u
|
#define SURFACE_CS_MIN_CONTACT 120u
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************/
|
/**********************************************************/
|
||||||
|
@ -15,7 +15,8 @@ extern forcesnsr_RxReg_un_type forcesnsr_reg_state_un_bak;
|
|||||||
static volatile STATE_UINT8 forcedetect_btn_val;
|
static volatile STATE_UINT8 forcedetect_btn_val;
|
||||||
detectforce_Reg_Cfg_Main_Str_typ detectforce_Reg_Str;
|
detectforce_Reg_Cfg_Main_Str_typ detectforce_Reg_Str;
|
||||||
|
|
||||||
|
static uint8_t press_allowed_send_signal_flag = 0;
|
||||||
|
static uint16_t send_signal_flag_count = 0;
|
||||||
/***************************static function define end ************************************/
|
/***************************static function define end ************************************/
|
||||||
/*combind 8bit and 4bit data to uint16
|
/*combind 8bit and 4bit data to uint16
|
||||||
*/
|
*/
|
||||||
@ -73,6 +74,22 @@ void forcedetect_MainTask(void)
|
|||||||
detectforce_Reg_Str.btn_state = FALSE;
|
detectforce_Reg_Str.btn_state = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (detectforce_Reg_Str.raw > 50 && detectforce_Reg_Str.raw < 2048)
|
||||||
|
{
|
||||||
|
press_allowed_send_signal_flag = 1;
|
||||||
|
send_signal_flag_count = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (send_signal_flag_count < 50)//2ms*50
|
||||||
|
{
|
||||||
|
send_signal_flag_count++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
press_allowed_send_signal_flag = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/***************************main function define end ************************************/
|
/***************************main function define end ************************************/
|
||||||
@ -106,3 +123,7 @@ STATE_UINT8 Get_forcedetect_preload_value(void)
|
|||||||
return detectforce_Reg_Str.preload;
|
return detectforce_Reg_Str.preload;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATE_UINT8 Get_forcedetect_allowed_send_flag(void)
|
||||||
|
{
|
||||||
|
return press_allowed_send_signal_flag;
|
||||||
|
}
|
@ -63,6 +63,8 @@ extern STATE_UINT8 Get_forcedetect_SNSERR_value(void);
|
|||||||
|
|
||||||
extern STATE_UINT8 Get_forcedetect_preload_value(void);
|
extern STATE_UINT8 Get_forcedetect_preload_value(void);
|
||||||
|
|
||||||
|
extern STATE_UINT8 Get_forcedetect_allowed_send_flag(void);
|
||||||
|
|
||||||
/***************************extern function end************************************/
|
/***************************extern function end************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +53,6 @@ uint8_t Test_frame_On = 0;
|
|||||||
uint8_t SDZ_init_flag = 0;
|
uint8_t SDZ_init_flag = 0;
|
||||||
uint8_t SDZ_first_delay = 0;
|
uint8_t SDZ_first_delay = 0;
|
||||||
|
|
||||||
|
|
||||||
void OS_TimerCallback(uintptr_t context)
|
void OS_TimerCallback(uintptr_t context)
|
||||||
{
|
{
|
||||||
SysTick_Elapse++;
|
SysTick_Elapse++;
|
||||||
@ -86,7 +85,8 @@ uint16_t adc[ADC1_CH_MAX] = {0};
|
|||||||
|
|
||||||
void ADC1_ConversionCallback(ADC_STATUS status, uintptr_t context)
|
void ADC1_ConversionCallback(ADC_STATUS status, uintptr_t context)
|
||||||
{
|
{
|
||||||
if(status == ADC_STATUS_RESRDY) {
|
if (status == ADC_STATUS_RESRDY)
|
||||||
|
{
|
||||||
adc_result = ADC1_ConversionResultGet();
|
adc_result = ADC1_ConversionResultGet();
|
||||||
// adc[adc_ch_sel - 1] = adc_result & 0xFFF;
|
// adc[adc_ch_sel - 1] = adc_result & 0xFFF;
|
||||||
adc[adc_ch_sel] = adc_result & 0xFFF;
|
adc[adc_ch_sel] = adc_result & 0xFFF;
|
||||||
@ -106,15 +106,10 @@ void ADC1_ConversionCallback (ADC_STATUS status, uintptr_t context)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//adc_ch_sel++;
|
|
||||||
//if (adc_ch_sel > ADC1_CH_MAX) {
|
|
||||||
// adc_ch_sel = ADC1_CH_AD_LDO_SNS + 1;
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* CAN1 */
|
/* CAN1 */
|
||||||
bool Can1BusErrFlag = false;
|
bool Can1BusErrFlag = false;
|
||||||
uint8_t Can1MessageRAM[CAN1_MESSAGE_RAM_CONFIG_SIZE] __attribute__((aligned(32)));
|
uint8_t Can1MessageRAM[CAN1_MESSAGE_RAM_CONFIG_SIZE] __attribute__((aligned(32)));
|
||||||
@ -159,8 +154,8 @@ uint8_t CanBufQueryDataByte(uint8_t hdl, uint8_t index)
|
|||||||
void CAN_Rx_FIFO0_CALLBACK(uint8_t numberOfMessage, uintptr_t context)
|
void CAN_Rx_FIFO0_CALLBACK(uint8_t numberOfMessage, uintptr_t context)
|
||||||
{
|
{
|
||||||
uint8_t MessageNumer = 0;
|
uint8_t MessageNumer = 0;
|
||||||
CAN1_MessageReceiveFifo(CAN_RX_FIFO_0, numberOfMessage, (CAN_RX_BUFFER *)canRxBuffer);
|
CAN1_MessageReceiveFifo(CAN_RX_FIFO_0, numberOfMessage, (CAN_RX_BUFFER *)(uintptr_t)canRxBuffer);
|
||||||
CanRxBuf_t = (CAN_RX_BUFFER *)canRxBuffer;
|
CanRxBuf_t = (CAN_RX_BUFFER *)(uintptr_t)canRxBuffer;
|
||||||
for (; MessageNumer < numberOfMessage; MessageNumer++)
|
for (; MessageNumer < numberOfMessage; MessageNumer++)
|
||||||
{
|
{
|
||||||
Received_buf[MessageNumer].id = READ_ID(CanRxBuf_t[MessageNumer].id);
|
Received_buf[MessageNumer].id = READ_ID(CanRxBuf_t[MessageNumer].id);
|
||||||
@ -180,10 +175,11 @@ void CanTx(t_can_handler can_handler, bool notif, uint32_t idtp, uint16_t len, t
|
|||||||
uint8_t loop_count = 0;
|
uint8_t loop_count = 0;
|
||||||
|
|
||||||
memset(canTxBuffer, 0x00, CAN1_TX_FIFO_BUFFER_ELEMENT_SIZE);
|
memset(canTxBuffer, 0x00, CAN1_TX_FIFO_BUFFER_ELEMENT_SIZE);
|
||||||
CanTxBuffer = (CAN_TX_BUFFER *)canTxBuffer;
|
CanTxBuffer = (CAN_TX_BUFFER *)(uintptr_t)canTxBuffer;
|
||||||
CanTxBuffer->id = WRITE_ID(idtp);
|
CanTxBuffer->id = WRITE_ID(idtp);
|
||||||
CanTxBuffer->dlc = len;
|
CanTxBuffer->dlc = len;
|
||||||
for (loop_count = 0; loop_count < len; loop_count++){
|
for (loop_count = 0; loop_count < len; loop_count++)
|
||||||
|
{
|
||||||
CanTxBuffer->data[loop_count] = can_data[loop_count];
|
CanTxBuffer->data[loop_count] = can_data[loop_count];
|
||||||
}
|
}
|
||||||
if (CAN1_MessageTransmitFifo(1, CanTxBuffer) == true)
|
if (CAN1_MessageTransmitFifo(1, CanTxBuffer) == true)
|
||||||
@ -195,14 +191,15 @@ void CanTx(t_can_handler can_handler, bool notif, uint32_t idtp, uint16_t len, t
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
uint8_t Msg30_timeout_flag = 0;
|
||||||
void IhuPrivateDHUCanFr01_CALLBACK(void)
|
void IhuPrivateDHUCanFr01_CALLBACK(void)
|
||||||
{
|
{
|
||||||
;
|
Msg30_timeout_flag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IhuPrivateDHUCanFr01_Timeout_CALLBACK(void)
|
void IhuPrivateDHUCanFr01_Timeout_CALLBACK(void)
|
||||||
{
|
{
|
||||||
;
|
Msg30_timeout_flag = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// *****************************************************************************
|
// *****************************************************************************
|
||||||
@ -211,6 +208,37 @@ void IhuPrivateDHUCanFr01_Timeout_CALLBACK(void)
|
|||||||
// *****************************************************************************
|
// *****************************************************************************
|
||||||
// *****************************************************************************
|
// *****************************************************************************
|
||||||
static uint32_t status = 0;
|
static uint32_t status = 0;
|
||||||
|
uint8_t g_SBC_STATUS[8] = {0};
|
||||||
|
|
||||||
|
void GetResetSource(void)
|
||||||
|
{
|
||||||
|
uint8_t reset_source_buf[25];
|
||||||
|
g_SBC_STATUS[0] = (uint8_t)sbc_read_reg(SBC_SUP_STAT_2);
|
||||||
|
g_SBC_STATUS[1] = (uint8_t)sbc_read_reg(SBC_SUP_STAT_1);
|
||||||
|
g_SBC_STATUS[2] = (uint8_t)sbc_read_reg(SBC_DEV_STAT);
|
||||||
|
g_SBC_STATUS[3] = RSTC_REGS->RSTC_RCAUSE;
|
||||||
|
g_SBC_STATUS[4] = RSTC_REGS->RSTC_BKUPEXIT;
|
||||||
|
g_SBC_STATUS[5] = 0x00;
|
||||||
|
g_SBC_STATUS[6] = 0x00;
|
||||||
|
g_SBC_STATUS[7] = 0x00;
|
||||||
|
CanTx(0, true, 0x420, 8, g_SBC_STATUS);
|
||||||
|
if (g_SBC_STATUS[1] == 0x80 && g_SBC_STATUS[3] == 0x01)
|
||||||
|
{
|
||||||
|
//正常上电
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//异常复位
|
||||||
|
SmartEE_Read(0x400,reset_source_buf,20);
|
||||||
|
reset_source_buf[20] = g_SBC_STATUS[0];
|
||||||
|
reset_source_buf[21] = g_SBC_STATUS[1];
|
||||||
|
reset_source_buf[22] = g_SBC_STATUS[2];
|
||||||
|
reset_source_buf[23] = g_SBC_STATUS[3];
|
||||||
|
reset_source_buf[24] = g_SBC_STATUS[4];
|
||||||
|
SmartEE_Write(0x400,&reset_source_buf[5],20);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
@ -238,6 +266,8 @@ int main ( void )
|
|||||||
|
|
||||||
forcedetect_Init();
|
forcedetect_Init();
|
||||||
TouchPanel_init();
|
TouchPanel_init();
|
||||||
|
// sbc_write_reg(SBC_M_S_CTRL,0x18,0);
|
||||||
|
|
||||||
Tle9263_Init();
|
Tle9263_Init();
|
||||||
// touch_init();//test:11ms
|
// touch_init();//test:11ms
|
||||||
// sbc_wd_trigger();
|
// sbc_wd_trigger();
|
||||||
@ -248,7 +278,6 @@ int main ( void )
|
|||||||
|
|
||||||
ADC1_ConversionStart();
|
ADC1_ConversionStart();
|
||||||
|
|
||||||
|
|
||||||
P417_SWTL_App_initialize();
|
P417_SWTL_App_initialize();
|
||||||
TC0_CompareStart();
|
TC0_CompareStart();
|
||||||
TC1_CompareStart();
|
TC1_CompareStart();
|
||||||
@ -260,27 +289,22 @@ int main ( void )
|
|||||||
InicialitzaIso15765_3Task();
|
InicialitzaIso15765_3Task();
|
||||||
Dem_Init();
|
Dem_Init();
|
||||||
UDS_DID_initNVM();
|
UDS_DID_initNVM();
|
||||||
PORT_PinWrite(PORT_PIN_PA03,1);//battery voltage detection on
|
PORT_PinWrite(PORT_PIN_PB02, 1); // battery voltage detection onPB02
|
||||||
PORT_PinWrite(PORT_PIN_PA13, 0); /*init turn off SDZ*/
|
PORT_PinWrite(PORT_PIN_PA13, 0); /*init turn off SDZ*/
|
||||||
SmartEE_Read(0x783, &Test_frame_On, 1);
|
SmartEE_Read(0x783, &Test_frame_On, 1);
|
||||||
if (Test_frame_On > 1)
|
if (Test_frame_On > 1)
|
||||||
{
|
{
|
||||||
Test_frame_On = 1;
|
Test_frame_On = 1;
|
||||||
}
|
}
|
||||||
|
GetResetSource();
|
||||||
Fuction_State = Function_State_A;
|
Fuction_State = Function_State_A;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
/* Maintain state machines of all polled MPLAB Harmony modules. */
|
/* Maintain state machines of all polled MPLAB Harmony modules. */
|
||||||
SYS_Tasks();
|
SYS_Tasks();
|
||||||
// ADC1_ChannelSelect(ADC_POSINPUT_AIN6, ADC_NEGINPUT_GND);
|
// ADC1_ChannelSelect(ADC_POSINPUT_AIN6, ADC_NEGINPUT_GND);
|
||||||
|
|
||||||
// ADC1_ConversionStart();
|
// ADC1_ConversionStart();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!(loop_counter % 2))
|
if (!(loop_counter % 2))
|
||||||
{
|
{
|
||||||
//(void)TCC0_PWM24bitDutySet(TCC0_CHANNEL0, duty);
|
//(void)TCC0_PWM24bitDutySet(TCC0_CHANNEL0, duty);
|
||||||
@ -313,24 +337,21 @@ int main ( void )
|
|||||||
|
|
||||||
// SBC VCC2 always on Setting
|
// SBC VCC2 always on Setting
|
||||||
sbc_write_reg(SBC_M_S_CTRL, 0x18, 0);
|
sbc_write_reg(SBC_M_S_CTRL, 0x18, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(loop_counter % 5))
|
if (!(loop_counter % 5))
|
||||||
{
|
{
|
||||||
FunctionState_Task();
|
FunctionState_Task();
|
||||||
Sys_Diag_Detcet_Task();
|
Sys_Diag_Detcet_Task();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check CAN Status */
|
/* Check CAN Status */
|
||||||
status = CAN1_ErrorGet();
|
status = CAN1_ErrorGet();
|
||||||
|
|
||||||
WDT_Clear();
|
WDT_Clear();
|
||||||
//if(Fuction_State == Function_State_A)
|
|
||||||
//{
|
|
||||||
P417_SWTL_App_step();
|
P417_SWTL_App_step();
|
||||||
//}
|
|
||||||
CyclicTskSchM_TimerSync();
|
CyclicTskSchM_TimerSync();
|
||||||
loop_counter++;
|
loop_counter++;
|
||||||
}
|
}
|
||||||
@ -340,8 +361,6 @@ int main ( void )
|
|||||||
return (EXIT_FAILURE);
|
return (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
End of File
|
End of File
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user