Tool/software: Linux
Hi,
I am using custom board with AM3352 processor, which is connected with STM32 controller on SPI interface. In our case, STM controller is the master of this SPI connection and AM3352 is the slave. We have developed our custom driver for AM3352 to work in slave mode and communicate with the master.
Using this driver, the slave is able to send the data to master but at the time of receiving the data from the master, the driver is not generating interrupt. I found using "omapconf" application that data is received in SPI RX0 buffer. But somehow the interrupt is not generated.
Following are the configuration of SPI registers at the time of receiving the data:
MCSPI_CH0CONF: 10061380
MCSPI_IRQENABLE: 00000004
MCSPI_MODULCTRL: 00000006
In our case SPID0 is MISO (output for AM3352) and SPID1 is MOSI(Input for AM3352). We are using gpio for chip select and able to get interrupt for it. Following are the registered interrupts where SPI_SLAVE_CS is chip select interrupt and SPI_SLAVE_RCVR is SPI interrupt.
root@myboard:~# cat /proc/interrupts
CPU0
16: 41802 INTC 68 Level gp_timer
20: 3577 INTC 12 Level 49000000.edma_ccint
22: 45 INTC 14 Level 49000000.edma_ccerrint
26: 3 INTC 96 Level 44e07000.gpio
46: 2 44e07000.gpio 19 Edge wl18xx
56: 1 44e07000.gpio 29 Edge eth0
59: 0 INTC 98 Level 4804c000.gpio
65: 0 4804c000.gpio 5 Edge SPI_SLAVE_RCVR
92: 444 INTC 32 Level 481ac000.gpio
114: 444 481ac000.gpio 21 Edge SPI_SLAVE_CS
125: 0 INTC 62 Level 481ae000.gpio
158: 3651 INTC 72 Level OMAP UART0
159: 12 INTC 74 Level
161: 276 INTC 70 Level 44e0b000.i2c
162: 3 INTC 71 Level 4802a000.i2c
163: 60 INTC 30 Level 4819c000.i2c
164: 8512 INTC 64 Level mmc1
165: 621 INTC 28 Level mmc2
166: 1412 INTC 29 Level mmc0
180: 0 INTC 111 Level 48310000.rng
181: 51 INTC 18 Level musb-hdrc.0
182: 0 INTC 17 Level 47400000.dma-controller
Err: 0
root@myboard:~#
Am I missing any configuration to generate interrupt on data receiving in Rx0 buffer?
Regards,
Rohit