I'm now trying to start establishing communication between STM32F4 Discovery Board and an SPI slave over SPI1.
There is an example project named "SPI_Test.slx" in the path \STM32-MAT\STM32\STM32demos\Test\SPI. But I can't well understand, what's the main work of the MATLAB Function block "generateBuff" that is used in this project.
1) Before transmitting data over SPI, this data must be temporarily stored in a buffer. This MATLAB Function block generates a 32-bit buffer to store the data that is going to be sent. Right?
2) The output "Buff" refers to the address of the generated buffer, in which the data are stored. Right?
3) Another output port "NbChar" indicates how many numbers of data will be sent. Right?
4) The Buffer_Size_Send value in the SPI block must be equal to Nb2Send. Right?
Thank you very much!