/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Saving a Primer2 Interface Config

Username:     
Password:     
             

Forum

# 1   2009-10-29 09:30:58 Saving a Primer2 Interface Config

JVidal
New member
Registered: 2008-03-28
Posts: 5

Saving a Primer2 Interface Config

Hello,

It seems the default Interface of Primer 2 is:
Main Menu-> Config -> Interface -> Loudspeaker : yes
Main Menu-> Config -> Interface -> User Input -> MEMS

I prefer to have
Main Menu-> Config -> Interface -> Loudspeaker : no
Main Menu-> Config -> Interface -> User Input -> Both (M+J)

Sometimes my soft hangs in such a way that I need to disconnect/reconnect the battery of the Primer. Then I change the Config to my preference.
When using Ride Debug with the Primer, the config seems to be reset to the default, I keep changing it before selecting my App, but at the next reprogramming of the Flash, the default comes back.
And then at some point, the primer remembers my config instead of using the default, even if the flash is reprogrammed by Ride Debug.
Until I need to disconnect/reconnect the battery, etc.

There is surely a deterministic reason why my config settings are finaly not overwritten by the default during the load of the debug code by Ride, but I didn't identify it.

Do you know what I should do to save my config so that it isn't reset the next time I use Ride to debug ?

Thanks for your help,
Jerome

Offline

 

# 2   2009-10-29 09:46:55 Saving a Primer2 Interface Config

matloub
Member
Registered: 2008-02-21
Posts: 98

Re: Saving a Primer2 Interface Config

Hi

I doubt there is way to save your config when you start the debug again because
the memory is fully erased before programming and starting the debug.
What about changing the startup of the circle OS so that it does what you need to do before giving you the hand?

Regards,
Matloub

Offline

 

# 3   2009-10-29 19:03:18 Saving a Primer2 Interface Config

themanix
Member
Registered: 2009-10-17
Posts: 17

Re: Saving a Primer2 Interface Config

a quick test in primer2

change: audio.c line 146
from
         AUDIO_SpeakerOn =  TRUE;
to
         AUDIO_SpeakerOn =  FALSE;

M+J is actually the default ??
if not change button.c line 119 & 120
from
        whatever you have
to
        TchscrAsInput=0;
        MemsAsInput = JoystickAsInput = 1;

Last edited by themanix (2009-10-29 19:36:44)

Offline

 

# 4   2009-10-30 13:21:34 Saving a Primer2 Interface Config

matloub
Member
Registered: 2008-02-21
Posts: 98

Re: Saving a Primer2 Interface Config

Hi

I have made a quick test with the mute button (it was more easy to check).
It seems to me that te default configuration is indeed saved in backup registers.
When you turn on the primer it is read and used.
So if you modify the CircleOS you need to change the config and also
to disabled default value reading.
For instance change "if ( fFirstStartup == FALSE )" in audio.c to "if (0)"
Then it should take in account the configuration you left when you stopped debug.

Regards,
Matloub

Offline

 

# 5   2009-11-02 09:08:39 Saving a Primer2 Interface Config

JVidal
New member
Registered: 2008-03-28
Posts: 5

Re: Saving a Primer2 Interface Config

Thank you both for your answers.

I've another possible simple solution that wouldn't require to modify CircleOS :
When the config is not the desired one, I change it, then I shutdown the device and start it again. It seems that in this case, the config when a Ride Debug session is started are mine, not the default ones.
(but I haven't tested this explicitely yet, I'm waiting for the next crash of my software).

Best regards,
J.

Offline

 

# 6   2009-11-03 07:00:04 Saving a Primer2 Interface Config

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Saving a Primer2 Interface Config

I confirm that most of user options configurations are saved during the power off phase (input interface, audio...).

Yves

Offline

 

Board footer