this first post @ forum. developing midi sequencer device based on stm32f429discovery board running @ stock 180mhz. in order send midi messages usart1 configured 31250 bauds , appropriate dma configured transfer 3 byte array stored in ram usart. doing tests of timing of sending of midi messages, configuring timer 4 update interrupt, within service routine of enabling memory-to-peripheralusart1 dma operation. gives me periodic sending of 3 byte message on usart1 peripheral.
everything works great , correct frequency , correct data, have small issue have been researching few days , have not been able correct. make things clearer, within timer interrupt routine set led on discovery (rg13) momentarily blink , connected 1 channel of oscilloscope led pin. second channel of oscilloscope connected usart tx pin. now, when code executed, can see led pulse on oscilloscope's ch1, followed usart serial data on ch2. reason time between led pulse , beginning of serial data transfer fluctuates every sending of data. increments every sending, going around 1us around 30us, , jumps 1. noticed if change usart baudrate, time fluctuation between pulse , data sending changes in pattern, going faster or slower , longer or shorter range. have tried resetting apropriate flags usart dma, have tried disable/enable timer, played interrupt priorities, nothing has worked rid of time fluctuation. can imagine, stability of crucial midi sequencer hardware application bases timing of musical events, must rock solid. have tried using usart without dma, manually sending every byte, same results. interrupt driven usart tx exhibited likewise results. thing seemed work rid of time fluctuation of usart tx response is, before every sending operation deinitialize usart , dma modules , reinitialize them again. seemed give stable operation inserts long delay between timer interrupt , actual sending of data on usart, unacceptable.
if has thoughts on or have done similar, need advice on at.
thanks lot in advance!
best regards, konstantin