EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

RCM 3720 - Problems with flash and energy interruption

Started by Derliz April 9, 2012
I'm having troubles with our units in México. It seems that the energy supply isn't very reliable and there are some power interruptions that seem to affect the FAT structure in the flash.

This is what I get when checking the contents with the FAT_Shell example: http://dl.dropbox.com/u/20512436/example.jpg

Has anyone experienced this before? Any suggestions?

Thanks in advance,

Derliz

Are you using a battery for the SRAM? I ran into all kinds of problems until I started using the battery. I kept having to reformat the FAT partition. I contacted Rabbit and they said the battery was a requirement. I did do some things in my code to minimize the problem, though. One is to always close the file after reading or writing to it, and then use fat_UnmountDevice() to unmount the partition until you need it again. I guess it depends on how often you need to write to your file, so maybe this isn't a good suggestion for you. The main thing that helped me was to put the battery back into the demo board (or add it to your product, if you are using your own board).

If you are already using the battery, you need to try to avoid writing to flash when the power is fluctuating. Not sure how you would do that, without knowing more about the hardware you are using with the RCM3720.

--- In r..., "Derliz" wrote:
>
> I'm having troubles with our units in México. It seems that the energy supply isn't very reliable and there are some power interruptions that seem to affect the FAT structure in the flash.
>
> This is what I get when checking the contents with the FAT_Shell example: http://dl.dropbox.com/u/20512436/example.jpg
>
> Has anyone experienced this before? Any suggestions?
>
> Thanks in advance,
>
> Derliz
>

We use Precision Voltage Detector S80840, from Seiko, to detect when the voltage to the memory and CPU is out of range. The CPU reads the state before each memory access to determine if its safe to access memory.

--- In r..., "Derliz" wrote:
>
> I'm having troubles with our units in México. It seems that the energy supply isn't very reliable and there are some power interruptions that seem to affect the FAT structure in the flash.
>
> This is what I get when checking the contents with the FAT_Shell example: http://dl.dropbox.com/u/20512436/example.jpg
>
> Has anyone experienced this before? Any suggestions?
>
> Thanks in advance,
>
> Derliz
>

--- In r..., "seecwriter" wrote:
>
> We use Precision Voltage Detector S80840, from Seiko, to detect when the voltage to the memory and CPU is out of range. The CPU reads the state before each memory access to determine if its safe to access memory.

That is a good idea, although it wouldn't help if power failed right after you started writing a large chunck of data. If power is that sketchy, I'd recommend using a 12V gel cell as a backup source for the entire product, similar to the ones used in the alarm industry. You can add battery backup with nothing more than a 1N5401 diode in parallel with a 5-Ohm, 5W resistor. The diode's anode is connected to the battery + and the cathode is connected to the 12V power supply (AC powered) on your product. The resistor limits the charging current when the battery voltage is below the on-board 12V power supply. When AC fails, the diode allows the battery voltage (minus the diode drop) to take over powering the product. It isn't as sophisticated as modern pulse chargers, but it has been used for decades in the alarm industry.

That would eliminate the coin cell for the SRAM, since your 3.3V supply would never be interrupted during the power changeover. These kinds of gel cells can run an alarm control panel for days, depending on how much current it draws and the capacity of the battery you select. As soon as AC is restored, your 12V supply automatically starts float charging the battery via the 5-Ohm, 5W resistor.

If a gel cell is too big for your purposes, you'll have to stick with the coin cell and use something like seecwriter suggested (and only write small chunks of data at a time).

>
> --- In r..., "Derliz" wrote:
> >
> > I'm having troubles with our units in México. It seems that the energy supply isn't very reliable and there are some power interruptions that seem to affect the FAT structure in the flash.
> >
> > This is what I get when checking the contents with the FAT_Shell example: http://dl.dropbox.com/u/20512436/example.jpg
> >
> > Has anyone experienced this before? Any suggestions?
> >
> > Thanks in advance,
> >
> > Derliz
>

