STM32
直播中

陈韵瑄

7年用户 979经验值
私信 关注
[问答]

H743在使用FMC接口外接FPGA,在进行读写操作时,FPGA抓不到片选信号和读使能拉低怎么解决?

H743在使用FMC接口外接FPGA,将FPGA视作SRAM,在进行读写操作时,FPGA抓不到片选信号和读使能拉低,但能抓到写使能拉低?
hsram1.Instance = FMC_NORSRAM_DEVICE;hsram1.Extended = FMC_NORSRAM_EXTENDED_DEVICE;/[i] hsram1.Init /hsram1.Init.NSBank = FMC_NORSRAM_BANK1;hsram1.Init.DataAddressMux = FMC_DATA_ADDRESS_MUX_DISABLE;hsram1.Init.MemoryType = FMC_MEMORY_TYPE_SRAM;hsram1.Init.MemoryDataWidth = FMC_NORSRAM_MEM_BUS_WIDTH_8;hsram1.Init.BurstAccessMode = FMC_BURST_ACCESS_MODE_DISABLE;hsram1.Init.WaitSignalPolarity = FMC_WAIT_SIGNAL_POLARITY_LOW;hsram1.Init.WaitSignalActive = FMC_WAIT_TIMING_BEFORE_WS;hsram1.Init.WriteOperation = FMC_WRITE_OPERATION_ENABLE;hsram1.Init.WaitSignal = FMC_WAIT_SIGNAL_DISABLE;hsram1.Init.ExtendedMode = FMC_EXTENDED_MODE_DISABLE;hsram1.Init.AsynchronousWait = FMC_ASYNCHRONOUS_WAIT_DISABLE;hsram1.Init.WriteBurst = FMC_WRITE_BURST_DISABLE;hsram1.Init.ContinuousClock = FMC_CONTINUOUS_CLOCK_SYNC_ONLY;hsram1.Init.WriteFifo = FMC_WRITE_FIFO_DISABLE;hsram1.Init.PageSize = FMC_PAGE_SIZE_NONE;/[i] Timing /Timing.AddressSetupTime = 15;Timing.AddressHoldTime = 15;Timing.DataSetupTime = 60;Timing.BusTurnAroundDuration = 15;Timing.CLKDivision = 16;Timing.DataLatency = 17;Timing.AccessMode = FMC_ACCESS_MODE_A;
while(1){printf("fpga test start WRITE !!!!!!!!!!rn");for(i = 0, writedata = 0; i < 255; i++, writedata++){[i](uint8_t)(Bank1_FPGA_ADDR + i)=writedata;}HAL_Delay(2000);printf("fpga test start READ !!!!!!!!!!rn");for(i = 0; i < 255; i++){readdata = [i](uint8_t)(Bank1_FPGA_ADDR + i);}printf("fpga test end !!!!!!!!!!rn");HAL_Delay(2000);}



回帖(1)

刘凯

2024-3-11 15:05:48
你检查下时序参数,连线,片选脚的连接、地址给对没有。
举报

更多回帖

发帖
×
20
完善资料,
赚取积分