MarciPain / rallylog

Automatically exported from code.google.com/p/rallylog
0 stars 0 forks source link

Will not reset if SD card is removed #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Remove SD card
2. attach battery or push reset button
3.

What is the expected output? What do you see instead?
Bootup message should be displayed

Please use labels and text to provide additional information.
If SD card is installed upon power up or reset then everything is ok

Original issue reported on code.google.com by madeino...@gmail.com on 29 Jan 2011 at 7:06

GoogleCodeExporter commented 8 years ago
problem is caused with the SD library being one of the first things to be 
initialized in the setup routines.

This needs to be re-worked to probably be initialized later but also 
re-initialized whenever the card is re-inserted.

Original comment by madeino...@gmail.com on 29 Jan 2011 at 7:13

GoogleCodeExporter commented 8 years ago
Have fixed and now SD card removal is detected and recovered from, i.e. data is 
written to the card again when re-inserted.

One gotcha - The SD Library and LCD library share the SPI bus, initialization 
order is important i.e. SD needs to be initialized before the LCD.  

I had problems re-initializing the SD and/or LCD when the card was re-inserted 
due to the SPI bus sharing, so have opted for a simpler solution, that or a 
soft reboot after the card has been re-inserted.  This appears to works nicely.

Original comment by madeino...@gmail.com on 31 Jan 2011 at 1:44