PEx SPI Bidirectional mode

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

PEx SPI Bidirectional mode

Jump to solution
971 Views
juanma_clautron
Contributor II

Hi people

Previously I used the S08 microntroller and the SPI Processor Expert component allowed me to used the "Bidirectional mode" (see attached file 01.png). The description says this option is only available for Coldfire, S08 and S12.

Nowadays I'm working with the MKE02Z64 microntroller and the PEx doesn't let me to choose the setting Bidirectional mode, but in the datasheet says that it's an option you can set (02.png > KE02 Sub-Family Reference Manual > 29.4.6.2 Bidirectional mode (MOMI or SISO) page 513).

Do I need to configure it manually?

Thanks!

0 Kudos
1 Solution
760 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

The SPI components (SPIMaster_LDD and SPISlave_LDD) does not support Bidirectional mode of SPI.  You can use these SPI component and SPI PDD macros (SPI_PDD_EnableBidirectionalMode and  SPI_PDD_EnableOutputInBidirectionalMode) to configure and control the bidirectional mode of SPI. You can also freeze the generated code of the SPI component (open the context menu of the SPI component in the Components window and select Code Generation > Don't Write Generated Component Modules) and modify the generated SPI driver by using following PDD macros, see for example usage in initialization code:

SPI_PDD_EnableBidirectionalMode(SPI0_BASE_PTR, PDD_ENABLE);

SPI_PDD_EnableOutputInBidirectionalMode(SPI0_BASE_PTR, PDD_ENABLE);

Best Regards,

Marek Neuzil

View solution in original post

0 Kudos
2 Replies
761 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

The SPI components (SPIMaster_LDD and SPISlave_LDD) does not support Bidirectional mode of SPI.  You can use these SPI component and SPI PDD macros (SPI_PDD_EnableBidirectionalMode and  SPI_PDD_EnableOutputInBidirectionalMode) to configure and control the bidirectional mode of SPI. You can also freeze the generated code of the SPI component (open the context menu of the SPI component in the Components window and select Code Generation > Don't Write Generated Component Modules) and modify the generated SPI driver by using following PDD macros, see for example usage in initialization code:

SPI_PDD_EnableBidirectionalMode(SPI0_BASE_PTR, PDD_ENABLE);

SPI_PDD_EnableOutputInBidirectionalMode(SPI0_BASE_PTR, PDD_ENABLE);

Best Regards,

Marek Neuzil

0 Kudos
760 Views
juanma_clautron
Contributor II

Thanks!! I did it manually

0 Kudos