programming SPI

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

programming SPI

Jump to solution
2,998 Views
rockillos
Contributor I

hello,

At first I apologize for my bad English. I am new programming microcontrollers and I have a problem. I must program the SPI communication for a slave using CodeWarrior and ProcessExpert. I have the configuration of the I/O ports and the source code automatically built by ProcessExpert, but now I need to complete the source code: events.c, main.c, ... Could anybody pass an example to me? I can not find one in Internet.

Thank you very much.

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
1,418 Views
bigmac
Specialist III

Hello,

 

The examples referenced are rather simplistic, and cover one-way data transfer from master to slave only.  They will not be particularly useful if you require that data be returned from slave back to master.

 

I suggest that you outline what you require to achieve with the SPI link.  How is the SPI master implemented?  The operation of the slave end will need to be compatible with the setup of the master (or vice versa).

 

Regards,

Mac

 

View solution in original post

0 Kudos
Reply
3 Replies
1,418 Views
stanish
NXP Employee
NXP Employee

Hello rockillos,

 

there are some Processor Expert examples (including SPI) available within CodeWarrior Example directory.

(e.g. "<CodeWarrior for Microcontrollers V6.x>\(CodeWarrior_Examples)\HCS08\Device Initialization C Examples\GB60_Modules\Sources\SPI_SLAVE_GB60\main.c" )

 

Stanish

0 Kudos
Reply
1,418 Views
rockillos
Contributor I
Ok, they are not ProcessExpert examples but I will use them. Thank you
0 Kudos
Reply
1,419 Views
bigmac
Specialist III

Hello,

 

The examples referenced are rather simplistic, and cover one-way data transfer from master to slave only.  They will not be particularly useful if you require that data be returned from slave back to master.

 

I suggest that you outline what you require to achieve with the SPI link.  How is the SPI master implemented?  The operation of the slave end will need to be compatible with the setup of the master (or vice versa).

 

Regards,

Mac

 

0 Kudos
Reply