cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L451CET6 ThreadX: Hard Fault when Creating Tasks over 27KB

Hjain.1
Associate II

Using STM32L451CET6 and threadx I created multiple task and was running into hard fault on debugging found that from my 70KB byte pool when i created a task more than 27Kb it was running into hard fault again the usable memory is 160Kb out of which a partition exists between sram 1 and sram 2 which is of 128kb sram1 and rest sram2 Can anyone suggest why this is happening

Tried changing stack size of tasks, whenever they are under 27/28Kb they work perfectly. but when it is exceeding that limit,it runs into hardfault

2 REPLIES 2
Bob S
Principal

Your task STACKS are over 27K bytes (or words)?  How many tasks do you have?  Disclaimer: I have only a little experience with AzureRTOS.  There should be some error function when its memory allocator runs out of memory.  If so, is that getting called?

Haithem Rahmani
ST Employee

Hi @Hjain.1 ,

Hope your are doing well.

do you still have the problem?, if it is the case would you please share a project  reproducing the issue? 

regards
haithem.