为了试验dg128中断嵌套,我编写了如下程序:
设置定时中断0、1、2,默认优先级。进入0定时中断后,我打开1定时中断,关闭2定时中断,并打开全局中断,然后做死循环;1定时中断服务程序每隔5000个定时计数器对PORTB_BIT0位取反;2定时器中断服务程序每隔7000个定时计数器对PORTA_BIT0位取反。
程序结果如我设想那样运行——PORTB_BIT0位不断在做取反运算,PORTA_BIT0位始终不变。
但我让程序运行了一会后,它自动停止了并报错:
FCS Warning (ID 25): writing to reserved register at pc = 0xc021. Value: 0xC0, Memory Address: 0x3FF.
FCS Warning (ID 25): writing to reserved register at pc = 0xc021. Value: 0x0, Memory Address: 0x3FD.
FCS Warning (ID 25): writing to reserved register at pc = 0xc021. Value: 0x0, Memory Address: 0x3FE.
FCS Warning (ID 25): writing to reserved register at pc = 0xc021. Value: 0xC0, Memory Address: 0x3FB.
FCS Warning (ID 25): writing to reserved register at pc = 0xc021. Value: 0x49, Memory Address: 0x3FC.
FCS Warning (ID 25): writing to reserved register at pc = 0xc021. Value: 0x1, Memory Address: 0x3F9.
FCS Warning (ID 25): writing to reserved register at pc = 0xc021. Value: 0x1B, Memory Address: 0x3FA.
FCS Warning (ID 25): writing to reserved register at pc = 0xc021. Value: 0xC0, Memory Address: 0x3F8.
FCS Warning (ID 26): reading from reserved register at pc = 0xc035. Value: 0x0, Memory Address: 0x3F8.
FCS Warning (ID 26): reading from reserved register at pc = 0xc035. Value: 0x0, Memory Address: 0x3F9.
FCS Warning (ID 26): reading from reserved register at pc = 0xc035. Value: 0x0, Memory Address: 0x3FA.
FCS Warning (ID 26): reading from reserved register at pc = 0xc035. Value: 0x0, Memory Address: 0x3FB.
FCS Warning (ID 26): reading from reserved register at pc = 0xc035. Value: 0x0, Memory Address: 0x3FC.
FCS Warning (ID 26): reading from reserved register at pc = 0xc035. Value: 0x0, Memory Address: 0x3FD.
FCS Warning (ID 26): reading from reserved register at pc = 0xc035. Value: 0x0, Memory Address: 0x3FE.
FCS Warning (ID 26): reading from reserved register at pc = 0xc035. Value: 0x0, Memory Address: 0x3FF.
FCS Warning (ID 26): reading from reserved register at pc = 0x1. Value: 0x0, Memory Address: 0x4. MEBI module is affected.
FCS Warning (ID 26): reading from reserved register at pc = 0x1. Value: 0x0, Memory Address: 0x5. MEBI module is affected.
ILLEGAL_BP