Skip to content

Add non-DMA SPI support. #3393

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

Merged
merged 1 commit into from
Sep 17, 2020
Merged

Add non-DMA SPI support. #3393

merged 1 commit into from
Sep 17, 2020

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Sep 11, 2020

This fixes SPI with PSRAM allocated buffers. DMA with SPI2 was
attempted but produced junk output. This manual copy is less than
2x slower than DMA when not interrupted.

Fixes #3339

This fixes SPI with PSRAM allocated buffers. DMA with SPI2 was
attempted but produced junk output. This manual copy is less than
2x slower than DMA when not interrupted.

Fixes micropython#3339
@tannewt tannewt added bug espressif applies to multiple Espressif chips labels Sep 11, 2020
@tannewt tannewt added this to the 6.x.x - Bug Fixes milestone Sep 11, 2020
@tannewt tannewt requested a review from hierophect September 11, 2020 00:38
@tannewt
Copy link
Member Author

tannewt commented Sep 11, 2020

@emard please test artifacts from this build once it completes. Thanks!

@emard
Copy link

emard commented Sep 11, 2020 via email

@tannewt
Copy link
Member Author

tannewt commented Sep 11, 2020

Try a file from here: espressif_saola_1_wrover.zip

The PR artifacts aren't available on S3.

@emard
Copy link

emard commented Sep 11, 2020 via email

@tannewt
Copy link
Member Author

tannewt commented Sep 11, 2020

Strange syntax errors tend to happen when the host OS hasn't fully flushed it's writes to the filesystem.

@emard
Copy link

emard commented Sep 11, 2020

OK!
I reloaded again and now it seems ok 64K buffer is working!

@emard
Copy link

emard commented Sep 11, 2020

Regarding latest SPI, Is SD card supposed to work on WROVER?
I tried to mount SD card

import sdmount
Traceback (most recent call last):
File "", line 1, in
File "sdmount.py", line 31, in
File "adafruit_sdcard.py", line 116, in init
File "adafruit_sdcard.py", line 177, in _init_card
File "adafruit_sdcard.py", line 155, in _init_card
OSError: couldn't determine SD card version

If I remove SD card then it prints:

OSError: no SD card

@tannewt
Copy link
Member Author

tannewt commented Sep 11, 2020

You are the first to try. Please file a separate issue. This might be default speed related or the MOSI state.

@tannewt
Copy link
Member Author

tannewt commented Sep 16, 2020

@hierophect Please take a look.

@hierophect
Copy link
Collaborator

I don't see any issues with the Saleae. However, I'm unable to get my standard BMP_280 test working on this or the old pre-sram version, and it sounds like there may still be an issue with the SD card similar to the one on STM32-S2. I'll investigate those and make new issues if required.

@tannewt tannewt merged commit 9cf9441 into adafruit:main Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug espressif applies to multiple Espressif chips
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix SPI when used with PSRAM
3 participants