SPI MC9S12GA240 communication with 25AA512 EEPROM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI MC9S12GA240 communication with 25AA512 EEPROM

620 Views
madhura_bhandig
Contributor I

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

0 Kudos
2 Replies

441 Views
lama
NXP TechSupport
NXP TechSupport

Hi

I would like to provide you a SW example written for device which is strong and powerful predecessor of the simplified S12G device.

I believe it will help you.

Best regards,

Ladislav

0 Kudos

441 Views
madhura_bhandig
Contributor I

Thank you so much. Will let you know about its working.

Regards,

Madhura

0 Kudos