Hej, mam problem ze zrozumieniem przyk³adu, wiem do czego jest ka¿dy rejestr, ale jako¶ jednej rzeczy nie rozumiem, otó¿: to jest example z manuala do lpc2294:
VICIntSelect = 0x0000 0000(SPI0, I2C, UART1 and UART0 are IRQ => bit10, bit9, bit7 and bit6=0) VICIntEnable = 0x0000 06C0(SPI0, I2C, UART1 and UART0 are enabled interrupts => bit10, bit9, bit 7 and bit6=1)
VICDefVectAddr = 0x. (holds address at what routine for servicing non-vectored IRQs (i.e. UART1 and I2C) starts)
VICVectAddr0 = 0x. (holds address where UART0 IRQ service routine starts)
VICVectAddr1 = 0x. (holds address where SPI0 IRQ service routine starts)
VICVectCntl0 = 0x0000 0026(interrupt source with index 6 (UART0) is enabled as the one with priority 0 (the highest))
VICVectCntl1 = 0x0000 002A(interrupt source with index 10 (SPI0) is enabled as the one with priority 1)
Pytanie: gdzie jest napisane, ¿e UART0 ma priority 0? Albo inaczej, jak zrobiæ, ¿eby to on mia³ priority 1 (albo np 5) a SPI0 mia³o 0?
Ja rozumiem, ¿e po zezwoleniu i ustawieniu na IRQ tych przerwañ (2 pierwsze linijki kodu), wpisuj±c do VICVectCntl10 warto¶æ 26 (0010 0110), ³±czê dane przerwanie (tu UART0 o chanel nr = 6) z danym slotem (tu jak rozumiem 10). I rozumieim te¿, ¿e jak siê odpali przerwanie to do VICVectAddr zostanie wpisane wygrane przerwanie z którego¶ z VICVectAddr0-15, czyli, ¿e jak wpisze pod VICVectAddr0 nazwê funkcji np UART0() to ona sie "odpali". Ale sk±d procek wie, ¿e ona? ¯e akurat spod VICVectAddr0?
Z góry dziêkujê za odpowied¼. Pewnie co¶ ¼le zrozumia³em, o¶wieæcie proszê
pozdraiwam