Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)

# Set up the project
project(levelx
Expand Down
4 changes: 2 additions & 2 deletions common/src/lx_nor_flash_extended_cache_enable.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ ULONG block_word;

/* Loop through the memory supplied and assign to cache entries. */
i = 0;
while (cache_size >= LX_NOR_SECTOR_SIZE)
while ((cache_size >= LX_NOR_SECTOR_SIZE) && (i < LX_NOR_EXTENDED_CACHE_SIZE))
{

/* Setup this cache entry. */
Expand All @@ -309,7 +309,7 @@ ULONG block_word;
}

/* Save the number of cache entries. */
if(i > LX_NOR_EXTENDED_CACHE_SIZE)
if(i == LX_NOR_EXTENDED_CACHE_SIZE)
{

nor_flash -> lx_nor_flash_extended_cache_entries = LX_NOR_EXTENDED_CACHE_SIZE;
Expand Down