Thanks a lot for the ideas.

Actually, it was even worse when we didn't use the coin battery. Now that we have it, the problems came up when the power goes off in the middle of the unit usage. Probably when we're writing data.

The data chunks are small, but I'm currently keeping the file constantly open. I'll implement closing it after each write and see if it improves.

If it doesn't, the B plan is to work with the gel battery.

Once again: Thank you all for the ideas.

--- In r..., "ebrains2003" wrote:
>
>
>
>
>
>
> --- In r..., "seecwriter" wrote:
> >
> > We use Precision Voltage Detector S80840, from Seiko, to detect when the voltage to the memory and CPU is out of range. The CPU reads the state before each memory access to determine if its safe to access memory.
>
> That is a good idea, although it wouldn't help if power failed right after you started writing a large chunck of data. If power is that sketchy, I'd recommend using a 12V gel cell as a backup source for the entire product, similar to the ones used in the alarm industry. You can add battery backup with nothing more than a 1N5401 diode in parallel with a 5-Ohm, 5W resistor. The diode's anode is connected to the battery + and the cathode is connected to the 12V power supply (AC powered) on your product. The resistor limits the charging current when the battery voltage is below the on-board 12V power supply. When AC fails, the diode allows the battery voltage (minus the diode drop) to take over powering the product. It isn't as sophisticated as modern pulse chargers, but it has been used for decades in the alarm industry.
>
> That would eliminate the coin cell for the SRAM, since your 3.3V supply would never be interrupted during the power changeover. These kinds of gel cells can run an alarm control panel for days, depending on how much current it draws and the capacity of the battery you select. As soon as AC is restored, your 12V supply automatically starts float charging the battery via the 5-Ohm, 5W resistor.
>
> If a gel cell is too big for your purposes, you'll have to stick with the coin cell and use something like seecwriter suggested (and only write small chunks of data at a time).
>
> >
> > --- In r..., "Derliz" wrote:
> > >
> > > I'm having troubles with our units in México. It seems that the energy supply isn't very reliable and there are some power interruptions that seem to affect the FAT structure in the flash.
> > >
> > > This is what I get when checking the contents with the FAT_Shell example: http://dl.dropbox.com/u/20512436/example.jpg
> > >
> > > Has anyone experienced this before? Any suggestions?
> > >
> > > Thanks in advance,
> > >
> > > Derliz
> > >
>

If data chunks are small enough (and you have enough memory space) you may
keep two (signed) memory banks, the last change in the static ram and check
for consistency at every system reset.

I've got a system running this way and logging data who is vulnerable to
reset itself up to 100 times per second in a random pattern (because true
hard environment conditions) and works unexpectedly well. Is not a rabbit
based system but may be you can adapt the idea.
jp
On Tue, Apr 10, 2012 at 11:04 AM, Derliz wrote:

