I'm using the Keil development board with a cortex 4 stm32f407. I started with the RT flash file system example which uses a uart and then added the RTX OS to setup some threads. Now I'm trying to add on SPI and attempting to use the standard peripheral library.
I rolled in example SPI code that uses the std_periph_lib. The problem I have is when setting up the SPI interrupt, the call to NVIC_PriorityGroupConfig() in misc.c causes a hard fault when trying to set the SCB->AIRCR register. Even reading that register causes a fault because SCB is undefined.
In stm32fxx.h I uncommented the line #define USE_STDPERIPH_DRIVER but that didn't help.
The SCB memory address is defined in core_cm4.h which in a roundabout way is included by misc.c, so SCB should be ok.
Anyone know of issues when using std_periph_lib and not being able to access the system control block?
Any ideas why accessing that register would cause a hard fault?
Thanks.