morphe777 Posted September 29, 2013 Report Share Posted September 29, 2013 Hello, I am building a MIOS8 board that works for 4-5 weeks. I updated code in order to code a the Midi Thru function, and I added the following code : ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when a MIDI byte has been received ///////////////////////////////////////////////////////////////////////////// void MPROC_NotifyReceivedByte(unsigned char byte) __wparam { static char fx_status; // normal MIDI events are forwarded in MPROC_NotifyReceivedEvnt // this function handles sysex and realtime messages if( byte & 0x80 ) { // Status message if( byte >= 0xf0 ) MIOS_MIDI_TxBufferPut(byte); // transfer byte // determine status if( byte == 0xf0 ) { fx_status = 0xff; // forward until 0xf7 } else if( byte == 0xf7 ) { fx_status = 0; // f7 reached, no forward } else if( byte == 0xf1 || byte == 0xf3 ) { fx_status = 1; // expecting one additional byte } else if( byte == 0xf2 ) { fx_status = 2; // expecting two additional bytes } else { fx_status = 0; // expecting no additional byte } } else { // check if fx status active if( fx_status ) { // forward data byte MIOS_MIDI_TxBufferPut(byte); // decrement counter if required if( fx_status != 0xff ) --fx_status; } } } Unfortunately, since I update this code, I can not contact my midibox thanks to MIOS studio. Here is the error message of the MIOS Studio: Detected MIOS8 and MIOS32 response - selection not supported yet! Check MIDI IN/OUT connections and Device ID! My MidiBox still works, and the MIOS Studio still receives the Debug-Message. Is there a way to reset the chip or send a blank code? I do not have the burner. Thank you for your help. Quote Link to comment Share on other sites More sharing options...
morphe777 Posted September 29, 2013 Author Report Share Posted September 29, 2013 (edited) I find the solution by myself. I disconnect the MIDI OUT (of the midi Box) and re-upload the MIOS 1.09. As it can not get response, it asks for a reboot. Just before rebooting the midibox, I reconnect the midi out, then I reboot it. The MIOS 1,09 is then uploaded, and my bad code is erased. I have just delete the wrong part of the code, and re-upload my app. and now it works like a charm. In conclusion, do not use this code (get on ucapps.de) if you need to update your code later... Edited September 29, 2013 by morphe777 Quote Link to comment Share on other sites More sharing options...
TK. Posted October 1, 2013 Report Share Posted October 1, 2013 There is an alternative solution, and you partly already used it: Turn of the core and push the start button in MIOS Studio. Then turn on the core again (supply power), and the upload will start via 1st level bootloader, and not via the (faulty) application. This allows you to update your application directly, since it won't be started before the upload begins (and has been finished) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.