Search found 92 matches

by elagil
Tue Jun 06, 2023 3:00 pm
Forum: Bug Reports
Topic: Include order (chprintf.h) Topic is solved
Replies: 3
Views: 4313

Re: Include order (chprintf.h) Topic is solved

It is in ChibiOS/os/hal/lib/streams/chprintf.h. Here is the diff that fixes it for me: diff --git a/os/hal/lib/streams/chprintf.h b/os/hal/lib/streams/chprintf.h index e1e19b1c8..e45f157d0 100644 --- a/os/hal/lib/streams/chprintf.h +++ b/os/hal/lib/streams/chprintf.h @@ -27,6 +27,8 @@ #include <stda...
by elagil
Mon Jun 05, 2023 9:32 pm
Forum: Bug Reports
Topic: Include order (chprintf.h) Topic is solved
Replies: 3
Views: 4313

Include order (chprintf.h) Topic is solved

Hello! I use clang-format for automatically sorting include files by scope and name, and this leads to compilation problems with some headers. One such example is #include "chprintf.h" #include "hal.h" Since chprintf.h depends on type declarations from hal.h, this does not compil...
by elagil
Sun May 07, 2023 11:02 am
Forum: User Projects
Topic: ChibiOS UAC 1.0 sound card
Replies: 2
Views: 2337

Re: ChibiOS UAC 1.0 sound card

Just for reference, the repository location has changed: https://github.com/blus-audio/firmware
by elagil
Wed Apr 19, 2023 9:34 pm
Forum: User Projects
Topic: ChibiOS UAC 1.0 sound card
Replies: 2
Views: 2337

ChibiOS UAC 1.0 sound card

Hello! It seems to be very hard to find working code for a UAC 1.0 compliant sound card, so I built my own with various sources of inspiration. Here it is: https://github.com/elagil/usb-i2s-bridge The firmware is targeted at the STM32F401RB, but can be ported easily to more capable devices. This use...
by elagil
Tue Apr 18, 2023 7:50 pm
Forum: Bug Reports
Topic: STM32F401 USB maximum transfer size limitation
Replies: 11
Views: 3934

Re: STM32F401 USB maximum transfer size limitation

I would probably check that no single OUT endpoint's maximum packet size is larger than the RX FIFO. Otherwise, not much can be done. There is no control over how many of which type of packet the host sends, so the RX FIFO should simply accomodate one of the largest packet that can occur. I suggest ...
by elagil
Tue Apr 18, 2023 6:43 pm
Forum: Bug Reports
Topic: STM32F401 USB maximum transfer size limitation
Replies: 11
Views: 3934

Re: STM32F401 USB maximum transfer size limitation

I think I see the problem. On initializing an endpoint, only the allocation of memory for the TX FIFO is checked (hal_usb_lld.c:1023, marked with >>> below). For the RX FIFO that check does not exist. OTG_FS_GRXFSIZ is just set to the specified size of the RX FIFO, but there is no checking. If you l...
by elagil
Tue Apr 18, 2023 5:16 pm
Forum: Bug Reports
Topic: STM32F401 USB maximum transfer size limitation
Replies: 11
Views: 3934

Re: STM32F401 USB maximum transfer size limitation

Where do I find that assertion? It is not in the function that I call for receiving on an OUT endpoint: void usbStartReceiveI(USBDriver *usbp, usbep_t ep, uint8_t *buf, size_t n) { USBOutEndpointState *osp; osalDbgCheckClassI(); osalDbgCheck((usbp != NULL) && (ep <= (usbep_t)USB_MAX_ENDPOINT...
by elagil
Mon Apr 17, 2023 10:15 pm
Forum: Bug Reports
Topic: STM32F401 USB maximum transfer size limitation
Replies: 11
Views: 3934

Re: STM32F401 USB maximum transfer size limitation

Ok, I tried to increase STM32_USB_OTG1_RX_FIFO_SIZE to 1024 (from the default 512). Now, the maximum setting I can use is 948 bytes - which is exactly 512 bytes higher than before. So, the issue is definitely the RX FIFO running out. I wonder how this could be made obvious by means of some error cod...
by elagil
Mon Apr 17, 2023 9:09 pm
Forum: Bug Reports
Topic: STM32F401 USB maximum transfer size limitation
Replies: 11
Views: 3934

Re: STM32F401 USB maximum transfer size limitation

Actually, I made another discovery. When I waste some time in the receive callback (just copy some values around, for example), then I begin to get zero packets, even at maximum packet size below of 436! So maybe it is a problem with processing time that is spent somewhere. Is that a possibility? Ed...
by elagil
Mon Apr 17, 2023 5:15 pm
Forum: Bug Reports
Topic: STM32F401 USB maximum transfer size limitation
Replies: 11
Views: 3934

Re: STM32F401 USB maximum transfer size limitation

Yes, assertions are already enabled via CH_DBG_ENABLE_ASSERTS, but they don't fire.

Go to advanced search