From ad18c333af453624644014e2b353d5a166dc29d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Str=C3=B6mbergson?= Date: Wed, 28 Aug 2024 14:06:04 +0200 Subject: [PATCH] (fw) Enable FW mode at start. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FW mode must now be explicitlty enabled. App mode will be automatically enabled when jumping to the start of the loaded application. Signed-off-by: Joachim Strömbergson --- hw/application_fpga/fw/tk1/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/application_fpga/fw/tk1/main.c b/hw/application_fpga/fw/tk1/main.c index b6f59ec..3b745a5 100644 --- a/hw/application_fpga/fw/tk1/main.c +++ b/hw/application_fpga/fw/tk1/main.c @@ -342,9 +342,6 @@ static void run(const struct context *ctx) #endif // clang-format on - // Flip over to application mode - *switch_app = 1; - // XXX Firmware stack now no longer available // Don't use any function calls! @@ -399,6 +396,9 @@ int main(void) uint8_t cmd[CMDLEN_MAXBYTES] = {0}; enum state state = FW_STATE_INITIAL; + // Enable FW mode. + *switch_app = 0; + print_hw_version(); // Let the app know the function adddress for blake2s()