fpga: Add extra access control on UDS

Restrict access to UDS when we have exited firmware the first time.

Co-authored-by: Michael Cardell Widerkrantz <mc@tillitis.se>
This commit is contained in:
Mikael Ågren 2025-02-24 09:49:30 +01:00
parent 77fc5cf578
commit 7554787678
No known key found for this signature in database
GPG key ID: E02DA3D397792C46
4 changed files with 19 additions and 14 deletions

View file

@ -17,8 +17,7 @@ module uds (
input wire clk,
input wire reset_n,
input wire app_mode,
input wire en,
input wire cs,
input wire [ 2 : 0] address,
output wire [31 : 0] read_data,
@ -89,7 +88,7 @@ module uds (
if (cs) begin
tmp_ready = 1'h1;
if (!app_mode) begin
if (en) begin
if (uds_rd_reg[address[2 : 0]] == 1'h0) begin
uds_rd_we = 1'h1;
end