Dear Sirs/Madams, I am using the 5402 Dsk. I am using the Mcbsp0 and I want that when the port receives a data, an interrupt will be executed. In order to do that, I write firstly: IMR=0x0010 to enable Brint0; IFR=0x3FFF to disable all interrupts; asm(" RSBX INTM");to enable all maskable interrupts;Do you know another way to put a zero in the INTM bit? My first problem is that when I view the value of the address 1 in the data space in the system memory (it must be IFR), this value is 0x0030 and it is not 0x3FFF!!!Why??? But as I only need to use the interrupt associated to the Brint0 and the bit number 4 is high, I suppose that it may work properly. Is it correct? I have the following Isr: interrupt void lee_dato(void) {int i; i=2; printf("%s\n","entro"); dato = MCBSP_read16 (mhMcbsp); MCBSP_write16 (mhMcbsp,dato); } Each time the Isr is executed, I would observe in the stdout the word "entro", wouldn't I?(Actually I don't see anything) And I have the next file: ........ .global _c_int00 ; .global _lee_dato, _escribe_dato .global _lee_dato .sect ".vectors" ............. BRINT0: BD _lee_dato ; McBSP#0 receive interrupt/*he intentado usar FB permite salto entre pinas como me dijo Isidro pero este procesador no lo permite*/ NOP NOP ........... And I have a 0x0001 in the spcr10 register so each time the bit rrdy is high, the function lee_dato should be executed, shouldn't it? I would be thankful to read any suggestions. Thanks for your help. Roberto Espinosa |
configuration for interruptions
Started by ●August 13, 2003