Hi
Has anyone tried to reallocating the FlexRAM using values that are not 2 to the power of something? e.g. values other than: 0x10000, 0x20000, 0x40000 ...
I have an Embedded Artists RT1062 dev board (without the extra SDRAM) and I'd run out of the standard 128KB SRAM_DTC region used for heap and stack.
I followed the example from another post to increase my SRAM_DTC to 256KB and this worked, see post: https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Reallocating-the-FlexRAM/ta-p/1117649
Towards the end of the post it recommends you choose a FlexRAM configuration that's available via eFuses. I chose one that had the maximum amount of DTC RAM from Table 3 in AN12077: DTC: 448KB, ITC: 0KB, OC:64KB. However when I tried to implement it an assert fires off in board.c:
assert(!(nonCacheStart % size));
assert(size == (uint32_t)(1 << i));
The first assert makes sure the size of the NCACHE_REGION fits an exact number of times into the base address of the NCACHE_REGION memory, which for me is SRAM_DTC (0x20000000).
The second assert makes sure size is something like: 0x10000, 0x20000, 0x40000, 0x80000.
I don't understand why these asserts are here as they contradict Table 3 in application note AN12077.
If I ignore the assert everything works.
I eventually ignored table 3 and moved all the FlexRAM to be DTC, leaving me with 0KB ITC and 512KB in OC RAM. This is the best solution for me, so I'm happy, but concerned I've missed some understanding re the asserts.
Has anyone else had this issue?
Thanks, Graeme