SCU_APBPeriphClockConfig(__SSP0 ,ENABLE); What is your GPIO setup? You need to enable the SPI before sending it data, ie, SSP_Cmd(SSP0,ENABLE) must come before SSP_SendData
I'm trying to make a communication with SPI Flash memory. For this porpose I'm using Keil's MCB-STR9 ver.3 demo board. CPU - STR912FW44X6. - SPI0 inits: Motorola SPI Frame format, 8bits data format, Master, ... Firstly I still can not succeed to make SPI0 to send the byte I write in SSP0->DR register.(for example: I write 0xAA it sends 0x00); To make SPI0 to send what I expect I make some workaround: > SSP_Cmd(SSP0, DISABLE); > SSP_SendData(SSP0, Dat); > SSP_Cmd(SSP0, ENABLE); After this it sends what I expect, but I think it is not the right way. Does anyone have such problem? Where is my mistake? Thanks a lot in advance!!