Hello ! I'm just starting with ch32003j4m6 . I'm having trouble creating a timer interrupt that increases and decreases the LED brightness. I use 48Mhz HSI internal oscillator but don't understand why function millis are not working, only when I make 1 clock on PD6 pin (OSCI) TIMER works. Looks like I'm missing something, right?
Hello, the function millis are not working you mentioned here refers to the failure of the millis function in your program, resulting in no waveform changes on the PD6 pin? I tested the PD6 pin for waveform generation, pay attention to the current_ Adding the volatile keyword when defining the Millis variable in front of it to avoid optimization, and adding the volatile keyword when defining global variables is recommended. If my understanding is incorrect, I can send it via email( lzs@wch.cn )Please communicate with me specifically about your issue, and you can also communicate with me via email for any further questions.