AnsweredAssumed Answered

SDK assert results in hardfault

Question asked by Rik Vugteveen on Jun 29, 2020
Latest reply on Jul 1, 2020 by Alice_Yang

I am developing a project with the LPC5528 and us the generate SDK code for multiple pheripherals. I created a C++ project and started coding. Since i do not use the heap i set the size of the heap to 0 in my linker configuration. During my development i had great issues when calling the SPI_MasterSetBaud function and it took me a while to figure out what was going on. During the call the MCU jumped to the hard fault handler. The case was an invalid parameter which caused a call somewhere in the assert statement. I think because somewhere in the underlaying code something goes wrong with the allocation of memory due to the heap with size 0. but i do not think it is ok for the SDK code to crash into a hardfault. Can somebody explain to me what i should expect of the assert function defined in the SDK and how i should use it without heap?

Outcomes