Hard Faults because of NULL function pointers
skulDOUGery opened this issue · 0 comments
This is an awesome project and I greatly appreciate the work you did. Just want to point out a couple of issues that I found in trying to use some of your code.
In the file usbd_video_core.c the functions usbd_video_OUT_Incplt() and usbd_video_IN_Incplt() are not added to the VIDEO_cb structure. On my custom board, at least, this was causing hard faults when I tried to capture on the PC using VLC. The higher layers were trying to call these functions through the pointers (and of course, the pointers were NULL).
I'm sure you were probably aware of this, as when I flashed your STM32F4-Discovery.hex file to my discovery board, all worked as expected.
Also, in the usb.conf file I could not get enumeration to work with the supplied values. I instead used:
#define RX_FIFO_FS_SIZE 48
#define TX0_FIFO_FS_SIZE 24
#define TX1_FIFO_FS_SIZE 248
I must admit that I am still very confused as to the correct way to calculate these values, but I was able to derive these working values through experimentation.