ADC with PDB trigger issue

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

ADC with PDB trigger issue

跳至解决方案
1,036 次查看
MarcoE
Contributor II

I have setup the ADC with the same code that can be found in mqx\examples\adc\adc_demo (triggered by ADC_PDB_TRIGGER); then I start a task which forever waits for the lwevent to be set from the ADC, read the sampled values and process them. 

I have many other tasks running (ethernet, sdcard with mfs, usb_host) and everything is OK.

 

But if I run a usb_device task, when the enumeration is complete the ADC task stops working (but USB task and other tasks continue to run correctly). I see in the debugger that the ADC task is waiting forever the lwevent, so I think the cause is the PDB trigger that stops triggering the ADC.

 

Do you have some ideas to resolve this issue? Or do you think the problem is different?

 

Thank you

 

 

 

 

0 项奖励
回复
1 解答
641 次查看
DavidS
NXP Employee
NXP Employee

Yes it is possible that the MQX3.8.1 did resolve the problem with PDB.

Regards,

David

在原帖中查看解决方案

0 项奖励
回复
3 回复数
641 次查看
DavidS
NXP Employee
NXP Employee

Did you resolve this?

Typically I've seen a stack overflow or corruption cause this kind of issue.

Regards,

David

0 项奖励
回复
641 次查看
MarcoE
Contributor II

I've tried using the bare metal code for the ADC (reading directly its registers) instead of MQX drivers: this works and for my application is ok.

By the way, I'm using MQX 3.8.0, but I've seen in the release notes of the last version (3.8.1) that it fixes a bug about PDB with ADC: i've not tested yet, but it's possible that my problem was connected to this bug.

Regards

0 项奖励
回复
642 次查看
DavidS
NXP Employee
NXP Employee

Yes it is possible that the MQX3.8.1 did resolve the problem with PDB.

Regards,

David

0 项奖励
回复