I am working on SPI Protocol on Mc9S12GA240 controller, trying to interface with SEEPROM-25AA512.
I have set the bits like: In 1) SPICR1: SPI system enable bit, SPI in master mode, CPOL and CPHA both set to low,
Data transferred to MSB first.
2) SPICR2: 8-bit transfer width, SPI clock operates normally in wait mode.
3) SPIBR: Bus clock is 20MHz, Baud rate divisor=2048, Baud rate is set to 9.77kbit/s.
Program is being stucked in while( SPI1SR_SPIF == 0 ).
Please let me know where I am missing. Thanks in advance