November 2020 archive

HardFault handler on supervisor call (SVC) when starting FreeRTOS kernel (CM-4)

During the initialization of FreeRTOS kernel, kernel calls the first task with function: At the third instruction, counting from the bottom, svc is being called. It is a supervisor call, which calls an SVCall exception. If after that instruction HardFault happens it might be caused by non zero value of BASEPRI register. Base Priority Mask …

Continue reading