I have set up the FMC with the following:
/* Initialize the SRAM controller */ RCC->AHB3ENR |= 1; // turn on FMC BSP_LED_Toggle(LED3); FMC_Bank1->BTCR = 0X00001081; FMC_Bank1->BTCR = 0X00070607; /* initialize FMC I/O bus */ RCC->AHB1ENR |= 0X78; // turn on D, E, F and G BSP_LED_Toggle(LED3); GPIOD->MODER = 0xa000080a; GPIOD->AFR = 0x00c000cc; GPIOD->AFR = 0xcc000000; GPIOE->MODER = 0x002a8000; GPIOE->AFR = 0xc0000000; GPIOE->AFR = 0x00000ccc; GPIOF->MODER = 0xaa000aaa; GPIOF->AFR = 0x00cccccc; GPIOF->AFR = 0xcccc0000; GPIOG->MODER = 0x0000002a; GPIOG->AFR = 0x00000ccc;
I am only using the NWE signal to latch data into an FPGA. The bus speed is slow, with 21 clocks per transaction. When it sends data, the timing looks ok. The problem is there is no data transmitted until the address gets into the range of 0xa00. The data on the data bus seems ok because sending 0x69 shows up on the data bus correctly when viewed on a 'scope.
I tried turning off the FIFO, but it did not make any difference. The address bus is firing, but no data comes out for addresses below a certain point. Since data does come out, the FMC seems to be set up correctly - but why is there no data below a certain point?