How to configure a input trigger for LPSPI in s32k ?

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

How to configure a input trigger for LPSPI in s32k ?

945 次查看
Guna
Contributor I

Our project is configured/developed using EB Tresos.

Our idea is that there is a slave and when it wants to communicate with the master(our MCU). It will set a GPIO pin as high. So the master must do the data transfers as long as this pin is high. How to do this?

What are the important troubles that we may have to look for? Thanks.

 

标记 (1)
0 项奖励
回复
5 回复数

905 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Guna,

Which version of the RTD drivers do you have?

Spi Host Request feature is not supported in RTD 3.0.0 but it is supported in RTD 4.0.0.

Refer to the RTD_SPI_UM.pdf

Section 3.6.11 How to configure to use Spi Host Request feature.

...\SW32K3_S32M27x_RTD_R21-11_4.0.0\eclipse\plugins\Spi_TS_T40D34M40I0R0\doc\

S32DS installation directory:

c:\NXP\S32DS.3.5\S32DS\software\PlatformSDK_S32K3\RTD\Spi_TS_T40D34M40I0R0\doc\

 

Regards,

Daniel

 

0 项奖励
回复

889 次查看
Guna
Contributor I

We are using 3.0.0 only. Any method u know on how to configure GPIO SPI interrupt request(Or Host req feature) in s32k358 . Presently we are configuring ICU driver for interrupt but the drawback is after every data transfer we have to manually look using software whether that GPIO is high, if yes again do the data transfer or end the transfer. In HREQ, i believe this part is totally handled by hardware.

0 项奖励
回复

883 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Guna,

Yes, the LPSPI module supports HW HREQ.

You can refer to the RTD 4.0.0 SPI driver.

We don't have any GPIO solution for that, but you could enable interrupts of both edges.

 

Regards,

Daniel

0 项奖励
回复

860 次查看
Guna
Contributor I

Hi @danielmartynek 

I have another query. I wanted to test SPI is working or not. So, I configured one of our boards as slave and another same board as master. But while configuring I encountered a problem in EBTresos saying Slave can only work in asynchronous transmission. So, I configured slave in Asynchronous mode. Please note that master is our main board it has to be synchronous mode and we configured slave to just test the master.

Two queries: -

1. Can we configure LPSPI as slave in synchronous mode? 

2. If not, then if we connect master and slave together--will it work(as the parameters are same only in master and slave, i only changed SpiPhyUnitMode from master to Slave and Unchecked SpiPhyUnitSync in Slave side)?

We are using S32K3 Real-Time Drivers AUTOSAR 4.4 & R21-11 Version 3.0.0.

N.B refer image attached for reference.

0 项奖励
回复

850 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Please create a new thread if the question is not on the original subject of this thread.

 

Thank you,

BR, Daniel

0 项奖励
回复