S32K312 关于SPI问题

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

S32K312 关于SPI问题

Jump to solution
4,416 Views
Bert2023
Contributor III

你好:

在S32K312 EVB上使用FreeRTOS_Toggle_Led_Example_S32K312例程(DS3.4+RTD2.0.0),添加SPI传输功能 ,master:LPSPI_2,  Salve : Flexio_SPI, 目前master 端和slave端都接收不到数据,请帮忙检查一下是配置问题还是code问题。

添加SPI功能参考Lpspi_Flexio_Ip_Transfer_S32K344(DS3.5_RTD3.0.0,DS3.5中自带例程,因为要配制master:LPSPI_2,  Salve : Flexio_SPI,所以参考此demo)。

添加例程如附件:FreeRTOS_Toggle_Led_Example_S32K312_SPI_1119.zip

目前排除问题如下:

1.接线问题已排除,因为使用Lpspi_Flexio_Ip_Transfer_S32K312(DS3.4 自带例程,FlexIO为master,LPSPI_2为slave)能够正常接收。但是将Lpspi_Flexio_Ip_Transfer_S32K312 demo中将FlexIO为slave,LPSPI_2为master发现master 端和slave端也是都接收不到数据的。

所以请帮查看FreeRTOS_Toggle_Led_Example_S32K312_SPI_1119.zip demo code问题,或是将Lpspi_Flexio_Ip_Transfer_S32K312 demo code 改为master:LPSPI_2,  Salve : Flexio_SPI 模式。

Lpspi_Flexio_Ip_Transfer_S32K312 demo code 如附件。

多谢,

 

0 Kudos
Reply
1 Solution
4,359 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Bert2023

我在使用RTD 2.0.0配置S32K312的FlexIO的DMA的时候总会遇到些问题,这个版本太老了可能存在些问题,

我在RTD 3.0.0 P07上做了一个S32K312的demo,我测了下没什么问题。

其实在RTD 3.0.0上已经提供了SPI作为主机,FlexIO作为从机的例程,但是其基于S32K344制作的,我也是

参考这个demo测试的。

View solution in original post

0 Kudos
Reply
5 Replies
4,360 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Bert2023

我在使用RTD 2.0.0配置S32K312的FlexIO的DMA的时候总会遇到些问题,这个版本太老了可能存在些问题,

我在RTD 3.0.0 P07上做了一个S32K312的demo,我测了下没什么问题。

其实在RTD 3.0.0上已经提供了SPI作为主机,FlexIO作为从机的例程,但是其基于S32K344制作的,我也是

参考这个demo测试的。

0 Kudos
Reply
4,356 Views
Bert2023
Contributor III
所以如果S32K312做开发,需要DS3.5+RTD3.0.0 这样的搭配?
0 Kudos
Reply
4,339 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Bert2023

不一定是RTD 3.0.0呀,现在的版本已经出到5点几了。如果是新开发的,用RTD2.0.0肯定是太旧了吧,没有任何理由还用旧版本吧。

0 Kudos
Reply
4,371 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Bert2023

抱歉回复你的有点迟,我正在处理你的问题,我还需要点时间

0 Kudos
Reply
4,381 Views
Bert2023
Contributor III

Hi,你好:

目前问题进展如下:

DS3.5+RTD3.00  配置master:LPSPI_2,  Salve : Flexio_SPI 收发正常,同样的配置在DS3.4+RTD2.00 时只有Slave 端能接收到数据,而master端RX接收不到数据,例程如下,请帮忙check一下,是什么原因导致的?

多谢!

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1996689%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ES32K312%20About%20SPI%20Issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1996689%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%3A%3C%2FP%3E%3CP%3EUse%20FreeRTOS_Toggle_Led_Example_S32K312%20routine%20(DS3.4%2BRTD2.0.0)%20on%20S32K312%20EVB%2C%20add%20SPI%20transmission%20function%2C%20master%3A%20LPSPI_2%2C%20Salve%3A%20Flexio_SPI%2C%20currently%20both%20the%20master%20and%20slave%20ends%20cannot%20receive%20data%2C%20please%20help%20check%20whether%20it%20is%20a%20configuration%20problem%20or%20a%20code%20problem.%3C%2FP%3E%3CP%3EAdd%20SPI%20function%20reference%20Lpspi_Flexio_Ip_Transfer_S32K344%20(DS3.5_RTD3.0.0%2C%20DS3.5%20comes%20with%20routines%2C%20because%20you%20need%20to%20configure%20master%3A%20LPSPI_2%2C%20Salve%3A%20Flexio_SPI%2C%20so%20refer%20to%20this%20demo).%3C%2FP%3E%3CP%3EAdd%20the%20example%20code%20as%20the%20attachment%3A%20FreeRTOS_Toggle_Led_Example_S32K312_SPI_1119.zip%3C%2FP%3E%3CP%3EThe%20following%20are%20the%20current%20issues%20to%20be%20eliminated%3A%3C%2FP%3E%3CP%3E1.%20The%20wiring%20problem%20has%20been%20ruled%20out%20because%20Lpspi_Flexio_Ip_Transfer_S32K312%20(DS3.4%20In%20the%20built-in%20routine%2C%20FlexIO%20is%20the%20master%20and%20LPSPI_2%20is%20the%20slave)%20and%20it%20can%20be%20received%20normally.%20However%2C%20in%20the%20Lpspi_Flexio_Ip_Transfer_S32K312%20demo%2C%20FlexIO%20is%20the%20slave%20and%20LPSPI_2%20is%20the%20master.%20It%20is%20found%20that%20neither%20the%20master%20nor%20the%20slave%20can%20receive%20data.%3C%2FP%3E%3CP%3ESo%20please%20help%20check%20the%20FreeRTOS_Toggle_Led_Example_S32K312_SPI_1119.zip%20demo%20code%2C%20or%20change%20the%20Lpspi_Flexio_Ip_Transfer_S32K312%20demo%20code%20to%20master%3ALPSPI_2%2C%20Salve%3AFlexio_SPI%20mode.%3C%2FP%3E%3CP%3ELpspi_Flexio_Ip_Transfer_S32K312%20demo%20code%20is%20attached.%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1999867%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K312%20SPI%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1999867%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ESo%20if%20S32K312%20is%20used%20for%20development%2C%20a%20combination%20of%20DS3.5%20and%20RTD3.0.0%20is%20required%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1998580%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K312%20about%20SPI%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1998580%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EThe%20current%20progress%20of%20the%20problem%20is%20as%20follows%3A%3C%2FP%3E%3CP%3EDS3.5%2BRTD3.00%20Configuration%20%3CSPAN%3Emaster%3A%20LPSPI_2%2C%20Salve%3A%20Flexio_SPI%20transmission%20and%20reception%20are%20normal.%20With%20the%20same%20configuration%20in%20DS3.4%2BRTD2.00%2C%20only%20the%20Slave%20end%20can%20receive%20data%2C%20while%20the%20master%20end%20RX%20cannot%20receive%20data.%20The%20routine%20is%20as%20follows.%20Please%20help%20check%20what%20is%20the%20cause%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EMany%20thanks!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E