ADC with PDB trigger issue

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

ADC with PDB trigger issue

Jump to solution
940 Views
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 Kudos
1 Solution
545 Views
DavidS
NXP Employee
NXP Employee

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

Regards,

David

View solution in original post

0 Kudos
3 Replies
545 Views
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 Kudos
545 Views
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 Kudos
546 Views
DavidS
NXP Employee
NXP Employee

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

Regards,

David

0 Kudos