CPU Troubleshooting#
General advice.#
If an expected feature does not seem to work, like the host name or timestamping features, make sure that your configuration file (cpu_cfg.h) reflects what you need. Consult the CPU Configuration Guide for more information on the CPU module's configuration.
My critical sections don't work.#
Verify that interrupts are enabled before execution reaches a critical section. In a critical section, the interrupts' enable state is preserved before the interrupts are disabled; then once the critical section ends, the preserved state is restored. If the interrupts were never enabled in the first place, simply ending a critical section will not re-enable them.
My time measurements are off.#
If you use the CPU_TS32_to_uSec() or CPU_TS64_to_uSec() functions to measure the time it takes (in microseconds) for an event to occur, make sure that the CPU module is aware of the operating frequency of the timestamp counter. If you change the operating frequency of the microcontroller or the timer itself once the CPU module is initialized, make sure you call the CPU_TS_TmrFreqSet() function to update the operating frequency.