In short, upper 16 bits of BSSR resets corresponding bits (1=reset, 0=don't change), and lower 16bit set corresponding bits (1=set, 0=don't change).
Set bits have priority over reset bits.
BSRR - Bit Set/Reset Register
To my understanding (as a hobby user) : setCaptureCompare is 0 indexed, CounterCompare Register (CCRx) is 0 indexed setOverflow is 1 indexed, Hardware AutoReload Register (ARR) is 0 indexed. setPrescaleFactor is 1 indexed, Prescaler register (PSC) is 0 indexed. To set duty cycle to 100% CounterCompa...
Hmmm, now even i am not sure anymore :lol: Goal was not to count cycles, but use setCaptureCompare to set 0% duty cycle with value 0, and 100% with value 255. And now i am not sure of that edge case. I think CounterCompare need to be greater than overflow to get 100% duty cycle. Overflow of 255 shou...
- use "pwmTim->setCaptureCompare(..." as first line of code in interrupt callback. No matter how long you calculations are, interrupt latency is usually same, so you'll have steady timing. Plus, once value of counter-compare is written, it will apply that value in next timer overflow. From...
IMHO, code is ok, maybe DSO138 is messing with you (screen antialiasing). Switch to uS range and look how much voltage ripple it have.
Or maybe too high LP filter capacitor. It will distort your waveform from saw to triangle.
Or, Instead of 50000, try with 250000 pwm frequency.
This sounds like it would be useful for my application. Would you happen to have an example of this? My main hurdle with this is actually figuring out how to do the code. I'm definitely doing something wrong, but I haven't been able to change the duty cycle using the HardwareTimer library at all th...
From my audio experiments with STM32, i found that using two timers gives excellent results. One timer is used for interrupt callback at samplerate (20uS for 50kHz, but can be much less), and second timer at much higher frequency (around 250KHz) of which you are changing duty cycle. Depending of you...
I looked into driver itself on my computer, and it is using "USB serial driver" (Usbser.sys) that comes with Windows 10. If i'm right, and you are using Windows 7 (aero theme in your screenshot), google said that Windows 7 don't come with that driver. It might be a reason why your midi dev...
There is also one more thing to try: USBComposite.setManufacturerString(ManufacturerName); USBComposite.setProductString(DeviceName); USBComposite.setSerialString(DeviceSerial); USBComposite.setProductId(0x0029); // or any other number than 0x0020 I wouldn't recommend it until you try other solution...
Uf, windows and drivers... There is few thngs you can try: - right click on icons with problems, choose "uninstall" and click "scan for hardware changes" icon. - right-click, "update driver", "Browse my computer for drivers", select path "c:\Windows"...