This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ADC Crash

Has anyone seen problems occurring with the ADC module after hitting a breakpoint ?
It works fine whilst the program is running but gets in a state after resuming from a breakpoint in any source file.

Anyone whos had problems using the ADC or has any tips please let me know.

Thanks.

  • "It works fine whilst the program is running but gets in a state after resuming from a breakpoint in any source file."

    That wouldn't be at all surprising for any peripheral!

    The peripheral requires you to meet its timing requirements all of the time - if you stop the processor with a breakpoint, it is quite likely that this will upset the timing to peripherals, and they won't be "in-sync" when the processor resumes...

  • That wouldn't be at all surprising for any peripheral!

    I use I2C, SSC, GPT1&2, ADC, lots INTs and the only one i have a problem with is the ADC.

    I use the PEC to transfer the data, has anyone had problems with the PEC ?

    Surley its not to much to ask to use a breakpoint and the ADC together!

  • An I2C master can normally survive a breakpoint. A I2C slave will normally fail badly.

    An SPI master can normally survive a breakpoint. AN SPI slave will normally fail.

    The same thing goes for a number of other devices.

    Some devices can better handle a breakpoint than others. A breakpoint does not stop the CPU crystal, so it doesn't stop all timing in the chip. It only stops the processing of instructions. An UART may be able to continue the reception of a character, but if the UART doesn't have a FIFO, it will not have anywhere to place the received character before the next character arrives.

    I haven't worked with your chip, but many ADC with chain-conversions of multiplexed inputs and a single destination register for the converted values will get into trouble (or produce garbled data) if the application is stopped. THe total system will behave as if your application is too slow to handle events in real-time. Not so strange, since your application - when stopped - really is too slow to handle any events.