-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Problem with UART, if UART is placed in IRAM [problem found] (IDFGH-7646) #9198
Comments
You should make a Pull Request instead of attaching the patch here. That way it can be tested and edited by the Espressif team |
Hi @vavroa, Could you please attach your sdkconfig file? In v4.4.1 release, FreeRTOS and ringbuffer functions are already placed into IRAM, unless CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH configuration option is enabled. I'd like to check if you are seeing this issue with this option is enabled or not. |
Indeed, this option was enabled, probably for this reason, the ringbuffer functions were placed in FLASH, which caused problems in their access from ISR. Now I've tested it with option CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH turned off and it looks like it works. |
Thanks for confirming! Looks like the action on our side would be to either prevent |
Both options are a good idea. In our case, we are at the limit of IRAM capacity, so we tried these different options. |
…ERTOS_PLACE_FUNCTIONS_INTO_FLASH esp-ringbuf funtion placement is now controlled by its own configs: CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH and CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH Closes #9198
Problem found in IDF 4.4.1
If the SPI function that accesses the external flash is being executed and the ISR is called from the UART at this point, the entire program will crash.
The problem is that the ISR from UART uses RINGBUFFER, which has some functions located in external memory.
I am attaching a patch that I applied to this problem.
0001-Ringbuffer-to-iram.zip
.
The text was updated successfully, but these errors were encountered: