Corrected bug in fast trigger

This commit is contained in:
Agustín Gimenez 2022-07-11 20:03:50 +02:00
parent 2fc7ade9da
commit 52d8c9d1d5
16 changed files with 25364 additions and 19556 deletions

View File

@ -8,7 +8,7 @@ make.exe all --print-data-base --no-builtin-variables --no-builtin-rules --quest
# This program built for i386-pc-mingw32
# Make data base, printed on Sat Jul 02 12:18:29 2022
# Make data base, printed on Mon Jul 11 18:23:44 2022
# Variables
@ -27,8 +27,6 @@ MAKEFLAGS = Rrqp
# environment
COMMANDPROMPTTYPE = Native
# environment
VSCODE_LOG_NATIVE = false
# environment
AUTOFIRMA_AVOID_UPDATE_CHECK = true
# automatic
@D = $(patsubst %/,%,$(dir $@))
@ -49,7 +47,7 @@ WINDOWSSDKVERSION = 10.0.19041.0\
# environment
WINDIR = C:\WINDOWS
# environment
VSCODE_NLS_CONFIG = {"locale":"es","availableLanguages":{"*":"es"},"_languagePackId":"eae11d900af9c06c6da7ac60cedf8cf9.es","_translationsConfigFile":"C:\\Users\\geniw\\AppData\\Roaming\\Code\\clp\\eae11d900af9c06c6da7ac60cedf8cf9.es\\tcf.json","_cacheRoot":"C:\\Users\\geniw\\AppData\\Roaming\\Code\\clp\\eae11d900af9c06c6da7ac60cedf8cf9.es","_resolvedLanguagePackCoreLocation":"C:\\Users\\geniw\\AppData\\Roaming\\Code\\clp\\eae11d900af9c06c6da7ac60cedf8cf9.es\\30d9c6cd9483b2cc586687151bcbcd635f373630","_corruptedFile":"C:\\Users\\geniw\\AppData\\Roaming\\Code\\clp\\eae11d900af9c06c6da7ac60cedf8cf9.es\\corrupted.info","_languagePackSupport":true}
VSCODE_NLS_CONFIG = {"locale":"es","availableLanguages":{"*":"es"},"_languagePackId":"eae11d900af9c06c6da7ac60cedf8cf9.es","_translationsConfigFile":"C:\\Users\\geniw\\AppData\\Roaming\\Code\\clp\\eae11d900af9c06c6da7ac60cedf8cf9.es\\tcf.json","_cacheRoot":"C:\\Users\\geniw\\AppData\\Roaming\\Code\\clp\\eae11d900af9c06c6da7ac60cedf8cf9.es","_resolvedLanguagePackCoreLocation":"C:\\Users\\geniw\\AppData\\Roaming\\Code\\clp\\eae11d900af9c06c6da7ac60cedf8cf9.es\\92d25e35d9bf1a6b16f7d0758f25d48ace11e5b9","_corruptedFile":"C:\\Users\\geniw\\AppData\\Roaming\\Code\\clp\\eae11d900af9c06c6da7ac60cedf8cf9.es\\corrupted.info","_languagePackSupport":true}
# environment
VBOX_MSI_INSTALL_PATH = C:\Program Files\Oracle\VirtualBox\
# environment
@ -63,17 +61,16 @@ PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
# makefile
MAKEFILE_LIST :=
# environment
FPS_BROWSER_USER_PROFILE_STRING = Default
# environment
__DOTNET_PREFERRED_BITNESS = 32
# environment
VSINSTALLDIR = C:\Program Files\Microsoft Visual Studio\2022\Community\
# environment
TMP = C:\Users\geniw\AppData\Local\Temp
# environment
FRAMEWORK40VERSION = v4.0
# environment
VSCODE_VERBOSE_LOGGING = true
FRAMEWORK
make.exe: *** No rule to make target `all'. Stop.
40VERSION = v4.0
# environment
PROGRAMW6432 = C:\Program Files
# environment
@ -81,8 +78,6 @@ PROGRAMDATA = C:\ProgramData
# environment
VSCMD_ARG_TGT_ARCH = x86
# environment
VSCODE_IPC_HOOK_EXTHOST = \\.\pipe\vscode-ipc-e7370b71-19fe-405a-88d1-375f401ce9ae-sock
# environment
VSCODE_CWD = F:\PicoSDK\Pico
# environment
PATH = C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\\Extensions\Microsoft\IntelliCode\CLI;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX86\x86;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\VCPackages;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\Roslyn;C:\Program Files\Microsoft Visual Studio\2022\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\\x86;C:\Program Files (x86)\Windows Kits\10\bin\\x86;C:\Program Files\Microsoft Visual Studio\2022\Community\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\;C:\Program Files (x86)\Microsoft Visual Studio\Installer;C:\Program Files\Graphviz\bin;C:\Program Files\Graphviz\bin;C:\Program Files\doxygen\bin;C:\Program Files\doxygen\bin;F:\PicoSDK\Pico\tools\openocd-picoprobe;C:\Program Files\Python39\Scripts\;C:\Program Files\Python39\;C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;P:\Oculus\Support\oculus-runtime;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\WinAVR-20100110\bin;C:\WinAVR-20100110\utils\bin;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\dotnet;C:\Users\geniw\.azure-kubelogin;C:\Users\geniw\.azure-kubectl;C:\Program Files\dotnet\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\PowerShell\7\;C:\Windows\System32\wbem;C:\Windows\System32\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft\Azure function tools\win-x64;F:\RPico\CMake\bin;C;C:\Program Files\Git\cmd;C;C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\bin;F:\RPico\Python37\Scripts\;F:\RPico\Python37\;C:\lscc\iCEcube2.2017.08\Aldec\Active-HDL\BIN;C:\Program Files (x86)\Microchip\bin;C:\Users\geniw\AppData\Local\Microsoft\WindowsApps;C:\Users\geniw\.dotnet\tools;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\NuGetClient;C:\Users\geniw\.dotnet\tools;C:\Users\geniw\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Git\bin;C:\Program Files (x86)\Skyworks\ClockBuilder Pro\Bin;C:\Users\geniw\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\Linux\bin\ConnectionManagerExe
@ -109,8 +104,6 @@ ALLUSERSPROFILE = C:\ProgramData
# environment
WINDOWSSDK_EXECUTABLEPATH_X64 = C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\
# environment
VSCODE_LOG_STACK = false
# environment
NUMBER_OF_PROCESSORS = 16
# environment
ELECTRON_RUN_AS_NODE = 1
@ -127,14 +120,12 @@ VK_SDK_PATH = C:\VulkanSDK\1.2.148.1
# environment
KICAD_TEMPLATE_DIR = F:\KiCad\share\kicad\template
# environment
CHROME_CRASHPAD_PIPE_NAME = \\.\pipe\crashpad_19304_UJWDZWZVPVPUPMAW
CHROME_CRASHPAD_PIPE_NAME = \\.\pipe\crashpad_25524_CVTWVQAZHEALSLAZ
# environment
FSHARPINSTALLDIR = C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools
# environment
__VSCMD_PREINIT_PATH = C:\Program Files (x86)\Microsoft Visual Studio\Installer;C:\Program Files\Graphviz\bin;C:\Program Files\Graphviz\bin;C:\Program Files\doxygen\bin;C:\Program Files\doxygen\bin;F:\PicoSDK\Pico\tools\openocd-picoprobe;C:\Program Files\Python39\Scripts\;C:\Program Files\Python39\;C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;P:\Oculus\Support\oculus-runtime;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\WinAVR-20100110\bin;C:\WinAVR-20100110\utils\bin;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\dotnet;C:\Users\geniw\.azure-kubelogin;C:\Users\geniw\.azure-kubectl;C:\Program Files\dotnet\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\PowerShell\7\;C:\Windows\System32\wbem;C:\Windows\System32\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft\Azure function tools\win-x64;F:\RPico\CMake\bin;C;C:\Program Files\Git\cmd;C;C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\bin;F:\RPico\Python37\Scripts\;F:\RPico\Python37\;C:\lscc\iCEcube2.2017.08\Aldec\Active-HDL\BIN;C:\Program Files (x86)\Microchip\bin;C:\Users\geniw\AppData\Local\Microsoft\WindowsApps;C:\Users\geniw\.dotnet\tools;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\NuGetClient;C:\Users\geniw\.dotnet\tools;C:\Users\geniw\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Git\bin;C:\Program Files (x86)\Skyworks\ClockBuilder Pro\Bin;C:\Users\geniw\AppData\Local\Programs\Microsoft VS Code\bin
# environment
VSCODE_PIPE_LOGGING = true
# environment
FRAMEWORKVERSION32 = v4.0.30319
# environment
COMPUTERNAME = DESKTOP-C983CQ7
@ -165,7 +156,7 @@ VSCODE_CLI = 1
# environment
PICO_EXTRAS_PATH = F:\PicoSDK\Pico\pico-extras
# environment
VSCODE_CODE_CACHE_PATH = C:\Users\geniw\AppData\Roaming\Code\CachedData\30d9c6cd9483b2cc586687151bcbcd635f373630
VSCODE_CODE_CACHE_PATH = C:\Users\geniw\AppData\Roaming\Code\CachedData\92d25e35d9bf1a6b16f7d0758f25d48ace11e5b9
# environment
VSCMD_VER = 17.0.4
# environment
@ -231,7 +222,7 @@ PROCESSOR_IDENTIFIER = AMD64 Family 25 Model 33 Stepping 2, AuthenticAMD
# environment
OS = Windows_NT
# environment
VSCODE_IPC_HOOK = \\.\pipe\c3458689be066bf74d96fafb71cdfa9f-1.68.1-main-sock
VSCODE_IPC_HOOK = \\.\pipe\c3458689be066bf74d96fafb71cdfa9f-1.69.0-main-sock
# environment
DEVENVDIR = C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\
# environment
@ -297,8 +288,6 @@ SUFFIXES :=
# environment
SYSTEMDRIVE = C:
# environment
SESSIONNAME = Console
# environment
PROCESSOR_REVISION = 2102
# environment
WINDOWSSDKLIBVERSION = 10.0.19041.0\
@ -319,15 +308,13 @@ LANG = C
# environment
PROCESSOR_LEVEL = 25
# environment
FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
# environment
VSCODE_PID = 19304
VSCODE_PID = 25524
# environment
NO_XILINX_DATA_LICENSE = HIDDEN
# environment
USERDOMAIN_ROAMINGPROFILE = DESKTOP-C983CQ7
# variable set hash-table stats:
# Load=157/1024=15%, Rehash=0, Collisions=23/173=13%
# Load=149/1024=15%, Rehash=0, Collisions=22/165=13%
# Pattern-specific Variable Values
@ -343,7 +330,7 @@ USERDOMAIN_ROAMINGPROFILE = DESKTOP-C983CQ7
# . (key f:/PicoSDK/Projects/LogicAnalyzer, mtime 1656158031): 8 files, no impossibilities.
# C:\Program Files\doxygen\bin (key C:/Program Files/doxygen/bin, mtime 1655586169): 7 files, no impossibilities.
# C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\\x86 (key C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86, mtime 1637065596): 221 files, no impossibilities.
# C:\Windows\Microsoft.NET\Framework\v4.0.30319 (key C:/Windows/Microsoft.NET/Framework/v4.0.30319, mtime 1656756708): 407 files, no impossibilities.
# C:\Windows\Microsoft.NET\Framework\v4.0.30319 (key C:/Windows/Microsoft.NET/Framework/v4.0.30319, mtime 1657521243): 406 files, no impossibilities.
# C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\Roslyn (key C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/bin/Roslyn, mtime 1641902071): 46 files, no impossibilities.
# C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\\Extensions\Microsoft\IntelliCode\CLI (key C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/Extensions/Microsoft/IntelliCode/CLI, mtime 1637065080): 39 files, no impossibilities.
# C:\WinAVR-20100110\bin (key C:/WinAVR-20100110/bin, mtime 1617902700): 75 files, no impossibilities.
@ -365,7 +352,7 @@ USERDOMAIN_ROAMINGPROFILE = DESKTOP-C983CQ7
# C:\Program Files\Python39\Scripts\ (key C:/Program Files/Python39/Scripts/, mtime 1655562297): 5 files, no impossibilities.
# C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer (key C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer, mtime 1641902062): 167 files, no impossibilities.
# 2258 files, no impossibilities in 29 directories.
# 2257 files, no impossibilities in 29 directories.
# Implicit Rules
@ -427,8 +414,6 @@ GNUmakefile:
# strcache size: total = 0 / max = 0 / min = 4096 / avg = 0
# strcache free: total = 0 / max = 0 / min = 4096 / avg = 0
# Finished Make data base on Sat Jul 02 12:18:29 2022
# Finished Make data base on Mon Jul 11 18:23:44 2022
make.exe: *** No rule to make target `all'. Stop.

