Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 18, 2024, 12:52:41 12:52


Login with username, password and session length


Pages: [1]
Print
Author Topic: problem with megaAVR  (Read 3560 times)
0 Members and 1 Guest are viewing this topic.
samad
Guest
« on: February 06, 2008, 08:39:33 08:39 »

sometimes avr can't continue its correct working , but
reading it's code from itself & reprograming can solve this problem
i can't understand that how the reprograming can solve it,please help me..
Logged
leptro
V.I.P
Junior Member
*****
Offline Offline

Posts: 93

Thank You
-Given: 604
-Receive: 26


« Reply #1 on: February 06, 2008, 08:56:29 08:56 »

I THINK YOU ARE IN THE WRONG FORUM!

But, it's look like a bug in your program your may do something that corrupt your flash program area or goes in a unknow state.
Logged
kolin
Junior Member
**
Offline Offline

Posts: 40

Thank You
-Given: 27
-Receive: 19


« Reply #2 on: February 06, 2008, 11:22:49 11:22 »

Is avr close to some high current switching device like power mosfet or so?
Have you tried different chip?
Logged
microkid
Active Member
***
Offline Offline

Posts: 129

Thank You
-Given: 45
-Receive: 23


« Reply #3 on: February 06, 2008, 12:30:51 12:30 »

I do have avr's placed close to high current, But i dont see any prob (if you had a good bye pass capacitor)
Try a new chip.

MicroKid
Logged

Never Never Never giveup
samud
Guest
« Reply #4 on: February 06, 2008, 01:44:59 13:44 »

you have to enable  Watchdog timer  and check out power supply, use a good bypass capacitor
Logged
samad
Guest
« Reply #5 on: February 08, 2008, 08:13:52 08:13 »

thanks all
Logged
SergioFX
Newbie
*
Offline Offline

Posts: 10

Thank You
-Given: 11
-Receive: 4


« Reply #6 on: February 12, 2008, 10:22:32 22:22 »

Hi, maybe the power supply varies and the burnout (see avr fuse) halt the program execution.
Logged
mylogin
Junior Member
**
Offline Offline

Posts: 71

Thank You
-Given: 9
-Receive: 16


« Reply #7 on: February 14, 2008, 05:11:32 17:11 »

check your program when initialize the MCU there are some thing not initialized by your program, it could be in unknown state.  check the fuse bit config.   sometimes reprogram will reset it to a  known state but after a while it is unknown.     Also check the I/O pins circuit.  sometimes the I/O got latched-up problem, when power-on.   setup reset delay feature in the MCU when power-up so it will stay in RESET longer, after all I/O pin is stable then MCU is out of the RESET state.
Logged
samad
Guest
« Reply #8 on: February 18, 2008, 08:08:52 08:08 »

my flash is safe because programmer can read it correctly
the wdt is enabled and ofcourse reset can't solve the problem
i use multilayer and tantal caps with a big elec one
i'm sure that i don't have problem with brown out reset
i'm sure that i don't have any unknown state 
there is no problem with fuse bits
after power on i wait about one second
Logged
freddy
Newbie
*
Offline Offline

Posts: 15

Thank You
-Given: 0
-Receive: 7


« Reply #9 on: February 19, 2008, 06:58:45 06:58 »

sometimes avr can't continue its correct working , but
reading it's code from itself & reprograming can solve this problem
i can't understand that how the reprograming can solve it,please help me..
---------------------------
my flash is safe because programmer can read it correctly
the wdt is enabled and ofcourse reset can't solve the problem
i use multilayer and tantal caps with a big elec one
i'm sure that i don't have problem with brown out reset
i'm sure that i don't have any unknown state 
there is no problem with fuse bits
after power on i wait about one second

....but reading it's code from itself & reprograming can solve this problem....

When you do this... usualy the E2Prom are cleared.
I think that's you are using the E2Prom in your application and some writing of
incorrect value make all your problems.
Logged
samad
Guest
« Reply #10 on: February 19, 2008, 09:22:56 21:22 »

my eeprom is write protected(fuse bit..)
Logged
mylogin
Junior Member
**
Offline Offline

Posts: 71

Thank You
-Given: 9
-Receive: 16


« Reply #11 on: February 20, 2008, 05:02:17 17:02 »

>sometimes avr can't continue its correct working , but
>reading it's code from itself & reprograming can solve this problem
>i can't understand that how the reprograming can solve it,please help me..

try reading it's code from itself  ONLY! & "DO NOT" reprograming,  see if it can solve this problem.
if yes, then it is not the programming problem.  check pins related to programming. (RESET, SCK, SD,..)
Logged
rtm
Junior Member
**
Offline Offline

Posts: 53

Thank You
-Given: 90
-Receive: 71


a.k.a. klug


« Reply #12 on: February 20, 2008, 05:46:27 17:46 »

Good old practice is to compare checksum of your program flash memory during init.
It will allow to avoid unstable working because of corrupted firmware.
Also it is not so bad idea to clean all ram during init.
Logged
adamhorden
Newbie
*
Offline Offline

Posts: 8

Thank You
-Given: 3
-Receive: 3


« Reply #13 on: February 20, 2008, 09:30:13 21:30 »

Have you got any brown out circuits or similar? Is the supply clean? Hvae you looked at the supply rails with a scope to see if you can see any glitches around the time the micro locks up?

Adam
Logged
samad
Guest
« Reply #14 on: February 21, 2008, 09:19:27 21:19 »

thanks to all
checksum is the same..
brown out and other reset sourses couldn't help me..
my supply is clean..
Logged
mpas
Guest
« Reply #15 on: February 24, 2008, 11:45:54 11:45 »

And which type of mega AVR you use?
Logged
samad
Guest
« Reply #16 on: February 26, 2008, 05:59:18 05:59 »

atmega32-16pu
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC