Search found 13 matches
- Thu Jul 09, 2020 8:29 am
- Forum: General discussion
- Topic: USBComposite send data from within interrupts
- Replies: 10
- Views: 10848
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...you ...
- Thu Jul 09, 2020 8:17 am
- Forum: General discussion
- Topic: USBComposite send data from within interrupts
- Replies: 10
- Views: 10848
Re: USBComposite send data from within interrupts
I am using USB midi, just using serial for debug.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'
- Wed Jul 08, 2020 9:42 pm
- Forum: General discussion
- Topic: USBComposite send data from within interrupts
- Replies: 10
- Views: 10848
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");
this also fails ...
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");
this also fails ...
- Wed Jul 08, 2020 8:58 pm
- Forum: General discussion
- Topic: USBComposite send data from within interrupts
- Replies: 10
- Views: 10848
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 ...
Ideally I would ...
- Sun May 03, 2020 7:37 pm
- Forum: General discussion
- Topic: Soooo what do i need to know about the new core?
- Replies: 7
- Views: 6849
Re: Soooo what do i need to know about the new core?
What is LSCS ?
- Sun May 03, 2020 11:27 am
- Forum: Projects
- Topic: Do-it-yourself Bluepill PCB
- Replies: 4
- Views: 8675
Re: Do-it-yourself Bluepill PCB
Why does the blue pill have 2 crystals?
- Sun May 03, 2020 10:47 am
- Forum: Libraries & Hardware
- Topic: USB Composite library?
- Replies: 9
- Views: 12134
Re: USB Composite library?
Would like to see tid happen, can help with testing if necessary
- Thu Apr 30, 2020 7:56 am
- Forum: General discussion
- Topic: Rotary encoder with blue pill
- Replies: 31
- Views: 77019
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 blue pill running Roger ...
- Wed Apr 29, 2020 8:50 pm
- Forum: General discussion
- Topic: Rotary encoder with blue pill
- Replies: 31
- Views: 77019
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
Edit: didn't see the above post before posting this
- Wed Apr 29, 2020 5:35 pm
- Forum: General discussion
- Topic: Rotary encoder with blue pill
- Replies: 31
- Views: 77019
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 encoder ...
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 encoder ...