Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 2 months ago.
Program not looping
Hi
When I run this program it detects the note activity of my USB connected MIDI keyboard, but then when it loops it seems to crash out. I can't find anything to work out why it happens.
This is my serial output. You can see that it rediscovers the USB device but then stops and I've no idea what that last line means:
parent:00000000 port:0 speed:full VID:0763 PID:0195 class:00 addr:1 New MIDI device: VID:0763 PID:0195 [dev: 1ffff6b8 - intf: 1] note on channel: 0, note: 60, velocity: 75 on end New MIDI device: VID:0763 PID:0195 [dev: 1ffff6b8 - intf: 1]
/src/F401RE-USBHost/USBHost/USBHALHost_KL46Z.cpp@314 ep->getState() != USB_TYPE_PROCESSING ASSERT!
Question relating to:
1 Answer
10 years, 2 months ago.
Hi Tom
I'm developing on nucleoF401RE. but I have kl25z, so I will check it soon.
You can see that it rediscovers the USB device but then stops and I've no idea what that last line means:
Did you reconnect MIDI device physically? If you want do it, please reset MCU after USB device connect.
Hi Takuya
When I reboot the Freescale board it works again, but only for one note press, then freezes again.
Removing and reconnecting the MIDI keyboard does not work though, stays frozen.
Thanks!
Tom
posted by 26 Sep 2014Hi Tom
My KL25z board is Rev.D. this rev is not suitable for USB-HOST hack please wait I get new board.
Perhaps it is caused by original library, fix it is so difficult and take a lot of time. https://mbed.org/users/va009039/code/F401RE-USBHost/
Simplest solution is you get nucleo-F401 boards(extremely cheap!!!!!) or LPC1768 :)
Thanks.
Takuya
posted by 26 Sep 2014Hi Takuya
Thanks for the information. My board I think is Rev A, is that okay?
Those boards look good, thing is I'm wanting to use the low cost MKL25Z128VLK4 MCU which would have been ideal.
Ideally I need UART, USB host and BLE in an easy to program way. So I was thinking MKL25Z128VLK4 + nRF8001 and learn how to do it.
Other option is USB host chip + ATmega + nRF8001
or USB host chip + nrf51822. But I think I may struggle to program the nrf51822 to do everything.
I want to take MIDI signals from USB device and send them over BLE
posted by 26 Sep 2014I think we must be able to get it to work as it initially detected the device and it's midi input. I will keep trying and let you know if it works!
posted by 29 Sep 2014Hi Tom.
USB device over BLE
It is so cool! I think mbed HRM1017 + USB host chip is easiest way. It is mbed compatible!!!(my friend developed)
By the way, I updated USBhostMIDI library fixed freeze bug in the USB 1st polling. But I have not get a new KL25z board. Perhaps this is no connection with the bug. Please update to new library. thanks.
Takuya
posted by 13 Oct 2014
I am running this on a Freescale frdm-kl25z
posted by Tom H 26 Sep 2014I think we must be able to get it to work as it initially detected the device and it's midi input. I will keep trying and let you know if it works!
posted by Tom H 29 Sep 2014