About SPI for MPC5748G

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

About SPI for MPC5748G

Jump to solution
782 Views
akhileshverneka
Contributor II

 

Sir is there a need to do Chip Select first and then push data into Tx fifo.

0 Kudos
1 Solution
748 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

you need to write 32bit word into PUSHR (16bit command+ 16bit data). This command word specify CTAR used, which chipselect is used, etc.

So assuming DSPI_3_PUSHR = 0x08011111, command word is 0x0801. That means CTAR0 setting is used and PCS0 will be asserted during transfer. Also EOQ bit is set so further transfers will not continue until SR[EOQF] is cleared.

 

BR, Petr

 

View solution in original post

0 Kudos
3 Replies
778 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

because it is defined this way in header file, see MPC5748G.h file.

You can also use DSPI_3_PUSHR = 0x08011111;

 

BR, Petr

0 Kudos
772 Views
akhileshverneka
Contributor II

Sir do we need to add data into fifo and do chip select or do chip select first and push data into fifo.

 

 

0 Kudos
749 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

you need to write 32bit word into PUSHR (16bit command+ 16bit data). This command word specify CTAR used, which chipselect is used, etc.

So assuming DSPI_3_PUSHR = 0x08011111, command word is 0x0801. That means CTAR0 setting is used and PCS0 will be asserted during transfer. Also EOQ bit is set so further transfers will not continue until SR[EOQF] is cleared.

 

BR, Petr

 

0 Kudos