Spi mode - Processor expert - Kl25

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Spi mode - Processor expert - Kl25

1,575件の閲覧回数
wilk
Contributor II

Hello,

How can I configure spi mode 3 in Processor expert for the kl25 please ?

The data changes on the falling edge of the clock and is read/written on the rising edge of the clock.

Thanks !

Best regards

ラベル(2)
4 返答(返信)

1,013件の閲覧回数
dkarthik
Contributor II

Hi Wang,

Have you checked the attributes setting in the properties of the SPI component of Processor Expert?

Regards,

Karthik

1,013件の閲覧回数
wilk
Contributor II

Sure I checked it, there are 3 possibilities :

- rising or falling edge

- falling edge

- rising edge

The point is that I don't understand which one would be appropriate to spi mode 3.

0 件の賞賛
返信

1,013件の閲覧回数
dkarthik
Contributor II

Let us know what is SPI mode 3.

In general, the appropriate settings depend on the devices that are communicating. If your MCU is master and you are communicating with a slave, settings for both the devices should match.

1,013件の閲覧回数
BlackNight
NXP Employee
NXP Employee

there are three fundamental settinigs for SPI:

- bit order: MSB or LSB

- clock idle polarity: high or low

- clock shift edge: data is shifted on raising or falling edge

Clock polarity and shift edge (two values) build the four modes. See Serial Peripheral Interface Bus - Wikipedia, the free encyclopedia

I assume that your device is using MSB, so configure this as such.

From your original question, it looks you need to set it to 'shifted at rising edge'.

Clock idle polarity: check your device data sheet.

Have a look at Tutorial: Nordic Semiconductor nRF24L01+ with the Freescale FRDM-K64F Board | MCU on Eclipse (search for 'polarity')

0 件の賞賛
返信