The Godfather talking
You can run, but you can't hide.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 07, 2016, 01:17:38 13:17


Login with username, password and session length


Pages: [1]
Print
Author Topic: problem with megaAVR  (Read 1385 times)
0 Members and 1 Guest are viewing this topic.
samad
Guest
« on: February 06, 2008, 09:39:33 09: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: 61

Thank You
-Given: 240
-Receive: 20


« Reply #1 on: February 06, 2008, 09:56:29 09: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: 25
-Receive: 19


« Reply #2 on: February 06, 2008, 12:22:49 12: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: 130

Thank You
-Given: 44
-Receive: 19


« Reply #3 on: February 06, 2008, 01:30:51 13: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, 02:44:59 14: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, 09:13:52 09:13 »

thanks all
Logged
SergioFX
Newbie
*
Offline Offline

Posts: 9

Thank You
-Given: 8
-Receive: 4


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

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

Posts: 72

Thank You
-Given: 9
-Receive: 16


« Reply #7 on: February 14, 2008, 06:11:32 18: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, 09:08:52 09: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
*
 Muted
Offline Offline

Posts: 15

Thank You
-Given: 0
-Receive: 7


« Reply #9 on: February 19, 2008, 07:58:45 07: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, 10:22:56 22:22 »

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

Posts: 72

Thank You
-Given: 9
-Receive: 16


« Reply #11 on: February 20, 2008, 06:02:17 18: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: 41

Thank You
-Given: 18
-Receive: 51



« Reply #12 on: February 20, 2008, 06:46:27 18: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, 10:30:13 22: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, 10:19:27 22: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, 12:45:54 12:45 »

And which type of mega AVR you use?
Logged
samad
Guest
« Reply #16 on: February 26, 2008, 06:59:18 06: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