Problem with CNT001 in "Quick Start Tutorial" project for XMC4500 Relax Kit

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello,

I have tried to re-create the Qicuk Start Tutorial project from scratch for two targets:
- XMC2Go
- XMC4500 Relax Kit
For the XMC2Go everything worked as expected. The LED I have specified is working correctly and blinking up and down. But for the Relax Kit I am facing a serious problem:
I have created the project as described in the document, solved and generated the code. I then switched to Keil uVision (v5.10) to finish the C code and to run the project. The LED I have specified is blinking, but only in one direction. Checking the variables in the code, I found out that the CountVal never reached the Event Count Match of 400. It stops at 399. If I specify 399 as the Event Count Match in DAVE, it stops at 398. In the MXC2Go project, the CountVal works correctly and is reset, so that the direction of the LED is changed (up to down and vice versa). Does anyone have a clue what is happening here? I'm using DAVE 3.1.10 with the following apps on a XMC4500-F100x1024 target:
- CNT001 Version 1.0.24
- PWMSP001 Version 1.0.32
  • NVIC002 Version 1.0.26

    Kind regards,

    Christopher

    PS: Has anyone tried the official PWMSP001_CNT001_Example1_RelaxKit? This is not working at all. The LED goes on and off, but no PWM dimming...
  • 0 Likes
    1 Reply
    Not applicable
    Hello,

    I have found the problem: PEBCAC. Unfortunately, the two projects were not identical. In the User defined interrupt handler of the NVIC002/1 [CountMatch] I have entered CountMatch_handler instead of CountMatch_Handler. Now, everything is working as expected.

    Kind regards,

    Christopher
    0 Likes