Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB_MIDI doesn't work anymore after code changed. #204

Open
imrahjel opened this issue Apr 8, 2020 · 1 comment
Open

USB_MIDI doesn't work anymore after code changed. #204

imrahjel opened this issue Apr 8, 2020 · 1 comment

Comments

@imrahjel
Copy link

imrahjel commented Apr 8, 2020

Hello,

I'm working on Debian 10, using VS Code to edit the files and doing the rest command line. I'm new to stm32 and C programming.

I was successful to run the USB_MIDI example on STM32F4discovery board.
I did "$ make -C libopencm3 #" once with success
I did "$ make -C my-project" after I pasted the whole example source code in 'my-project.c' with success
I did "$ st-flash write my-project/myfile.bin 0x08000000" with success, or at least without visible error.
the board is then recognized as a USB MIDI device which I can assess with "$ amidi -l"

Now, if I alter the code in 'my-project.c' and this whatever the code, even a useless simple piece of code, everything runs exactly as mentioned above, with the only difference that the board is not recognized as USB MIDI device anymore.

This is really strange as I didn't modified any crucial part of the code, only adding some useless line(s) in the WHILE loop. And of course nothing I added required anything more than what is already part of #include. As an example of what I tried, I pasted a wait loop from ADC example as follows :

	int i;
	for (i = 0; i < 800000; i++) {    /* Wait a bit. */
		__asm__("nop");
	}

I'm totally lost with this issue, it's seems to me like if the USB MIDI example is designed to prevent adaptation, which is a non sense I know :).

I went through the other issues reported but found nothing relevant to my situation.

if anyone here has the smallest idea or direction, this will be more than welcomed as I start to drive crazy.

Many thanks,
Imrahjel.

@karlp
Copy link
Member

karlp commented Apr 9, 2020

without seeing what yhou actually did, there's ~nothing that can be said further. Try sharing your modified project somewhere. Note that you cannot just start adding busy waits to a usb project, you must keep calling usbd_poll() regularly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants