In my system,SHARC as a master to boot from the spi flash at beginning ,and then as a slave to recive the data.andone can tell how to change the SHARC from master to slave.
From the above description I understand that you want to load the code first from a FLASH devices via SPI master mode and then in the application you want to configure the SPI as slave to receive the data. Please let me know if this is correct understanding.
If it is so, then I would suggest you to write a simple code first which configures the SPI as slave and is able to receive the data via emulator. Once you are able to do so , then generate a loader file for the same and use the Flash Programmer Utility available in the Visual DSP to program the flash in order to boot via SPI master mode.
With this way, initially, to load the boot kernel the SPI will be in master mode and once it loads the user defined code, it will be re-configured to act as slave and receive the data inside main() function.
Apart from this, I would also like to tell you that instead of changing the configuration of the SPI from master to slave, you can make use of secondary SPI as well, to receive the data in slave mode.
SHARC processor has two SPI peripherals, SPI and SPIB. Booting takes place only from primary SPI. So SPIB can be configured in your code to receive the data.
Please let me know if this helps.
If not, then I request you to kindly provide more details regarding your application, so that we can assist you better with the issue.
Retrieving data ...