Hi, I am trying to use the filesystem with a NOR flash (AT45DB641E) on SPI1. I have all the middleware pulled in okay, but I cannot find where to tell it to use SPI1. It uses SPI0 by default, which is conflicting with stuff I already have on SPI0, hence the need to get it onto SPI1. Also I can't see where the SPI speed is set either. I have tried setting "#define DRIVER_SPI_NUM 1", but this seems to be ignored (probably too late by the time it reaches that header file). I am using finit to initialise it all. (Maybe I need to also call "SPIdrv->Initialize" or something??)
I'm guessing I missed something pretty basic. (This is the first time I have really used Keil middleware).
So, really my questions are: 1) How can I get the filesystem to use SPI1, instead of SPI0? 2) How do I set the SPI1 speed?
I guess maybe the problem is I don't quite get how Driver_flash0 connects to Driver_SPI1?
Oh, and by the way I am using CMSIS v5.0.1, and middleware 7.4.0
You must apply the definition: - on AT45DB641E.c (select file in Project Window and press Alt+F7, then select C/C++ tab and enter the define) - on global scope (open Options for Target dialog, select C/C++ tab and enter the define)
In C/C++ tab you may enter the values: DRIVER_FLASH_NUM=x DRIVER_SPI_NUM=x DRIVER_SPI_BUS_SPEED=x
where x is the value you want to redefine.
Thanks very much for the help, my application is now happily writing into the flash on SPI1.