SPIMaster_LDD problem

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

SPIMaster_LDD problem

跳至解决方案
2,288 次查看
waldes
Contributor I

Hello,

I have a problem with SPIMaster_LDD component. When I communicate with slave device, the received data is still zero. But I receve the data correctly only in debug mode. I tried to check data communication on an osciloscope and everything is absolutely the same, in run even in debug mode. Program is written according to "help on component" for SPIMaster_LDD. 

 

Thanks a lot for response. 

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,909 次查看
ProcessorExpert
Senior Contributor III

Hi,

 

From a quick look on the project, I haven't found any problem with SPI. However, there seem to be declared interrupts in Init_ADC, Init_PDB, Init_eDMA that have defined ISRs in Events.c. The interrupts are enabled but the handlers do not contain any code. This means that if any of these interrupts comes, the cpu gets stuck in endles loop because the interrupts flag is not cleared. For peripheral initialization components, clearing the flag is up to the user and I recommend to put the flag clearing code there or completely disable these components and try if the problem persists.

 

There is also an example project available that you can check. It's available via welcome screen, using the menu Help > Welcome > Example projects > Processor Expert examples for Kinetis and select SPI.

 

 

best regards
Petr Hradsky
Processor Expert Support Team

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,909 次查看
ProcessorExpert
Senior Contributor III

Hi, 

 

Could you post a sample project showing the problem?

What MCU and CodeWarrior version do you use?

 

best regards
Petr Hradsky
Processor Expert Support and Servicepacks Team

 

0 项奖励
回复
1,909 次查看
waldes
Contributor I

Hello,

I use mcu kinetis MK20DX256ZVLL10 and CW10.2. 

0 项奖励
回复
1,910 次查看
ProcessorExpert
Senior Contributor III

Hi,

 

From a quick look on the project, I haven't found any problem with SPI. However, there seem to be declared interrupts in Init_ADC, Init_PDB, Init_eDMA that have defined ISRs in Events.c. The interrupts are enabled but the handlers do not contain any code. This means that if any of these interrupts comes, the cpu gets stuck in endles loop because the interrupts flag is not cleared. For peripheral initialization components, clearing the flag is up to the user and I recommend to put the flag clearing code there or completely disable these components and try if the problem persists.

 

There is also an example project available that you can check. It's available via welcome screen, using the menu Help > Welcome > Example projects > Processor Expert examples for Kinetis and select SPI.

 

 

best regards
Petr Hradsky
Processor Expert Support Team

 

0 项奖励
回复