All of these software questions are in regards to the CC2510-CC2511DK. As a note, when you open the spi_cc2510.eww file, in the following path folder: cc1110_cc2510_Basic Software_Examples\ide\iar\examples\spi, within IAR EW 7.60 there are several software examples demonstrating the SPI peripheral functionality. These questions are in regards to that example software:
1. In regards to the spi_ex0_master.c source file, where is U0GCR SFR first initialized in the source code?
2. In regards to the spi_ex0_master.c source file, can you explain the meaning of the following algorithm:
U0GCR = (U0GCR & ~(U0GCR_BAUD_E | U0GCR_CPOL | U0GCR_CPHA | U0GCR_ORDER))
| SPI_BAUD_E;
3. In regards to the spi_ex0_master.c source file, can you explain the following line of code and why is it necessary?
(I never found a write up about why you would write a 1 to a particular port register, eg. P0, P1, P2)
P1_0=1; P1_3=1;