Kevin Joly

USB HS does not work if I/D caches are disabled

Discussion created by Kevin Joly on Jun 14, 2018



I am developping on a STM32F765 based board which is using USB HS fonctionnality (USB CDC interface). Everything goes right when connected to a computer. But, it randomly does not work when connected to a Linux based embedded computer (like raspberry pi):

string descriptor 0 read error: -75

can't set config #1, error -75


The error -75 is triggered by a USB babble error (the host received more data than expected) so I suspected either an hardware issue or low level USB stack bug. Everything works fine in USB FS mode though ...


Then, I realized that I forgot to call SCB_EnableICache() and SCB_EnableDCache()

I called those functions at the beginning of my main() and everything worked like a charm (on the embedded Linux computer as well).


As anyone seen this behaviour before? Could you explain me why enabling caches made my USB HS working ?