forum.segger.com/index.php/Thr…ample-rate-is-set-to-Max/
XMC4500 Relax Kit
Display All
XMC4500 Relax Kit
C Source Code
- #include <stdint.h>
- // global struct
- typedef struct {
- uint32_t dbga1;
- uint32_t dbga2;
- uint32_t dbga3;
- } GD_t;
- volatile GD_t D7;
- // global variable
- volatile uint32_t dbgb1;
- volatile uint32_t dbgb2;
- volatile uint32_t dbgb3;
- // static variable
- void foo(void) {
- static volatile uint32_t dbgc1;
- static volatile uint32_t dbgc2;
- static volatile uint32_t dbgc3;
- D7.dbga1++;
- D7.dbga2++;
- D7.dbga3++;
- dbgb1++;
- dbgb2++;
- dbgb3++;
- dbgc1++;
- dbgc2++;
- dbgc3++;
- }
- int main(void) {
- while(1) {
- foo();
- }
- }