Skip to content

Conversation

@hjuul
Copy link
Contributor

@hjuul hjuul commented Jan 18, 2021

I was hoping to get these changes in as part of #30864 but got in too late.

The QSPI implementation that is now in master compiles for stm32f7, but it fails to boot samples/drivers/spi_flash. This PR already has a patch that fixes that.

I have also added .dtsi for stm32f7 and .dts files for stm32f746g_disco and stm32f769i_disco.

samples/drivers/spi_flash works for both boards when DMA is disabled.

However, if I try to use it with DMA I get some errors, see output below.

I will continue to look into this, but would appreciate some help. @erwango ?

JEDEC QSPI-NOR SPI flash testing
==========================
SPI flash driver MX25L51245G was not found!
[00:00:00.000,000] <err> flash_stm32_qspi: SFDP magic 00000000 invalid

@erwango
Copy link
Member

erwango commented Jan 18, 2021

@hjuul Thanks for starting this thread.
We need indeed to loot at DMA but if there's already a known working non DMA config available, maybe we can upstream this first (and get a chance to get it in DV2.5.0 that will happen soon) and work on DMA meanwhile. This might also help having more people on board working on this DMA issue.
This would mean create a new PR w/o DMA (and keep this one for DMA discussion). Are you interested to do this?

@hjuul
Copy link
Contributor Author

hjuul commented Jan 18, 2021

Sure @erwango, will do!

@MindaugasMin
Copy link

Hello,
I am working with ST32L452 and w25q128fv NOR flash which is used with QSPI peripheral.

I can't read the serial flash discovery parameter. Any ideas where is the problem?
I am sure that my hardware works fine because I tried to read/write/erase using LL functions.

This is my DTS quadspi configuration:

Does not work well when DMA is disabled.

I copied everything disco_l475_iot1.dts

&quadspi {
	pinctrl-0 = <&quadspi_clk_pe10 &quadspi_ncs_pe11
		     &quadspi_bk1_io0_pe12 &quadspi_bk1_io1_pe13
		     &quadspi_bk1_io2_pe14 &quadspi_bk1_io3_pe15>;	
        dmas = <&dma1 5 5 0x0000 0x03>;
	dma-names = "tx_rx";	
        status = "okay";	

        w25q128fv: qspi-nor-flash@0 {
		compatible = "st,stm32-qspi-nor";
		label = "w25q128fv";
		reg = <0>;
		qspi-max-frequency = <50000000>;
		/* 128 Megabits = 16 Megabytes */
		size = <0x8000000>;
		status = "okay";		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;			
                        slot1_partition: partition@0 {
				label = "image-1";
				reg = <0x00000000 0x000D8000>;
			};			
                        storage_partition: partition@D8000 {
				label = "storage";
				reg = <0x000D8000 DT_SIZE_M(7)>;
			};
		};
	};
};

@erwango
Copy link
Member

erwango commented Feb 1, 2021

@MindaugasMin from slack I can read that this problem is fixed. If you have related question please raise a dedicated issue, txs!

@github-actions
Copy link

github-actions bot commented Apr 3, 2021

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Apr 3, 2021
@github-actions github-actions bot closed this Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants