MIOS_MIDI_TxBufferPut in interval

At my last changes on program, where i execute 3 MIOS_MIDI_TxBufferPut(..); functions in a Timer Intervall, i got critical states in programm…

So after a duration of worrking my program crashes, hangs or does some other programm code/states :o after a time…  :-X

maybe it’s to time critical or txbuffer is overrun… i don’t know.. 

Can anyone help or knows a solution for that behavior?

Greets Rio.

i init the timer with 50 ms value:

MIOS_TIMER_Init(0x03,62500);

is that time to short to proceed 3x MIOS_MIDI_TxBufferPut?

Exactly. 50ms is not long enough to send 3 bytes, not nearly. Why on earth would you want to send so much data anyway?  :smiley:

mhh… background:

i’ve implemented a timer function for notifyevent of pressing keys from sm_matrix in my application, because i want increase/decrease CC values by pressing a key til i release the key in realtime.

It’s functional without sending data, but if i used MIOS_MIDI_TxBufferPut at every step (50ms) - different errors occurs -> til hanging / crashing of application at random time, or wrong visuals on LCDs.. :-\

what can i do?

PS: What is about sending BPM-values? Mhh.. seems that they can be transfered in this time or i’m wrong? Are you sure that 50 ms is to less?

You can take a look at TK’s mClock example. It shows pretty well how to deal with timed events.

Regards,

Michael

yes thxs… i’ll do that at evening..  :wink:

Greets Rio.