Initialising SPI in MC9S12GA240

Showing results for 
Search instead for 
Did you mean: 

Initialising SPI in MC9S12GA240

Contributor III
Like MODRR register in MC9S12XEP100, is there any routing register to make that port (Say PJ0- PJ3 for SPI1) dedicatedly for SPI?
What are the steps to initialize the SPI1 in MC9S12GA240?
1 Reply

NXP TechSupport
NXP TechSupport

Hi Harshal,

I have added my comments and examples to your second question Interfacing 25AA512 EEPROM to MC9S12GA240 using SPI 

Unfortunately, S12G MCUs have no MODRR register. The Signals and Priorities for Port J can be found in "Table 2-4. Signals and Priorities" in the chapter "2.3 PIM Routing - Functional description" in the reference manual.

The signals available on each pin of port J can be found in the chapter 2.3.11 Pins PJ7-0 in the reference manual.

Also, you can look at the chapter SPI Control Register 1 (SPICR1) in the reference manual.

I attached the code for MC33972 which was created for the S12XE (S12XE and S12G have the same SPI module).

The initialization of SPI you can find in the examples. For more details see Chapter 21 Serial Peripheral Interface (S12SPIV5) in the reference manual.

I hope it helps you.

Best regards,