How to store application program to EEPROM?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

    I'm just getting started working with the WICED SMART dev kit.  I was successfully able to download the hello sensor application to the WICED board and see the application running.  However, once I removed power the application erased from memory. 

How can I program the WICED SMART so that the program remains on EEPROM memory even though the board is turned off?

Also, if I press the reset button while the board is already programmed and running, the program is erased from memory also.  How can I configure my program so that the reset button just restarts the program (not delete the program from memory)?

Thanks.

1 Solution
Anonymous
Not applicable

I was able to resolve the problem. 

Here's what I did:

1/  First I put all the switches in SW4 to ON, and flashed the program to the WICED Smart as explained in the Quick Start Guide.

2/  After the program is flashed and running on the WICED, I then switched all the switches in SW4 to OFF

3/  After removing power the program was still stored on the WICED

I was confused because the Quickstart guide made it seem like flipping the switches in SW4 to OFF was optional.  In actuality, it is required if you want the program to remain after removing power.

View solution in original post

0 Likes
9 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Others have reported this with custom boards using the 20732S, but never with the TAG board.

Assuming that SW4 is set so that all 8 switches are on, once programmed through the SDK, the program is stored in the EEPROM (NVRAM) on the TAG3 Board.

It should not dissapear when the power is removed. After the board is programmed, the board stays in application mode.  it wll not go back into programming mode till the RESET button is depressed.

Anonymous
Not applicable

Is there something I'm doing wrong in the program code?  Am I writing the code to flash instead of EEPROM?

0 Likes

If you have an iPhone and can download the LightBlue App off the App Store, try the procedure starting on page 9 of the Quickstart guide: WICED Smart™ Quick Start Guide (SDK 2.x and TAG3 Board)

You will essentially program a BLE Heart Rate Monitor onto the Tag board then monitor that program through LightBlue (there is also an app for Android called BLE Explorer).

This is all happening whil the board is powered over USB, connected to your PC.

If you then want to power it off the CR2032 battery, there is instructions for doing that as well.

0 Likes

Were you able to get the sample working Samuel? If not, I can get you another board to try out.

0 Likes
Anonymous
Not applicable

I was able to resolve the problem. 

Here's what I did:

1/  First I put all the switches in SW4 to ON, and flashed the program to the WICED Smart as explained in the Quick Start Guide.

2/  After the program is flashed and running on the WICED, I then switched all the switches in SW4 to OFF

3/  After removing power the program was still stored on the WICED

I was confused because the Quickstart guide made it seem like flipping the switches in SW4 to OFF was optional.  In actuality, it is required if you want the program to remain after removing power.

0 Likes
Anonymous
Not applicable

Hello sgarcia,

Thanks for the feedback.

We will fix this confusion in the next QSG release.

Thanks

JT

0 Likes

I have never had to turn the SW4 switches off on the board to retain the contents of the EEPROM.

Soemthing doesn't seem right.

arvinds

0 Likes
Anonymous
Not applicable

Quoted text:

"The reason it appears that turning off dip switches on SW4 seems to work is because if you power cycle the device with the switches on, it will enter download mode and so the app will appear not to run."


-If that's the case, then how do you get out of download mode without having to put all SW4 switches to OFF?

0 Likes

I see the confusion now.

The external pull-up (VDDIO) on Pin 18, which is the HCI UART RXd  line (Note that on the module this pin is pulled low through an internal 10k ohm resistor) should cause the part to come up in programming mode, even though the application is still loaded into EEPROM.

Changing the settings on SW4 essentially places the part into application mode (take a look at the Viewing Trace section in the QSG, the part is in Application Mode for this procedure).

Ultimately, in a real application we would want the host to drive its TXd (2073x’s RXd) high (not just a pull-up).

0 Likes