先暂存一下
This commit is contained in:
parent
810778cfd4
commit
cdb8c62267
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BLE_TYQ_BJQ_CH584M",
|
||||||
|
"path": "../"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"mrs.workspace.type": "project",
|
||||||
|
"files.associations": {
|
||||||
|
"*.c": "c",
|
||||||
|
"*.h": "cpp",
|
||||||
|
"*.hxx": "cpp",
|
||||||
|
"*.hpp": "cpp",
|
||||||
|
"*.c++": "cpp",
|
||||||
|
"*.cpp": "cpp",
|
||||||
|
"*.cxx": "cpp",
|
||||||
|
"*.cc": "cpp",
|
||||||
|
"*.hh": "cpp",
|
||||||
|
"*.h++": "cpp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "mrs-debugger",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "BLE_TYQ_BJQ_CH584M",
|
||||||
|
"cwd": "d:\\SXDT\\Project\\CH32\\ble_-tyq_-bjq_-ch584-m",
|
||||||
|
"openOCDCfg": {
|
||||||
|
"useLocalOpenOCD": true,
|
||||||
|
"executable": "c:/MounRiver/MounRiver_Studio2/resources/app/resources/win32/components/WCH/OpenOCD/OpenOCD/bin/openocd.exe",
|
||||||
|
"configOptions": [
|
||||||
|
"-f \"c:/MounRiver/MounRiver_Studio2/resources/app/resources/win32/components/WCH/OpenOCD/OpenOCD/bin/wch-riscv.cfg\""
|
||||||
|
],
|
||||||
|
"gdbport": 3333,
|
||||||
|
"telnetport": 4444,
|
||||||
|
"tclport": 6666,
|
||||||
|
"host": "localhost",
|
||||||
|
"port": 3333,
|
||||||
|
"skipDownloadBeforeDebug": false,
|
||||||
|
"enablePageEraser": false,
|
||||||
|
"enableNoZeroWaitingAreaFlash": false
|
||||||
|
},
|
||||||
|
"gdbCfg": {
|
||||||
|
"executable": "c:/MounRiver/MounRiver_Studio2/resources/app/resources/win32/components/WCH/Toolchain/RISC-V Embedded GCC12/bin/riscv-wch-elf-gdb.exe",
|
||||||
|
"commands": [
|
||||||
|
"set mem inaccessible-by-default off",
|
||||||
|
"set architecture riscv:rv32",
|
||||||
|
"set remotetimeout unlimited",
|
||||||
|
"set disassembler-options xw"
|
||||||
|
],
|
||||||
|
"options": []
|
||||||
|
},
|
||||||
|
"startup": {
|
||||||
|
"initCommands": {
|
||||||
|
"initReset": true,
|
||||||
|
"initResetType": "init",
|
||||||
|
"armSemihosting": false,
|
||||||
|
"additionalCommands": []
|
||||||
|
},
|
||||||
|
"loadedFiles": {
|
||||||
|
"executableFile": "d:\\SXDT\\Project\\CH32\\ble_-tyq_-bjq_-ch584-m\\obj\\BLE_TYQ_BJQ_CH584M.elf",
|
||||||
|
"symbolFile": "d:\\SXDT\\Project\\CH32\\ble_-tyq_-bjq_-ch584-m\\obj\\BLE_TYQ_BJQ_CH584M.elf",
|
||||||
|
"executableFileOffset": 0,
|
||||||
|
"symbolFileOffset": 0
|
||||||
|
},
|
||||||
|
"runCommands": {
|
||||||
|
"runReset": true,
|
||||||
|
"runResetType": "halt",
|
||||||
|
"additionalCommands": [],
|
||||||
|
"setBreakAt": "handle_reset",
|
||||||
|
"continue": true,
|
||||||
|
"setProgramCounterAt": 0
|
||||||
|
},
|
||||||
|
"debugInRAM": false
|
||||||
|
},
|
||||||
|
"svdpath": "",
|
||||||
|
"output": {
|
||||||
|
"showDebugGDBTrace": true,
|
||||||
|
"saveDebugOutputToFile": false,
|
||||||
|
"showDebugOutputTimestamps": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -25,12 +25,13 @@
|
||||||
uint8_t IWDGTaskId;
|
uint8_t IWDGTaskId;
|
||||||
|
|
||||||
#define IWIG_FEED_EVENT (0x01 << 0)
|
#define IWIG_FEED_EVENT (0x01 << 0)
|
||||||
|
|
||||||
uint16_t IWDG_ProcessEvent(uint8_t task_id, uint16_t events)
|
uint16_t IWDG_ProcessEvent(uint8_t task_id, uint16_t events)
|
||||||
{
|
{
|
||||||
if (events & IWIG_FEED_EVENT)
|
if (events & IWIG_FEED_EVENT)
|
||||||
{
|
{
|
||||||
FEED_IWDG();
|
FEED_IWDG();
|
||||||
tmos_start_task(task_id, IWIG_FEED_EVENT, 20000);
|
tmos_start_task(task_id, IWIG_FEED_EVENT, 10000);
|
||||||
return (events ^ IWIG_FEED_EVENT);
|
return (events ^ IWIG_FEED_EVENT);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue