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

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

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

1,176 Views
修華許
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

Labels (1)
5 Replies

730 Views
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

730 Views
修華許
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.

730 Views
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

730 Views
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 Kudos

729 Views
修華許
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 Kudos