Reset malfunction in a standalone internal 8MHz

Hello all!

We are a group of students who right now are dealing with some problems in our PCB based on the ATmega328P-PU. Our microprocessors has a bootloader and works with the internal 8MHz oscillator. The problem is that the programme works for the first team (even reseated it once), then, whenever it is reseated it is not running again.
We have heard that the bootloader awaking takes some seconds and it has some conflicts with the serial communication. We have tried with a delay of 5 seconds but the reset only works once.
Anyone knows what can cause the problem?

Thank you in advance

It's hard to understand what the problem is, exactly.

What is the program supposed to do? Is it really not running at all, or just doesn't do what you expect? What gives the microcontroller the Reset signal? Did you make sure the Reset pin has a proper pull-up resistor?

igendel:
It's hard to understand what the problem is, exactly.

What is the program supposed to do? Is it really not running at all, or just doesn't do what you expect? What gives the microcontroller the Reset signal? Did you make sure the Reset pin has a proper pull-up resistor?

The code runs, but the I2C communication to our external RTC doesn't set up the alarm (just the first time the reset is pushed).
Regarding the pull-up, the hardware shouldn't be problem since we have the proper resistance and connections.

Sorry but it is true that the first message was not very clear. :wink:

The fact that I2C communication seems to be failing, but the code running, suggests that the problem might be that the I2C RTC module is getting confused. The reset button does not reset connected devices, unless your code is smart enough to do so on startup.

Does it work on a stock arduino, running at 16mhz, or do you get the same behavior there?

When you said "reseated" - do you mean "reseated", that is, removing the chip and putting it back in, or "reset", which means pressing the reset button? If you do mean reseated, why are you doing that?

You say it works only once. Is that once per board? once per chip? Or does a power cycle fix it?

landondonovan:
The code runs, but the I2C communication to our external RTC doesn't set up the alarm (just the first time the reset is pushed).

What alarm? :stuck_out_tongue:

A proper reset should restart the software with no problem. If there is a problem, then either the reset signal was problematic, or the software restored itself to some inner state that is no longer appropriate, or you left some metaphorical loose wires - for instance, leaving an external component in a mode that doesn't allow it to reset with the rest of the system [edit: Like DrAzzy suggested].

It will be hard to give a more detailed answer without a detailed description of the system and code...

We are fucked up... I have figured out the problem. The pull ups in SDA and SCL lines are missing.
The alarm of the RTC sometimes it works at the beginning, but afterwards, when the reset button is pressed, or just taking out the microchip, and placing it again, it doesn't work again. All this instability comes from the communication lines...
I don't know how we are going to solve this since we have already our PCB built...

Thanks for your replies!

landondonovan:
We are fucked up... I have figured out the problem. The pull ups in SDA and SCL lines are missing.
The alarm of the RTC sometimes it works at the beginning, but afterwards, when the reset button is pressed, or just taking out the microchip, and placing it again, it doesn't work again. All this instability comes from the communication lines...
I don't know how we are going to solve this since we have already our PCB built...

Thanks for your replies!

Thank you for updating.

You fix it by adding the resistors as jumpers soldered to tracks. Lots of old style PCBs have this done.