S32K146 SPI Master - clock irregularities

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

S32K146 SPI Master - clock irregularities

2,855 次查看
partis
Contributor III

We have a S32K146 running as an SPI master, at 4Mbps, DMA and transferring around 500 bytes per frame.

Often, at each 32nd bit multiple of data transfer, the bit is sometimes incorrect.

Looking on a 'scope, the S32K generated SPI clock, is truncated, during its high period (from 125ns to 62ns). This happens every 32 bits, consistantly. The clock appears perfect in every other respect, with no delays/stalling etc.

Is this a known issue, incorrect SPI setup (we are using AutoSar), or something else?

 

Gary Partis
标签 (1)
0 项奖励
回复
2 回复数

2,382 次查看
mattiasecchiaro
Contributor I

Hi,

we have observed same issue on a project running on S32K148.

LPSPI2 is configured with Processor Expert as per attached image "spi_PE_setup.jpg". Furthermore:

  • we configure 3 wire SPI by setting PINCFG = 10b and OUTCFG = 1
  • we have a protocol with 9 bits words on writing and 8 bits words on reading, so at runtime we change accordingly value of FRAMESZ

As shown in image "SPI_waveform_1.jpg", first clock bit has a period that is a half of the others (so first bit is clocked at 5MHz instead of 2.5MHz). Same issue is shown in "SPI_waveform_2.jpg", where we have inserted a delay between words, to highlights that issue involves first bit of the word.

Is this a known issue? Or an incorrect SPI setup?

Thanks.

0 项奖励
回复

2,718 次查看
namnguyenviet
NXP Employee
NXP Employee

Hi,

Could you please provide us your SPI configuration? 

0 项奖励
回复