I just revived one of my projects after having reinstalled my computer with Ubuntu 11.10. The code is supposed to work on Olimex STM32P107 and uses the most recent chibios trunk (I made the mistake of directly updating chibios before trying out the code...).
Unfortunately the code goes into an unhandled exception in dmaStreamAllocate in line 449 when I try to connect to the SD card over SPI 3.
Code: Select all
/* Putting the stream in a safe state.*/
dmaStreamDisable(dmastp);
dmaStreamClearInterrupt(dmastp); // <---- Segfault here!
dmastp->channel->CCR = STM32_DMA_CCR_RESET_VALUE;
Code: Select all
10 dmaStreamAllocate() stm32_dma.c:448 0x08020428
9 spi_lld_start() spi_lld.c:258 0x080212f6
8 spiStart() spi.c:108 0x0801f034
7 mmcConnect() mmc_spi.c:312 0x0801f70e
6 InsertHandler() mmcModule.c:55 0x08008082
5 chEvtDispatch() chevents.c:272 0x0801da6a
4 ThreadMMCWorker() mmcModule.c:94 0x0800813e
3 _port_thread_start() chcore_v7m.c:189 0x0801c0c2
2 chSchDoReschedule() chschd.c:302 0x0801cd70
1 <symbol is not available> 0x00000000
Given that the code base has seen quite extensive changes in the DMA layer, is there anything specific I can look at?
(Too bad that EmbSys does not resolve the cause of a CM3 segfault, I guess I have to dig in the registers in the end...)