Hi,
We are developing a safety critical product based on Cortex-M4 CPU. In the Definitive Guide for ARM Cortex-M3/4 I read that it is recommended to use both (MSP and SPS) stacks even, if program does not use RTOS. By using both stacks, the program is supposed to be more robust. I also see in the book how this should be implemented in the startup file, but I don't understand in which cases these separate stacks would be more beneficial than just one stack (MSP).
I would be very grateful, if someone could explain this a little bit.
Best regards.
So, I have to implement 4 MPU regions just for stacks. Two at the bottom of each stack to detect their overflow (with no access allowed) and two regions that are covered by each stack (with XN attribute). Is this correct?
Hi matic,
yes, it is correct.
Best regards,
Yasuhiko Koumoto.