Electronics project notes / Teensy notes
Jump to navigation
Jump to search
See Electronics project notes/Microcontroller and computer platforms#Teensy for a general introduction.
RAM
The Teensy 4's 1024 KByte is split into two parts: (see also the memory map on the product page)
- RAM1
- 512KB
- more tightly coupled. Code, static variables, and stack will be put here
- RAM2
- 512KB
- runs slower than RAM1(verify)
- but optimized for DMA
- defining with DMAMEM puts things in RAM2
- used for buffers, larger arrays, and dynamic allocations (the heap)
- when using DMA, you would want to put it here so DMA can run in parallel with the CPU.
Look at the manual, "4.12 SRAM accesses".
These are accessed differently, and the teensy libraries will use some of this, so don't count on getting all of it, or storing one big array in there.
PSRAM
Teensy and USB
See