Thanks for your response!
incognito wrote:
What is the value of DEFAULT_PLLR in your lowlevel? If you set your speed to 96MHz you should set your waitstates to 3 at the start of Lowlevelinit.
Is your OSCOUNT value high enough for the crystal your using?
Do you use AT91C_CKGR_STMODE_2 for startup (normal as opposed to fast)
Is the AT91_CKGR_SRC bit set?
Some of these bits do not exist in SAM3U.
Anyway, the PLL is not the problem, as I don't use it at startup, only later on when USB is connected, and that works (then running on 48MHz).
incognito wrote:
To use sram as one contigious block the datasheet says "The user can see the SRAM as contiguous at 0x20078000-0x20083FFF" thus, define a section starting at 0x20078000 of size 0xC000 and use that.
Wow, thanks a lot, THAT helps.
So I define the sram as a whole, and keep
the stack pointer at the end of it, that seems to work.
I always find it very embarrassing if it's so easy to find in the datasheet...
incognito wrote:
The memory you reserved at 0x20000000 - 0x20000100 is also only usefull if you actually move your vector table to sram in your ResetException function. Otherwise, you're wasting 0x100 of memory. (Not sure if FreeRTOS moves the vectors there though...)
I think that's done in the linker script, line 40:
_vect_start = ...;
The more I play with it, the more I think it's FreeRTOS configTOTAL_HEAP_SIZE. If that's too small I don't get an error message, and strangely the application starts after flashing, but not after another power down and up.
Thanks again for your help!