PEx SPI Bidirectional mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

PEx SPI Bidirectional mode

跳至解决方案
1,271 次查看
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 项奖励
回复
1 解答
1,060 次查看
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 项奖励
回复
2 回复数
1,061 次查看
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 项奖励
回复
1,060 次查看
juanma_clautron
Contributor II

Thanks!! I did it manually

0 项奖励
回复