Search found 34 matches

by Dron_Gus
Tue Jun 23, 2026 8:10 am
Forum: Bug Reports
Topic: hal_usb.c: truncate GET_DESCRIPTOR reply to wLength
Replies: 3
Views: 404

Re: hal_usb.c: truncate GET_DESCRIPTOR reply to wLength

Giovanni wrote: Tue Jun 23, 2026 7:19 am Hi,

From our "sheriff" reviewer:

...

BTW, now it is also possible to submit PRs on the new github repository now (forum is still fine): https://github.com/chibios-upstream/chibios

Giovanni
Hi,
My apologies. I overlooked checking the lower layer.
by Dron_Gus
Mon Jun 22, 2026 5:19 pm
Forum: Bug Reports
Topic: hal_usb.c: truncate GET_DESCRIPTOR reply to wLength
Replies: 3
Views: 404

hal_usb.c: truncate GET_DESCRIPTOR reply to wLength

Some host may request first two bytes of descriptor to check it size and then do full-size request.
Respect request wLenght


Subject: [PATCH] usb: truncate string descriptor response to match
setup.wLength

Windows requests the first 2 bytes of a string descriptor to read
its size before asking ...
by Dron_Gus
Mon Jul 14, 2025 2:40 pm
Forum: Bug Reports
Topic: STM32(F7) SPI+DMA stuck byte
Replies: 4
Views: 14047

Re: STM32(F7) SPI+DMA stuck byte

Ok. I was looking at wrong place.

So this is totally my fault. I'm using STM32F7 which is actually Cortex M7 and it has caches.
We have big code-base and some of developers. So to avoid any cache-related issue I decided to add two wrapper to hal_serial_nor.c that are copying data to/from devp ...
by Dron_Gus
Mon Jul 14, 2025 10:57 am
Forum: Bug Reports
Topic: STM32(F7) SPI+DMA stuck byte
Replies: 4
Views: 14047

Re: STM32(F7) SPI+DMA stuck byte

Hi,

I think it is a good hypothesis, it would be possible to place temporary code and check the state of FIFOs before starting a transfer.

Giovanni
Hi,

Thanks, good idea!
I try adding following code to spi_lld_ignore, spi_lld_exchange and spi_lld_send right before enabling DMAs:
osalDbgAssert ...
by Dron_Gus
Sun Jul 13, 2025 10:39 pm
Forum: Bug Reports
Topic: STM32(F7) SPI+DMA stuck byte
Replies: 4
Views: 14047

STM32(F7) SPI+DMA stuck byte

Hi,

ChibiOS 21.11.x
I have a custom hw with STM32F767 and W25Q128 connected over SPI.
W25Q driver is based on serial_nor. Nothing special, just reworked micron_n25q.
I'm using MFS on this flash. Two banks of 512Kb.
After few write of big blob of data (25Kb) I got failure in verification code of mfs ...
by Dron_Gus
Sun Jul 13, 2025 10:13 pm
Forum: Bug Reports
Topic: hal: spi_v2: propagate msg passed to __spi_wakeup_isr
Replies: 1
Views: 13135

hal: spi_v2: propagate msg passed to __spi_wakeup_isr

__spi_wakeup_isr is called from __spi_isr_complete_code with msg = MSG_OK and from __spi_isr_error_code with msg = some error code(s). Pass this msg to osalThreadResumeI and further to thread.
@@ -378,7 +378,7 @@ do { \
*/
#define __spi_wakeup_isr(spip, msg) { \
osalSysLockFromISR ...
by Dron_Gus
Sun Jul 13, 2025 12:54 pm
Forum: Bug Reports
Topic: SNOR driver and nocache buffer
Replies: 4
Views: 12385

Re: SNOR driver and nocache buffer

I just started porting the whole trunk HAL to 21.11.4, it could take some time because all differences but what you see in trunk now is what you will get in 21.11.4.

Giovanni
Hi.

Thanks you for your hard work!

Currently I'm stick with strange DMA/SPI issue while trying to make W25Q work ...
by Dron_Gus
Wed Jul 09, 2025 2:16 pm
Forum: Bug Reports
Topic: SNOR driver and nocache buffer
Replies: 4
Views: 12385

Re: SNOR driver and nocache buffer

Hi,

Note that this has been "fixed" by adding a new SNOR framework called "xsnor" which addresses the problem with buffers and adds more features (multi-devices, devices detection mainly). If you are going to add new devices, perhaps, it is better to do that in "xsnor".

Patches to old serial-nor ...
by Dron_Gus
Wed Jul 09, 2025 9:35 am
Forum: Bug Reports
Topic: SNOR driver and nocache buffer
Replies: 4
Views: 12385

SNOR driver and nocache buffer

Hi,

Looking at os/hal/lib/complex/serial_nor/hal_serial_nor.c/h code it seems to me that "nocache" feature is not fully finished/implemented. At least for SPI (not WSPI) mode: local buffers are used in few places to construct tx packets.
We need SPI driver for W25Q for RusEFI project, so I done ...