programming SPI

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

programming SPI

跳至解决方案
2,995 次查看
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.

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,415 次查看
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 项奖励
回复
3 回复数
1,415 次查看
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 项奖励
回复
1,415 次查看
rockillos
Contributor I
Ok, they are not ProcessExpert examples but I will use them. Thank you
0 项奖励
回复
1,416 次查看
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 项奖励
回复