Would need to see some more code to work it out.
My guess is the data is not being saved to the global struct correctly. When your printing in getdata your printing a local copy of the values
Any idea how this cache works? I'm assuming it would only cache specific memory that it has accessed.
My completely untested theory (and probably wrong) was if you were even accessing only 50% of the items out of order in the array on psram it...
The first memcopy will copy it to the stack as its a local array in a method. So it's in ram1. Being on the stack it won't need to be deleted.
But yes ram1 is limited to 512kb (plus stack and other code) I don't think there is a limit to the...
Well I was thinking. Sequential access using psram is the fastest access.
If you need to do a lot of modifications to the array in psram, while also accessing many elements of it. It might be quicker to copy it to an empty array in your...
I think your going to have trouble trying to dynamically allocate arrays of varying size and try get them into ram1, ram2 or psram (unless you know the size at compile time)
Have you increased your psram speed get? Those should set it to 132mhz...
For timing I suggest using the macro ARM_DWT_CYCCNT, especially if your doing short timing and a lot of it.
This fetches clock cycles as a uint32_t. It will overflow every 17? or so seconds so you will have to handle that. You will also have to...
So your doing a 24 bit back buffer rgb888 on the psram?
Are you storing each pixel in a uint32 array and bit shifting, or 3 individual uint8_t arrays
I'm assuming a good way to do it would be a front and back buffer and switch the 2 so they're...
You have two options to create stuff on the stack:
1) You can use a variable sized array. It may be simplest to move the main of the code into a function, and pass in the length as an argument:
void inner (size_t n)
{
uint32_t buffer[n]...
My object I create has an internal array that is dynamically set to a size by calling a function called Init on the object
So the object will be on the stack.
The internal array would be on the heap?
Great thanks Kurt!
I needed to make some temporarily arrays dynamically sized at run time to do some one of calculations at setup.
Because they're dynamically sized they're on the heap (dont think you can do new and have it on the stack?) and...
At 600mhz 6 nano seconds is 10 clock cycles.
I'm curious if this does exactly 10 clock cycles or sometimes 11?
while (ARM_DWT_CYCCNT - begin < cycles) ;
I Believe NOPS are inconsistent due to the teensy being able to do 2 instructions at once
Occasionally I've had library linking errors like this. Or deleting a h file in the project and it still thinks its there and recreating it, it thinks there's a duplicate.
Deleting the temp files wouldn't help. But what I found was renaming or...
Try and set analog read averaging to 32 in your setup. This will be slower reads. (On phone and not sure on the exact method call)
But if you want higher accuracy you should use an external adc. Like the ads1115 (can read 16 bit adc values)