preenfm Forum

PreenFM => preenfm2 and preenfm3 => Topic started by: feijai on July 31, 2017, 06:25:50 PM

Title: Full-Speed NPRN dump crashing
Post by: feijai on July 31, 2017, 06:25:50 PM
It looks like I can't send a full NRPN dump to the PreenFM2 at full MIDI speed.  It crashes about one times in five.

I'm testing this on my patch editor written for Edisyn, and when I do "randomize" (which sends a random valid patch to the PreenFM2), it'll crash hard at about that rate.  If I force Edisyn to only send out NRPN once every 1ms (ugh) then the PreenFM2 doesn't appear to die.  Keep in mind that MIDI is about one byte every 1/3ms.  This means I have to wait for about two seconds :-( :-( to update a patch, whereas at full MIDI speed it'd be a small fraction of a second.

This looks like a buffer overflow.  All told I'm sending (I believe) 227 NRPN messages, so 908 CC messages or 2724 bytes.
Title: Re: Full-Speed NPRN dump crashing
Post by: Xavier on August 03, 2017, 04:14:38 PM

You can try to increase the midi in buffer size and see if that fixes your problem :
https://github.com/Ixox/preenfm2/blob/master/src/PreenFM_irq.c#L24

If there's not enough CCM memory anymore try to remove "__attribute__ ((section(".ccmnoload")));"

Xavier