Search found 13 matches

by cptcredible
Thu Jul 09, 2020 8:29 am
Forum: General discussion
Topic: USBComposite send data from within interrupts
Replies: 10
Views: 7852

Re: USBComposite send data from within interrupts

You should never try to do "real work" inside an ISR. You should do the absolute minimum possible such as set a global flag (usually marked 'volatile') then get out immediately. You should certainly never try to call anything else that uses or requires interrupts. If you do then, well...y...
by cptcredible
Thu Jul 09, 2020 8:17 am
Forum: General discussion
Topic: USBComposite send data from within interrupts
Replies: 10
Views: 7852

Re: USBComposite send data from within interrupts

ag123 wrote: Wed Jul 08, 2020 10:31 pm my guess if you are simply using serial, the default usb-serial 'driver' may work better,
on stm32f401 with the usb-serial CDC (vcp) 'driver'
I am using USB midi, just using serial for debug.
by cptcredible
Wed Jul 08, 2020 9:42 pm
Forum: General discussion
Topic: USBComposite send data from within interrupts
Replies: 10
Views: 7852

Re: USBComposite send data from within interrupts

upon closer investigation it seems I can send some data as long as it's only one packet? this works: CompositeSerial.print("I can send a lot of data as long as it is all sent as one packet like this."); this fails: CompositeSerial.print("two"); CompositeSerial.print("lines&q...
by cptcredible
Wed Jul 08, 2020 8:58 pm
Forum: General discussion
Topic: USBComposite send data from within interrupts
Replies: 10
Views: 7852

USBComposite send data from within interrupts

I am making a guitar pedal synchronizing thingamajig and as part of that i want to receive clock pulses from analog sequencers and output a MIDI clock via USB and serial. To get the timing accurate enough I have attached an interrupt to a pin monitoring the clock pulses coming in. Ideally I would se...
by cptcredible
Sun May 03, 2020 11:27 am
Forum: Projects
Topic: Do-it-yourself Bluepill PCB
Replies: 4
Views: 6194

Re: Do-it-yourself Bluepill PCB

Why does the blue pill have 2 crystals?
by cptcredible
Sun May 03, 2020 10:47 am
Forum: Libraries & Hardware
Topic: USB Composite library?
Replies: 9
Views: 8897

Re: USB Composite library?

Would like to see tid happen, can help with testing if necessary
by cptcredible
Thu Apr 30, 2020 7:56 am
Forum: General discussion
Topic: Rotary encoder with blue pill
Replies: 31
Views: 39442

Re: Rotary encoder with blue pill

Thanks fredbox! that works like a charm, i was not familiar with the systick interrupts and it took me a minute to realize that STM core was different from Roger Clarks "Arduino STM32" but adding "systick_attach_callback(&encoder1_read);" in setup made it run perfectly on my ...
by cptcredible
Wed Apr 29, 2020 8:50 pm
Forum: General discussion
Topic: Rotary encoder with blue pill
Replies: 31
Views: 39442

Re: Rotary encoder with blue pill

Any idea where I might find what modifications to make?

Edit: didn't see the above post before posting this
by cptcredible
Wed Apr 29, 2020 5:35 pm
Forum: General discussion
Topic: Rotary encoder with blue pill
Replies: 31
Views: 39442

Re: Rotary encoder with blue pill

update: It seems the problem is with attaching an interrupt with the argument "CHANGE" : attachInterrupt(digitalPinToInterrupt(PIN_A), encoderISR, CHANGE); //call encoderISR() every high->low or low->high changes the interrupt seems to only trigger on rising edge, I managed to get the enco...

Go to advanced search