The following scenario crashes the Cortex-M4 on my PCM052:
In the MQX BSP 4.0.1 in init_gpio I do:
SPI3_MCR &= ~((0x3 << 28) | (0x1 << 14)); // DSPI to 0x00 & enables module clock
in order to enable SPI3. This works fine if kernel 3.0 is running on the A5 or the A5 is idle. However, if kernel 3.13 is running on the A5, the A4 crashes here. It looks like I can't access the memory mapped register SPI3_MCR (address 0x400AD000u). If I do:
volatile int i = SPI3_MCR;
it also crashes. I have disabled the SPI and SPI_NOR drivers in the kernel. It works fine for SPI0:
SPI0_MCR &= ~((0x3 << 28) | (0x1 << 14));
-> no crash, SPI0 works as expected.
I have no idea which part of the kernel blocks the register access from the M4.