From af43a7757de431260ae37dc40fbfae410b49720e Mon Sep 17 00:00:00 2001 From: Jan Egil Ruud Date: Mon, 12 Dec 2022 14:20:16 +0100 Subject: [PATCH] #822 Print Vtarget when using TPI. --- src/jtag3.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/jtag3.c b/src/jtag3.c index 481e9783..27ce51a8 100644 --- a/src/jtag3.c +++ b/src/jtag3.c @@ -2612,6 +2612,12 @@ static int jtag3_initialize_tpi(const PROGRAMMER *pgm, const AVRPART *p) { if ((status = jtag3_command_tpi(pgm, cmd, 3, &resp, "Set NVMCSR")) < 0) return -1; free(resp); + + if (jtag3_getparm(pgm, SCOPE_GENERAL, 1, PARM3_VTARGET, cmd, 2) < 0) + return -1; + fmsg_out(stderr, "%sVtarget %s: %.2f V\n", "", + verbose? "": " ", b2_to_u16(cmd)/1000.0); + return 0; }