SNOR driver and nocache buffer Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
Dron_Gus
Posts: 34
Joined: Wed Apr 22, 2020 1:03 am
Has thanked: 5 times
Been thanked: 10 times

SNOR driver and nocache buffer

Post by Dron_Gus »

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 some modification to make serial_nor subsystem work on our STM32F7 based device.
Please see https://github.com/rusefi/ChibiOS/pull/ ... c7edb2ace7 .
If you have any comments - please let me know.
If you like - I can convert macronix_mx25 and micron_n25q drivers to changed API and provide set of patches.
Also I can provide patch adding W25Q support.

Andrey.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: SNOR driver and nocache buffer

Post by Giovanni »

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 would also be nice of course.

Giovanni
Dron_Gus
Posts: 34
Joined: Wed Apr 22, 2020 1:03 am
Has thanked: 5 times
Been thanked: 10 times

Re: SNOR driver and nocache buffer

Post by Dron_Gus »

Giovanni wrote: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 would also be nice of course.

Giovanni

Thanks for reply.
I did not take a look into master branch when start moving to 21.11.x branch.
xsnor look interesting. I'll think about better way and maybe return with W25Q driver for xsnor.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: SNOR driver and nocache buffer

Post by Giovanni »

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
Dron_Gus
Posts: 34
Joined: Wed Apr 22, 2020 1:03 am
Has thanked: 5 times
Been thanked: 10 times

Re: SNOR driver and nocache buffer

Post by Dron_Gus »

Giovanni wrote: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 reliable. Sometimes (once for 25Kb write) one byte is missed/stuck and transferred during next Tx transfer. This totally breaks MFS driver.
If I will not be albe to find root cause I'll create separate topic with detailed issue description. But so far it's looks like SPI/DMA issue.
Post Reply