/*----中断服务函数 ----*/ interrupt void Maskable_IntISR7(void) { /* Disable the host interrupt * 0 = Disable the host interrupt output 0 * 1h = Disable the host interrupt output 1 */ gpCIC0_regs->HINT_ENABLE_CLR_INDEX_REG = GpioBank1_pinNum23_host_event_num; if(gpCIC0_regs->ENA_STATUS_REG[CSL_INTC0_GPINT23/32]&(1<<(CSL_INTC0_GPINT23%32))) { /*Clear Interrupt events in CIC input*/ KeyStone_CIC_clear_system_event(gpCIC0_regs, CSL_INTC0_GPINT23); } //读中断 master_clear_int7[master_read_times7] = *(volatile Uint16 *)(SLAVER_TRI_MASTER_INT7_ADRESS); TSC_delay_us(100); switch( 2 ) { case DPRAM_MWSR_TEST: { //--DPRAM-主写从读测试 if(master_write_times6 <= 0x3FF0) { *(volatile Uint16 *)( 0x7C080000 + ((master_write_times6)<<1) ) = master_write_data6; } break; } case DPRAM_SWMR_TEST: { //--DPRAM-从写主读测试 // master_read_data7 = *(volatile Uint16 *)(0x7C080000 + ((master_read_times7)<<1)); master_read_data7 = *(volatile Uint16 *)(0x7C080000 + ((0x2FF + master_read_times7)<<1)); // master_read_data7 = *(volatile Uint16 *)(0x7C080000 + ((0x3FF + master_read_times7)<<1)); // master_read_data7 = *(volatile Uint16 *)(0x7C080000 + ((0x4FF + master_read_times7)<<1)); // master_read_data7 = *(volatile Uint16 *)(0x7C080000 + ((0x5FF + master_read_times7)<<1)); // master_read_data7 = *(volatile Uint16 *)(0x7C080000 + ((0x6FF + master_read_times7)<<1)); // master_read_data7 = *(volatile Uint16 *)(0x7C080000 + ((0x7E5 + master_read_times7)<<1)); // master_read_data7 = *(volatile Uint16 *)(0x7C080000 + ((0x7E0 + master_read_times7)<<1)); if( 0 == test_times) { if(master_read_data7 != slave_write_data7 ) { data_read_write_error++; printf("The data_read_write_error is %d !\n ",data_read_write_error); } if( (14*1024) == master_read_times7) //14*1024=14336=0x3800 { test_times = 0; // puts("The dpram test is successfull."); } if( (14*1024 + 5) == master_read_times7) { test_times = 0; // puts("The dpram test is successfull."); } if( (14*1024 + 9) == master_read_times7) { test_times = 0; // puts("The dpram test is successfull."); } if( (14*1024 + 10) == master_read_times7) //14346+1 = 14347 = 14K + 11次正确读写 { test_times = 0; // puts("The dpram test is successfull."); } if( (14*1024 + 11) == master_read_times7) //第14348次读写,进不来 { test_times = 0; // puts("The dpram test is successfull."); } if( (14*1024 + 12) == master_read_times7) //修改堆区为-heap 0x900,可以进来 { test_times = 0; // puts("The dpram test is successfull."); } if( (14*1024 + 13) == master_read_times7) { test_times = 0; // puts("The dpram test is successfull."); } //14356 if( (14*1024 + 20) == master_read_times7) { test_times = 0; // puts("The dpram test is successfull."); } //0x3822 = 14370 if(0x3822 == master_read_times7) { test_times = 0; puts("The dpram test is successfull."); } if(0x3824 == master_read_times7) { test_times = 0; puts("The dpram test is successfull."); } if(0x3FF0 == master_read_times7) { test_times = 1; puts("The dpram test is successfull."); } } break; } default: break; } //写中断 *(volatile Uint16 *)(MASTER_TRI_SLAVER_INT7_ADRESS) = master_write_data7; slave_write_data7++; master_write_data7++; master_write_times7++; master_read_times7++; /* Enable the host interrupt */ gpCIC0_regs->HINT_ENABLE_SET_INDEX_REG = GpioBank1_pinNum23_host_event_num; }