I have been working on a data handling algorithm that requires decently large arrays (sized 64x64). I have tested for the most raw case possible to determine if maybe its running out of memory but theoretically 4096 integers should not take up anywhere near 2MB of RAM. Attached is a code snippet that I ran on my device. When inputting 48*48 into the array construction it takes 1209 microseconds just to make the array, but it does complete. When inputting 64*64, the initial debug message is slightly different and cannot complete. (ignore the words about compression it isnt doing anything but making the array here).
(inside the main function) uint32_t cycleCount; uint64_t curTime; /* Open drivers to open the UART driver for console */ Drivers_open(); Board_driversOpen(); CycleCounterP_reset(); curTime = ClockP_getTimeUsec(); /* get time as measured by timer associated with ClockP module */ cycleCount = CycleCounterP_getCount32(); /* get CPU cycle count */ DebugP_log("[HCWT V0.1] Running...\r\n"); int I[64*64]; cycleCount = CycleCounterP_getCount32() - cycleCount; /* get CPU cycle count and calculate diff, we dont expect any overflow for this short duration */ curTime = ClockP_getTimeUsec() - curTime; /* get time and calculate diff, ClockP returns 64b value so there wont be overflow here */ DebugP_log("[HCWT] Compression Execution ... DONE (Measured time = %d usecs, CPU cycles = %d ) !!!\r\n", (uint32_t)curTime, cycleCount); Board_driversClose(); Drivers_close();