Skip to content
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

[TW#25601] Bug in esp-idf\components\driver\spi_common.c #2307

Closed
karawin opened this issue Aug 17, 2018 · 1 comment
Closed

[TW#25601] Bug in esp-idf\components\driver\spi_common.c #2307

karawin opened this issue Aug 17, 2018 · 1 comment

Comments

@karawin
Copy link

karawin commented Aug 17, 2018

Environment

  • Development Kit: [ESP32-Wrover-Kit|]
  • Kit version (for WroverKit/PicoKit/DevKitC): [v1|v2|v3|v4]
  • Core (if using chip or module): [ESP32-Wrover-I|ESP32-Wrover|ESP32-PICO-D4|ESP32-SOLO-I|ESP32-WROOM-32U|ESP-WROOM-32D|ESP-WROOM32|ESP32]
  • IDF version (git rev-parse --short HEAD to get the commit id.): 020ade6
    //bd6ea4393c7d2f059fc4decc70f1ec3eb3597268
  • Development Env: [other]
  • Operating System: [Windows|Ubuntu|MacOS]
  • Power Supply: [USB|external 5V|]

Problem Description

Cache disabled but cached memory region accessed on time to time on spi master

Diagnostic:
A call to void spicommon_setup_dma_desc_links(lldesc_t *dmadesc, int len, const uint8_t *data, bool isrx)
in static void SPI_MASTER_ISR_ATTR spi_intr(void *arg) fails because spicommon_setup_dma_desc_links is not an IRAM_ATTR function.
This function is called in spi_intr on line 641 and 670

Adding IRAM_ATTR in esp-idf\components\driver\spi_common.c
line 333 ie:
void IRAM_ATTR spicommon_setup_dma_desc_links(lldesc_t *dmadesc, int len, const uint8_t *data, bool isrx)
solved the problem.

@FayeY FayeY changed the title Bug in esp-idf\components\driver\spi_common.c [TW#25601] Bug in esp-idf\components\driver\spi_common.c Aug 20, 2018
@ginkgm
Copy link
Collaborator

ginkgm commented Aug 20, 2018

Hi @karawin .
Thanks for reporting this, we'll fix it.

@igrr igrr closed this as completed in e3557b5 Aug 24, 2018
igrr pushed a commit that referenced this issue Aug 27, 2018
The dma configuration function called in the ISR should be put into the IRAM.

Fixes #2307.
igrr pushed a commit that referenced this issue Aug 28, 2018
The dma configuration function called in the ISR should be put into the IRAM.

Fixes #2307.
catalinio pushed a commit to catalinio/pycom-esp-idf that referenced this issue Jun 28, 2019
The dma configuration function called in the ISR should be put into the IRAM.

Fixes espressif/esp-idf#2307.
catalinio pushed a commit to catalinio/pycom-esp-idf that referenced this issue Jun 28, 2019
The dma configuration function called in the ISR should be put into the IRAM.

Fixes espressif/esp-idf#2307.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants