Skip to content

Commit

Permalink
fix busy_count limit #798
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Gardner-Stephen committed Apr 4, 2024
1 parent 43f417d commit 6f8b2c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vhdl/keypad_i2c.vhdl
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@ begin
if i2c1_busy='1' and last_busy='0' then

-- Sequence through the list of transactions endlessly
if (busy_count < 244) or ((write_job_pending='1') and (busy_count < (244+4))) then
if (busy_count < 81) or ((write_job_pending='1') and (busy_count < (81+4))) then
busy_count <= busy_count + 1;
report "busy_count = " & integer'image(busy_count + 1);
-- Delay switch to write so we generate a stop before hand and after
-- the write.
if ((busy_count = (244-1)) or (busy_count = (244+1))) and (delayed_en = 0) then
if ((busy_count = (81-1)) or (busy_count = (81+1))) and (delayed_en = 0) then
delayed_en <= 1024;
end if;
else
Expand Down

0 comments on commit 6f8b2c2

Please sign in to comment.