Issue using breakpoints with MQX ADC driver in Kinetis

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

Issue using breakpoints with MQX ADC driver in Kinetis

674 Views
dereksnell
NXP Employee
NXP Employee

As of MQX v3.8.1, when debugging your MQX application, you may notice that the lwevent used by the ADC driver stops occurring.

Unfortunately you should not use the debugger or set a breakpoint when you are using the ADC. Because the ADC driver in MQX is using the PDB to generate the sample rate, when the debugger stops when a breakpoint is reached, the PDB keeps counting but the ADC triggers are not generated so the ADC conversions stop working. In other words, the PDB can’t be halted when debugging.   Description of the problem with the PDB-A/D mechanism: While using the PDB to trigger the Kinetis ADC modules, the PDB invokes an ADC conversion on every PDB period expiration. This is true until the MCU reaches a breakpoint or is stopped for debug: when the MCU resumes operation, the PDB does not invoke ADC conversions anymore, and the ERR flag at the PDB_CHxS register is set.

Tags (3)
0 Kudos
0 Replies