> **
> Thanks a lot for the ideas.
>
> Actually, it was even worse when we didn't use the coin battery. Now that
> we have it, the problems came up when the power goes off in the middle of
> the unit usage. Probably when we're writing data.
>
> The data chunks are small, but I'm currently keeping the file constantly
> open. I'll implement closing it after each write and see if it improves.
>
> If it doesn't, the B plan is to work with the gel battery.
>
> Once again: Thank you all for the ideas.
>
> --- In r..., "ebrains2003" wrote:
>
> >
> >
> >
> >
> >
> >
> > --- In r..., "seecwriter" wrote:
> > >
> > > We use Precision Voltage Detector S80840, from Seiko, to detect when
> the voltage to the memory and CPU is out of range. The CPU reads the state
> before each memory access to determine if its safe to access memory.
> >
> > That is a good idea, although it wouldn't help if power failed right
> after you started writing a large chunck of data. If power is that sketchy,
> I'd recommend using a 12V gel cell as a backup source for the entire
> product, similar to the ones used in the alarm industry. You can add
> battery backup with nothing more than a 1N5401 diode in parallel with a
> 5-Ohm, 5W resistor. The diode's anode is connected to the battery + and the
> cathode is connected to the 12V power supply (AC powered) on your product.
> The resistor limits the charging current when the battery voltage is below
> the on-board 12V power supply. When AC fails, the diode allows the battery
> voltage (minus the diode drop) to take over powering the product. It isn't
> as sophisticated as modern pulse chargers, but it has been used for decades
> in the alarm industry.
> >
> > That would eliminate the coin cell for the SRAM, since your 3.3V supply
> would never be interrupted during the power changeover. These kinds of gel
> cells can run an alarm control panel for days, depending on how much
> current it draws and the capacity of the battery you select. As soon as AC
> is restored, your 12V supply automatically starts float charging the
> battery via the 5-Ohm, 5W resistor.
> >
> > If a gel cell is too big for your purposes, you'll have to stick with
> the coin cell and use something like seecwriter suggested (and only write
> small chunks of data at a time).
> >
> > >
> > > --- In r..., "Derliz" wrote:
> > > >
> > > > I'm having troubles with our units in México. It seems that the
> energy supply isn't very reliable and there are some power interruptions
> that seem to affect the FAT structure in the flash.
> > > >
> > > > This is what I get when checking the contents with the FAT_Shell
> example: http://dl.dropbox.com/u/20512436/example.jpg
> > > >
> > > > Has anyone experienced this before? Any suggestions?
> > > >
> > > > Thanks in advance,
> > > >
> > > > Derliz
> > > >
> > >
> >
>
A super-cap is also a possibility. Depending on current draw, it can hold up
your power for days. We only write small amounts of data at a time, 64-bytes
or less. And we don't use the Rabbit's flash, we use external serial EEProms.
>________________________________
> From: ebrains2003
>To: r...
>Sent: Monday, April 9, 2012 11:40 AM
>Subject: [rabbit-semi] Re: RCM 3720 - Problems with flash and energy interruption
>

>
>--- In r..., "seecwriter" wrote:
>>
>> We use Precision Voltage Detector S80840, from Seiko, to detect when the voltage to the memory and CPU is out of range. The CPU reads the state before each memory access to determine if its safe to access memory.
>
>That is a good idea, although it wouldn't help if power failed right after you started writing a large chunck of data. If power is that sketchy, I'd recommend using a 12V gel cell as a backup source for the entire product, similar to the ones used in the alarm industry. You can add battery backup with nothing more than a 1N5401 diode in parallel with a 5-Ohm, 5W resistor. The diode's anode is connected to the battery + and the cathode is connected to the 12V power supply (AC powered) on your product. The resistor limits the charging current when the battery voltage is below the on-board 12V power supply. When AC fails, the diode allows the battery voltage (minus the diode drop) to take over powering the product. It isn't as sophisticated as modern pulse chargers, but it has been used for decades in the alarm industry.
>
>That would eliminate the coin cell for the SRAM, since your 3.3V supply would never be interrupted during the power changeover. These kinds of gel cells can run an alarm control panel for days, depending on how much current it draws and the capacity of the battery you select. As soon as AC is restored, your 12V supply automatically starts float charging the battery via the 5-Ohm, 5W resistor.
>
>If a gel cell is too big for your purposes, you'll have to stick with the coin cell and use something like seecwriter suggested (and only write small chunks of data at a time).
>
>>
>> --- In r..., "Derliz" wrote:
>> >
>> > I'm having troubles with our units in México. It seems that the energy supply isn't very reliable and there are some power interruptions that seem to affect the FAT structure in the flash.
>> >
>> > This is what I get when checking the contents with the FAT_Shell example: http://dl.dropbox.com/u/20512436/example.jpg
>> >
>> > Has anyone experienced this before? Any suggestions?
>> >
>> > Thanks in advance,
>> >
>> > Derliz
>> >
>>
>
>
>

The 2024 Embedded Online Conference