2020-03-10 08:55 AM
Hello,
Is it that application can only run from ITCM ? When I try to run from other SRAM such as SRAM1, it get into MEM IRQ handler.
Another issue is that on running from ITCM the HAL_Delay is much faster compared with running from internal flash (Xip). From internal flash HAL_Delay(x) waits x millisecons ( just as expected), but with ITCM it will wait much less time (about ~x/10 ).
Thank you for any comment,
Ranran
2020-03-10 09:06 AM
Which MCU is that? SRAM1 must be enabled on some series.
> on running from ITCM the HAL_Delay is much faster compared with running from internal flash (Xip).
Something is seriously misconfigured then. Check/show all RCC and SysTick registers.
2020-03-10 09:10 AM
Hi,
Do you mean it can run from any SRAM (I did remember to enable SRAM1 clock but it did not help).
>Something is seriously misconfigured then. Check/show all RCC and SysTick registers.
But when running from internal flash there is no issue with the exact same simple application which toggled a led every 1 second using HAL_Delay(1000).
Thanks
2020-03-10 11:00 AM
I haven't checked it on all STM32 series, so I don't know if it can run from SRAM1 on yours. Moreover, I can't guess how did your code get to SRAM, is it properly linked, relocated, how are the clocks set up...
2020-03-10 12:04 PM
@ranran How do you run the app in RAM - do you have a "bootloader" or load it with a debugger? If the latter, which one?
Once I've seen issues with loading a program into 'H7 RAM with Atollic debugger. It works basically, but interrupts and timers behaved strangely.
-- pa
2020-03-10 11:32 PM
All I asked was if it theoretically it can run from sram1. Thanks anyway.
2020-03-10 11:37 PM
Hi,
Yes, I use bootloader, which copies it to RAM and jump to start address.
The bootloader already works perfectly if it jumps to flash and run from flash.
The questions were raised about sram - which are theoretical question , to understand if what we are trying to do, can actually be done.
Thanks!