View File

@ -243,29 +243,33 @@ static inline pio_sm_config FAST_TRIGGER_program_get_default_config(uint offset)
return c;
}
bool create_fast_trigger_program(uint8_t pattern, uint8_t length)
uint8_t create_fast_trigger_program(uint8_t pattern, uint8_t length)
{
//This creates a 32 instruction jump table. Each instruction is a MOV PC, PINS except for the addresses that
//match the specified pattern.
if(length > 5)
return false;
uint8_t i;
uint8_t mask = (1 << length) - 1; //Mask for testing address vs pattern
uint8_t first = 255;
for(i = 0; i < 32; i++)
{
if((i & mask) == pattern)
FAST_TRIGGER_program_instructions[i] = 0x1000 | i; //JMP i SIDE 1
else
{
FAST_TRIGGER_program_instructions[i] = 0xA0A0; //MOV PC, PINS SIDE 0
first = i;
}
}
return first;
}
//-----------------------------------------------------------------------------
//--------------Fast trigger PIO program END-----------------------------------
//-----------------------------------------------------------------------------
void fast_capture_completed()
{
@ -541,7 +545,7 @@ bool startCaptureFast(uint32_t freq, uint32_t preLength, uint32_t postLength, co
pio_gpio_init(triggerPIO, 0);
pio_gpio_init(capturePIO, 1);
for(uint8_t i = 0; i < 24; i++)
for(uint8_t i = 0; i < capturePinCount; i++)
pio_gpio_init(capturePIO, lastCapturePins[i]);
//Configure capture SM
@ -584,7 +588,7 @@ bool startCaptureFast(uint32_t freq, uint32_t preLength, uint32_t postLength, co
pio_sm_restart(triggerPIO, sm_Trigger);
//Create trigger program
create_fast_trigger_program(triggerValue, triggerPinCount);
uint8_t triggerFirstInstruction = create_fast_trigger_program(triggerValue, triggerPinCount);
//Configure trigger state machine
triggerOffset = pio_add_program(triggerPIO, &FAST_TRIGGER_program);
@ -593,6 +597,7 @@ bool startCaptureFast(uint32_t freq, uint32_t preLength, uint32_t postLength, co
smConfig = FAST_TRIGGER_program_get_default_config(triggerOffset);
sm_config_set_in_pins(&smConfig, triggerPinBase); //Trigger input starts at pin base
sm_config_set_set_pins(&smConfig, 0, 1); //Trigger output is a set pin
sm_config_set_sideset_pins(&smConfig, 0); //Trigger output is a side pin
sm_config_set_clkdiv(&smConfig, 1); //Trigger always runs at half speed (100Msps)
@ -692,7 +697,7 @@ bool startCaptureComplex(uint32_t freq, uint32_t preLength, uint32_t postLength,
pio_gpio_init(capturePIO, 0);
pio_gpio_init(capturePIO, 1);
for(uint8_t i = 0; i < 24; i++)
for(uint8_t i = 0; i < capturePinCount; i++)
pio_gpio_init(capturePIO, lastCapturePins[i]);
//Configure capture SM

View File

@ -0,0 +1,110 @@
{
"cmake" :
{
"generator" :
{
"multiConfig" : false,
"name" : "NMake Makefiles"
},
"paths" :
{
"cmake" : "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe",
"cpack" : "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cpack.exe",
"ctest" : "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/ctest.exe",
"root" : "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.21"
},
"version" :
{
"isDirty" : false,
"major" : 3,
"minor" : 21,
"patch" : 21080301,
"string" : "3.21.21080301-MSVC_2",
"suffix" : ""
}
},
"objects" :
[
{
"jsonFile" : "codemodel-v2-a70c546fee53a729ba52.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 3
}
},
{
"jsonFile" : "cache-v2-a34c13a85f48b1fc3bb4.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
{
"jsonFile" : "toolchains-v1-8fa1f8337804d06e12ad.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
],
"reply" :
{
"client-vscode" :
{
"query.json" :
{
"requests" :
[
{
"kind" : "cache",
"version" : 2
},
{
"kind" : "codemodel",
"version" : 2
},
{
"kind" : "toolchains",
"version" : 1
}
],
"responses" :
[
{
"jsonFile" : "cache-v2-a34c13a85f48b1fc3bb4.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
{
"jsonFile" : "codemodel-v2-a70c546fee53a729ba52.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 3
}
},
{
"jsonFile" : "toolchains-v1-8fa1f8337804d06e12ad.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
]
}
}
}
}

View File

@ -480,7 +480,7 @@ PICO_BOOT_STAGE2_DIR:INTERNAL=F:/PicoSDK/Pico/pico-sdk/src/rp2_common/boot_stage
PICO_CMAKE_PRELOAD_PLATFORM_DIR:INTERNAL=F:/PicoSDK/Pico/pico-sdk/cmake/preload/platforms
PICO_CMAKE_PRELOAD_PLATFORM_FILE:INTERNAL=F:/PicoSDK/Pico/pico-sdk/cmake/preload/platforms/rp2040.cmake
PICO_COMPILER_ASM:INTERNAL=C:/Program Files (x86)/GNU Arm Embedded Toolchain/10 2021.10/bin/arm-none-eabi-gcc.exe
PICO_DOXYGEN_EXCLUDE_PATHS:INTERNAL= F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs
PICO_DOXYGEN_EXCLUDE_PATHS:INTERNAL= F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs F:/PicoSDK/Pico/pico-sdk/src/rp2_common/cmsis F:/PicoSDK/Pico/pico-sdk/src/rp2040/hardware_regs
PICO_DOXYGEN_PATHS:INTERNAL= F:/PicoSDK/Pico/pico-sdk/src/common F:/PicoSDK/Pico/pico-sdk/src/rp2_common F:/PicoSDK/Pico/pico-sdk/src/rp2040
PICO_NO_HARDWARE:INTERNAL=0
PICO_ON_DEVICE:INTERNAL=1

View File

@ -1341,8 +1341,8 @@ CMakeFiles\LogicAnalyzer_LogicAnalyzer_pio_h.dir\clean:
# Target rules for target CMakeFiles/LogicAnalyzer.dir
# All Build rule for target.
CMakeFiles\LogicAnalyzer.dir\all: CMakeFiles\LogicAnalyzer_LogicAnalyzer_pio_h.dir\all
CMakeFiles\LogicAnalyzer.dir\all: CMakeFiles\ELF2UF2Build.dir\all
CMakeFiles\LogicAnalyzer.dir\all: CMakeFiles\LogicAnalyzer_LogicAnalyzer_pio_h.dir\all
CMakeFiles\LogicAnalyzer.dir\all: pico-sdk\src\rp2_common\boot_stage2\CMakeFiles\bs2_default_padded_checksummed_asm.dir\all
$(MAKE) $(MAKESILENT) -f CMakeFiles\LogicAnalyzer.dir\build.make /nologo -$(MAKEFLAGS) CMakeFiles\LogicAnalyzer.dir\depend
$(MAKE) $(MAKESILENT) -f CMakeFiles\LogicAnalyzer.dir\build.make /nologo -$(MAKEFLAGS) CMakeFiles\LogicAnalyzer.dir\build

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -240,21 +240,24 @@ static inline pio_sm_config FAST_TRIGGER_program_get_default_config(uint offset)
sm_config_set_sideset(&c, 1, false, false);
return c;
}
bool create_fast_trigger_program(uint8_t pattern, uint8_t length)
uint8_t create_fast_trigger_program(uint8_t pattern, uint8_t length)
{
//This creates a 32 instruction jump table. Each instruction is a MOV PC, PINS except for the addresses that
//match the specified pattern.
if(length > 5)
return false;
uint8_t i;
uint8_t mask = (1 << length) - 1; //Mask for testing address vs pattern
uint8_t first = 255;
for(i = 0; i < 32; i++)
{
if((i & mask) == pattern)
FAST_TRIGGER_program_instructions[i] = 0x1000 | i; //JMP i SIDE 1
else
{
FAST_TRIGGER_program_instructions[i] = 0xA0A0; //MOV PC, PINS SIDE 0
first = i;
}
}
return first;
}
//-----------------------------------------------------------------------------
//--------------Fast trigger PIO program END-----------------------------------
@ -477,7 +480,7 @@ bool startCaptureFast(uint32_t freq, uint32_t preLength, uint32_t postLength, co
//Configure 24 + 2 IO's to be used by the PIO (24 channels + 2 trigger pins)
pio_gpio_init(triggerPIO, 0);
pio_gpio_init(capturePIO, 1);
for(uint8_t i = 0; i < 24; i++)
for(uint8_t i = 0; i < capturePinCount; i++)
pio_gpio_init(capturePIO, lastCapturePins[i]);
//Configure capture SM
sm_Capture = pio_claim_unused_sm(capturePIO, true);
@ -509,13 +512,14 @@ bool startCaptureFast(uint32_t freq, uint32_t preLength, uint32_t postLength, co
pio_sm_clear_fifos(triggerPIO, sm_Trigger);
pio_sm_restart(triggerPIO, sm_Trigger);
//Create trigger program
create_fast_trigger_program(triggerValue, triggerPinCount);
uint8_t triggerFirstInstruction = create_fast_trigger_program(triggerValue, triggerPinCount);
//Configure trigger state machine
triggerOffset = pio_add_program(triggerPIO, &FAST_TRIGGER_program);
pio_sm_set_consecutive_pindirs(triggerPIO, sm_Trigger, 0, 1, true); //Pin 0 as output (connects to Pin 1, to trigger capture)
pio_sm_set_consecutive_pindirs(triggerPIO, sm_Trigger, triggerPinBase, triggerPinCount, false); //Trigger pins start at triggerPinBase
smConfig = FAST_TRIGGER_program_get_default_config(triggerOffset);
sm_config_set_in_pins(&smConfig, triggerPinBase); //Trigger input starts at pin base
sm_config_set_set_pins(&smConfig, 0, 1); //Trigger output is a set pin
sm_config_set_sideset_pins(&smConfig, 0); //Trigger output is a side pin
sm_config_set_clkdiv(&smConfig, 1); //Trigger always runs at half speed (100Msps)
//Configure DMA's
@ -527,7 +531,7 @@ bool startCaptureFast(uint32_t freq, uint32_t preLength, uint32_t postLength, co
//Write capture end mark to post program
pio_sm_put_blocking(capturePIO, sm_Capture, 0xFFFFFFFF);
//Initialize trigger state machine
pio_sm_init(triggerPIO, sm_Trigger, triggerOffset, &smConfig);
pio_sm_init(triggerPIO, sm_Trigger, triggerFirstInstruction, &smConfig);
//Enable trigger state machine
pio_sm_set_enabled(triggerPIO, sm_Trigger, true);
//Finally clear capture status and process flags
@ -592,7 +596,7 @@ bool startCaptureComplex(uint32_t freq, uint32_t preLength, uint32_t postLength,
//Configure 24 + 2 IO's to be used by the PIO (24 channels + 2 trigger pins)
pio_gpio_init(capturePIO, 0);
pio_gpio_init(capturePIO, 1);
for(uint8_t i = 0; i < 24; i++)
for(uint8_t i = 0; i < capturePinCount; i++)
pio_gpio_init(capturePIO, lastCapturePins[i]);
//Configure capture SM
sm_Capture = pio_claim_unused_sm(capturePIO, true);