forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SparkFun updates for the PSRAM draft/work #3
Open
gigapod
wants to merge
88
commits into
pimoroni:feature/psram
Choose a base branch
from
sparkfun:feature/psram-sparkfun
base: feature/psram
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Phil Howard <[email protected]> Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Remove references to hardware_rtc for rp2350 Reimplement time functioniality Use hardware_powman instead Define PICO_PLATFORM for RPI_PICO move PICO_TINYUSB_PATH until PICO_PLATFORM is defined PICO_TINYUSB_PATH has to be defined before calling pico_sdk_init Make sure powerman timer is using xosc ports/rp2: Updates for powman changes. Probably another change coming to remove powman and use the new aon timer that supports both rp2040 and rp2350 ports/rps: Use aon_timer module. ports/rp2: Remove rp2350 specific source. ports/rp2: Use correct CMSIS header for rp2350. ports/rp2: Add hardware_resets. ports/rp2: For rp2350 just use aon timer For rp2040 there's a workaround for RTC having only 1s resolution. This is not needed for rp2350 Stop setting PICO_RP2040_B* for rp2350 Only set PICO_RP2040_USB_DEVICE_ENUMERATION_FIX for rp2040 Signed-off-by: Damien George <[email protected]>
Signed-off-by: Phil Howard <[email protected]>
Check a target exists before accessing properties. Usermod_gather_sources would recurse into garbage property names and break. Signed-off-by: Phil Howard <[email protected]>
Changes: - NUM_BANK0_GPIOS > pins defined in pins.csv = hardfault - make-pins.py: NUM_GPIOS is hard-coded in make-pins.py, make it bigger - machine_pin.h: Pin "ID" must be six bits, not five (breaks bit packing?) - mphalport.h/machine_pin.c: open drain mask must be 64bits. Signed-off-by: Phil Howard <[email protected]>
Add support for 32 and 48 pin variants of RP2350. Add new gpio_base, mirroring the Pico SDK. Signed-off-by: Phil Howard <[email protected]>
NUM_GPIOS amd NUM_EXT_GPIOS is currently hardcoded in this python script. Pass the count in via the new parameters num-gpios and num-ext-gpios. These default to the current values supported by Pico 30/10. This can be changed with PICO_NUM_GPIOS and PICO_NUM_EXT_GPIOS in mpconfigboard.cmake. Without this you will get a build error because NUM_BANK0_GPIOS can be too small. Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Fix the gpio_irq function so that it looks at all six iobank0_hw->intr[n] registers, for up to 48 IOs. Signed-off-by: Phil Howard <[email protected]>
Note: This might be a tempoarary measure until we might fix this properly to avoid copying code. Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
To test construction of UART instances. Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
Provide stub implementations of localtime_r() and mktime() to avoid code size increase. Reported upstream at raspberrypi/pico-sdk#1810 This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
Add PSRAM support with auto detection. Performs a best-effort attempt to detect attached PSRAM, configure it and *add* it to the MicroPython heap. If PSRAM is not present, should fall back to use internal RAM. Introduce two new port/board defines: * MICROPY_HW_ENABLE_PSRAM to enable PSRAM. * MICROPY_HW_PSRAM_CS_PIN to define the chip-select pin. Changes: ports/rp2/rp2_psram.c/h: Add new PSRAM module. ports/rp2/main.c: Add optional PSRAM support. ports/rp2/CMakeLists.txt: Include rp2_psram.c. ports/rp2/rp2_flash.c: Add buffered write to avoid reads from PSRAM. ports/rp2/mpconfigport.h: Enable MICROPY_GC_SPLIT_HEAP for boards that set MICROPY_HW_ENABLE_PSRAM. Co-authored-by: Kirk Benell <[email protected]> Co-authored-by: Mike Bell <[email protected]> Signed-off-by: Phil Howard <[email protected]>
Signed-off-by: Phil Howard <[email protected]>
Signed-off-by: Phil Howard <[email protected]>
My tests found issues when PSRAM is combined with the existing RAM in a split-heap configuration. Since this option is not enabled by default on RP2 I have changed it to be optional. PSRAM will be used exclusively if MICROPY_GC_SPLIT_HEAP == 0, it will be added to RAM if MICROPY_GC_SPLIT_HEAP == 1, and the system will fall back to RAM only if it's not detected. Signed-off-by: Phil Howard <[email protected]>
Signed-off-by: Mike Bell <[email protected]>
Signed-off-by: Mike Bell <[email protected]>
Signed-off-by: Mike Bell <[email protected]>
Signed-off-by: Mike Bell <[email protected]>
Signed-off-by: Mike Bell <[email protected]>
Signed-off-by: Phil Howard <[email protected]>
Signed-off-by: Phil Howard <[email protected]>
Gadgetoid
force-pushed
the
feature/psram
branch
2 times, most recently
from
September 5, 2024 08:24
2fae3a9
to
3cd6781
Compare
Gadgetoid
force-pushed
the
feature/psram
branch
2 times, most recently
from
September 27, 2024 13:39
b504e66
to
c98c139
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Pimoroni -
This repo:branch looks like the best path to get our updates in the discussion around the PSRAM PR on the micropython/micropython repo.
This PR contains updates that reflect the work we've done to support PSRAM and continues on the discussion/work that took place prior to the RP2350 announcement. We
Updates of note:
-Kirk