For GPIO: You aren't going to get (significantly) faster than FastIO.
For SPI: I would get the reference manual, and write your own code based on the registers. You can use standard code (for example by making an mbed SPI object) to do all the initialisations and not having to worry about pinouts, etc. After that just for the transactions, use registers. Generally I am not very impressed by the STM drivers, so for high speed I would stay away from it, and just do it yourself. If you do it well, you should be able to get quite far using C.
Finally, you can look at using hardware CS instead of software. Mbed API itself does not support this sadly, the stm drivers probably do. (Or using registers).
Hello,
does anybody of you have a introduction how to program the stm32F4 with assembler? At the moment i am using the normal "mbed.h" library but it doesn't work so fast as i mentioned. Now i wanna program a assemlber inline function which does it faster.. Therefore i wanna know are there any examples for this problem ?