File Delete in littleFS results in -22 error

So I have a device on a custom PCB with an nrf52832 and a mx25r1635f, with which I've had quite some trouble already(  File write gives -5 after file size reaches cache size  ). In most of the devices it's working correctly and was working up until a couple hours ago, but now any operation with the Flash takes over 14 SECONDS!, that's ludicrous to me, I tried to delete the files and clear the flash, giving the -22 error, I'm very lost at this point, since I can't delete the files individually, can't clear the flash area. Does anyone know what could be the case happening here? Config information can be found on the ticket I linked.

Parents
  • It happened on another board as well now, same thing, operated for a good while saving data toi the flash and now anything it tries to do to it returns -22 error. So I connected a logic analyser to it and the clock looks really weird to me:

    is this normal?
    Another thing as well is that the clock frequency is 12MHz, even though I set it to 20MHz in the .dts file


    &spi1 {
    	 compatible = "nordic,nrf-spi";
    	 status = "okay";
    	 pinctrl-0 = <&spi1_default>;
    	 pinctrl-1 = <&spi1_sleep>;
    	 pinctrl-names = "default", "sleep";
    	 clock-frequency = <20000000>;
    	 mx25r16: mx25r1635f@0 {
    		compatible = "jedec,spi-nor";
    		reg = <0>;
    		spi-max-frequency = <33000000>;
    		jedec-id = [c2 28 15];
    		size = <DT_SIZE_M(16)>;
    	};
     };

  • ok, so something weird happended now, the problem disappeared after leaving it running for about an hour or so and I have no clue what "solved" it. And about the weird clock signal and general weirdness on the logic analyser it was due to my sampling frequency, it was set to 12MS/s so of course I'd see a frequency of 12MHz and weird behaviour, and since it only goes up to 24MS/s but gives a timeout frequently(don't really know why) using the logic analyser might be a problem. Could it be a problem with the hardware or is it something in the firmware really?

Reply
  • ok, so something weird happended now, the problem disappeared after leaving it running for about an hour or so and I have no clue what "solved" it. And about the weird clock signal and general weirdness on the logic analyser it was due to my sampling frequency, it was set to 12MS/s so of course I'd see a frequency of 12MHz and weird behaviour, and since it only goes up to 24MS/s but gives a timeout frequently(don't really know why) using the logic analyser might be a problem. Could it be a problem with the hardware or is it something in the firmware really?

Children
Related