Files
micropython/ports/mimxrt/psram.h
Dryw Wade 0e3cc2910d mimxrt: Add PSRAM implementation.
This commit adds PSRAM support for Teensy 4.1 and other mimxrt boards.
It's enabled by default for Teensy 4.1.

This implementation is based on the Teensy Arduino core PSRAM code, and
Paul Stoffregen has agreed for it to be published here under the MIT
license, see https://github.com/micropython/micropython/pull/18288#issuecomment-3806784632

This addresses issue #18281.

Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
2026-01-31 21:47:15 +11:00

37 lines
1.5 KiB
C

/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019 Paul Stoffregen
* 2026 Dryw Wade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_MIMXRT_PSRAM_H
#define MICROPY_INCLUDED_MIMXRT_PSRAM_H
#define PSRAM_BASE (0x70000000)
// Configures external PSRAM if available, returns size in bytes (0 if none).
size_t configure_external_ram();
#endif // MICROPY_INCLUDED_MIMXRT_PSRAM_H