Add TURBO_200MHZ define to support 200Mhz system clock

125Mhz system clock - 31.25Mhz sample rate (logic analyzer)
200Mhz system clock - 50Mhz sample rate (logic analyzer)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-05-06 20:29:02 +02:00
parent 07e8a92a3b
commit d18b0129a1
3 changed files with 17 additions and 0 deletions

View File

@ -21,6 +21,11 @@ if (DEFINED ENV{PICOPROBE_LED})
target_compile_definitions(picoprobe PRIVATE PICOPROBE_LED=$ENV{PICOPROBE_LED})
endif()
if (DEFINED ENV{TURBO_200MHZ})
message("TURBO_200MHZ is defined as " $ENV{TURBO_200MHZ})
target_compile_definitions(picoprobe PRIVATE TURBO_200MHZ=$ENV{TURBO_200MHZ})
endif()
set(DBG_PIN_COUNT=4)
pico_generate_pio_header(picoprobe ${CMAKE_CURRENT_LIST_DIR}/src/probe.pio)

View File

@ -31,6 +31,10 @@
#include "tusb.h"
#include "picoprobe_config.h"
#if TURBO_200MHZ
#include "pico/stdlib.h"
#include "hardware/vreg.h"
#endif
#include "probe.h"
#include "cdc_uart.h"
#include "cdc_sump.h"
@ -49,6 +53,11 @@ void tud_cdc_line_coding_cb(uint8_t itf, cdc_line_coding_t const* line_coding) {
int main(void) {
#if TURBO_200MHZ
vreg_set_voltage(VREG_VOLTAGE_1_15);
set_sys_clock_khz(200000, true);
#endif
board_init();
usb_serial_init();
cdc_uart_init();

View File

@ -45,6 +45,9 @@
#define picoprobe_dump(format,...) ((void)0)
#endif
#if false
#define TURBO_200MHZ 1
#endif
// PIO config
#define PROBE_SM 0