Skip to content

Commit

Permalink
[xrock]change erase step to 16384, the max is 32768, read and write s…
Browse files Browse the repository at this point in the history
…tep to 128, the max is 256
  • Loading branch information
jianjunjiang committed Sep 5, 2024
1 parent 60ae07b commit 8d7f3b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rock.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ int rock_flash_erase_lba(struct xrock_ctx_t * ctx, uint32_t sec, uint32_t cnt)

while(cnt > 0)
{
n = cnt > 128 ? 128 : cnt;
n = cnt > 16384 ? 16384 : cnt;
if(!rock_flash_erase_lba_raw(ctx, sec, n))
return 0;
sec += n;
Expand Down Expand Up @@ -886,7 +886,7 @@ int rock_flash_erase_lba_progress(struct xrock_ctx_t * ctx, uint32_t sec, uint32
progress_start(&p, (uint64_t)cnt << 9);
while(cnt > 0)
{
n = cnt > 128 ? 128 : cnt;
n = cnt > 16384 ? 16384 : cnt;
if(!rock_flash_erase_lba_raw(ctx, sec, n))
return 0;
sec += n;
Expand Down

0 comments on commit 8d7f3b6

Please sign in to comment.