Skip to main content
timotet
Associate II
July 13, 2012
Question

stm32f0 spi dma and no interrupt

  • July 13, 2012
  • 13 replies
  • 2720 views
Posted on July 13, 2012 at 23:08

Hi

Ive been trying to get the SPI DMA TX interrupt to work with no luck.

Im trying to load an array onto the SPI bus then get the interrupt to finish the transaction.

attached is my spi, dma , and nvic setup code.

thanks in advance

tim

#stm32f0-spi-dma
This topic has been closed for replies.

13 replies

Tesla DeLorean
Guru
July 17, 2012
Posted on July 17, 2012 at 02:43

C++ mangles function names based on the input/output parameters of a function, cdecl (or __cdecl in Keil) forces ''C declaration'' mode. I'm not a ''C++'' guy, let me see if I can figure out what GNU/GCC wants.

From your listing file you have :

08001cb8 <
_Z26DMA1_Channel4_5_IRQHandlerv
>:
///DMA interrupt routine
void SPI_PORT_DMA_TX_IRQHandler() {
8001cb8: b580 push {r7, lr}
8001cba: af00 add r7, sp, #0
// Test if DMA Stream Transfer Complete
if (DMA_GetITStatus(DMA1_IT_TC5)) {
8001cbc: 2380 movs r3, #128 ; 0x80
8001cbe: 029b lsls r3, r3, #10
8001cc0: 1c18 adds r0, r3, #0
8001cc2: f000 fbcb bl 800245c <
DMA_GetITStatus
>

Notice that

_Z26DMA1_Channel4_5_IRQHandlerv

is not in the vector table, and consequently will not be called, ever.
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
timotet
timotetAuthor
Associate II
July 17, 2012
Posted on July 17, 2012 at 06:03

thanks alot clive1

learned alot from this.
honestapple
Visitor II
August 20, 2012
Posted on August 20, 2012 at 12:13

Hello, I tried to driving nokia5110 with stm32f0 discovery using spi and dma. The code can enter the dma interrupt routine, but can not display anything on the lcd. Could you give me some advices. Thank you.