SPIMaster_LDD problem

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

SPIMaster_LDD problem

ソリューションへジャンプ
2,290件の閲覧回数
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,911件の閲覧回数
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,911件の閲覧回数
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,911件の閲覧回数
waldes
Contributor I

Hello,

I use mcu kinetis MK20DX256ZVLL10 and CW10.2. 

0 件の賞賛
返信
1,912件の閲覧回数
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 件の賞賛
返信