How to control a SPI(SynchroMaster) CS pin directly?

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

How to control a SPI(SynchroMaster) CS pin directly?

1,202件の閲覧回数
修華許
Contributor III

I am using a FRDM-KE06Z board.

I use PE to establish a SynchroMaster in my project.

It seems that freescale's SPI function like SendChar and RecvChar has already control CS pin of SPI automatically

( In other MCU, I have control CS pin directly)

 

My problem is that Sometimes I need to control the CS pin of SPI interface directly to wake up the external IC

Can I assign the CS pin in PE as BitIO in the same time?

 

Thanks for help

ラベル(1)
5 返答(返信)

756件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Yes, in all my applications I have the CS pin disabled in the SynchroMaster component, and use a normal BitIO instead.

Erich

756件の閲覧回数
修華許
Contributor III

But I try to Disable the Slave select pin.

The value is fixed at enable and can't be changed .

How can you disable the Slave pin?

Do you use another pin instead and ignore the default CS pin ?

I use FRDM-KE06Z board.

756件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hmm, maybe disabling the CS pin is not supported by the hardware? Otherwise this would be a bug of Processor Expert in my view.

You should be able to use a BitIO in parallel, but then at least you need to enable Pin Sharing.

See "Pin with Pin Sharing" in Tutorial: Bits and Pins with Kinetis and the FRDM-KL25Z Board | MCU on Eclipse

I hope this helps,

Erich

756件の閲覧回数
mstroven
Contributor III

Hi Erich,

The hardware supports it.  It looks like another PEx bug.  If you instantiate an "SPI_Init" Hardware Initialization component, you can chose to use the Slave Select pin, or not.  However if you want the full-featured SPI high-level component, you don't get the choice.

0 件の賞賛

755件の閲覧回数
修華許
Contributor III

Thanks.

I try to follow your article to set pin sharing

And find that pin sharing option is not allowed to set.

Bad News.

0 件の賞賛