OpenWrt Forum Archive

Topic: Unwanted FACTORY RESET/SOFTWARE RESET happening.- CC 15.05.1- RT5350

The content of this topic has been archived on 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

We have designed a router based on RT5350 chipset.
Able to bringup U-boot, kernel and file system.
Currently, I am viewing the kernel messages in the UART terminal.
After some time, I see the below messages:

FACTORY RESET
reboot: Restarting system

and all the settings I made (like enabling wifi) are gone.
It is not a fail safe mode I suppose.
Why is FACTORY RESET happening on its own?
I used the same firmware on Olimex RT5350 Evaluation Board.
In that board, it is not happening.

Another reset that is happening on its own is SOFTWARE RESET.
I get below message:

Software System Reset Occurred

Please let me know why Resets are happening.
Are there any settings or commands that disable or enable Resets?

Thanks,

(Last edited by pradeepsysargus on 4 Oct 2016, 10:33)

As I wrote before here it may be caused by wrong reset button polarity.
Change in your dts-file

gpios = <&gpio0 10 1>;

to

gpios = <&gpio0 10 0>;

See /etc/rc.button/reset for default reset button action.

I will try changing it.

gpios = <&gpio0 10 1>;

What does 10 mean, is it GPIO#10?
What does it mean replacing '1' with '0'?


gpio-leds {
        compatible = "gpio-leds";
        wlan {
            label = "ht-tm02:blue:wlan";
            gpios = <&gpio0 7 1>;
        };
        lan {
            label = "ht-tm02:green:lan";
            gpios = <&gpio0 12 1>;
        };

    };

The above code in dts file is for gpio-leds I suppose.

Can you explain why 7 and 12 are taken here, are they GPIO#7 and GPIO#12, what does it mean to give them value of '1' ? Do we use label any where ?


Thanks,

pradeepsysargus wrote:

What does 10 mean, is it GPIO#10?

Yes

What does it mean replacing '1' with '0'?

Change polarity from active low (1) to active high (0).

Can you explain why 7 and 12 are taken here, are they GPIO#7 and GPIO#12, what does it mean to give them value of '1' ? Do we use label any where ?

rt5350 have 27 gpio pins which are served by 2 gpio-controllers. So record for led

gpios = <&gpio0 7 1>;

means that when you set 7th pin of gpio-controller0 to value 0/1 led "ht-tm02:blue:wlan" be switch on/off.
You can try in command line

echo 1 > /sys/classes/leds/ht-tm02:blue:wlan/brigthness
echo 0 > /sys/classes/leds/ht-tm02:blue:wlan/brigthness

If value 1 switch led to off when you must change polarity in dts-file.
Record or button

gpios = <&gpio0 10 1>;

means  when 10th pin of gpio-controller0 have value 0/1 than "reset" button is pressed/released.
Label used in /etc/rc.button and /sys/classes/leds.

(Last edited by 123serge123 on 5 Oct 2016, 12:18)

The discussion might have continued from here.