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.
SNOR driver and nocache buffer Topic is solved
- 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
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
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
Re: SNOR driver and nocache buffer
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.
- 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
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
Giovanni
Re: SNOR driver and nocache buffer
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.