![]() |
Forum Index : Microcontroller and PC projects : Geez...Things were going so well...
Page 1 of 2 ![]() ![]() |
|||||
Author | Message | ||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
... ![]() When trying to SAVE: 1) Started getting intermittent 'SD card is write protected' 2) With ColorMaxiMite powered, pulled and reinserted SD card ( seemed to wipe all files ![]() 3) Now see above pic ^ 4) SD ruined ? ..... MaxiMite ruined ? .... Missing something simple ? |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2927 |
As with any computer data, I take it you made a back-up! ![]() Hey, lets hope you weren't using one of those 'bargain priced' SD cards. Can you try another SD card to see if your CMM has survived? Please do post more details no matter how 'frustrated' you must be right now ![]() WW |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
No backup but nothing too important .... 1) Read SD direct with SD to USB adaptor .... Files seemed intact 2) Reloaded MMBasic hexfile ...... All is well ! ![]() |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2927 |
So is it a faulty SD card? OR is it because you removed the SD card while the MM was powered? Something not quite right ![]() Glad all is well though . . . |
||||
cosmic frog Senior Member ![]() Joined: 09/02/2012 Location: United KingdomPosts: 300 |
I used to get a similar problem all the time. It turned out to be the keyboard of all things! ![]() Dave. |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
> So is it a faulty SD card? Seems not. The indication is that the MMBasic someways became corrupted .... (knock on wood ![]() |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
> It turned out to be the keyboard of all things! LOL .... I've gone nuts trying to boot up with a key stuck down ! |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
What is the general consensus around the forums here, with the removal and insertion of SD cards on the MaxiMite series of computers, while powered? I thought I read somewhere that this was a no-no. Even if you are not accessing the card. My thoughts wander to images in my mind of MMBASIC keeping track of the files list or the directory info, and so removing the card and putting in another one will perhaps confuse the hell out of MMBASIC's filesystem handler? ...only speculation on my part - just thinking out loud, so to speak. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
It may have been a 'final straw' in my episode, but not the whole problem at all. My first symtom was intermittent 'SD card write protected' when I'd try to save. I couldn't find any referance to that in the manual. It happened more and more until I couldn't save at all. After (in desperation) I pulled the card (with power (not thinking straight)) came : ![]() Anyways after reflashing the PIC everything's hunky dory .... Begs the question : Things not to do to corrupt your chip ? |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
Very interesting indeed. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3272 |
On the original Maximite and Colour Maximite you can swap the SD card without any ill effects because the SD card holder used in them provides a card-present signal to MMBasic which tells the interpreter to re initialise the filesystem driver if the card is removed. The Duinomites don't have this signal but by using a trick MMBasic can still tell when a card has been swapped so they are OK also. On Circuit Gizmo's boards I am not sure. From what I remember the original monochrome CGMMSTICK1 does not signal a card change so you have to cycle the power after a card change while the colour CGCOLORMAX2 does provide the signal and is OK. All of this assumes that you do NOT remove the card while MMBasic is writing to the card or when files are open on the card. Both are no nos and will result in a corrupted file or filesystem. Geoff Geoff Graham - http://geoffg.net |
||||
raketenbuggy Newbie ![]() Joined: 08/02/2014 Location: GermanyPosts: 21 |
Some days ago I had a similar problem: Suddenly my AUTORUN.BAS didn't run on my TFT-Maximite at startup because my SD-card seemed to be empty. Plugged into a cardreader I got a "file system error" message. Further investigation showed, that the MBR was ok but there was a large block of zeros where the first FAT should have been, and the second FAT was badly demaged (the beginning was overwritten with zeros). Luckily the data area was ok, so with the help of some tools (PhotoRec and a hex-editor) I got all files back but it was a hell a lot of work! I don't know what exactly happened, but I think I caused a brownout: I didn't use the reset button to restart the TFT-maximite, but instead I unplugged the power cable for a short time. Afterwards I discovered that if you reconnect power at the right (or wrong) time, when the display isn't illuminated anymore but the capacitors on the board have some electrons left, the PIC may get into an undefined state where strange things can happen. Most of the time it won't startup properly or will freeze during startup, but I've also seen error messages that would normally show up on completely other occasions. So the lessons for me: 1. Use the reset-button or wait long enough before reconnecting power. 2. Make a backup! Michael |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
Yes indeed - SD card use has to be very seriously considdered in your system. In my case, I also have a big red reset button, but this is NOT connected to the PIC32 MCLR line, as random core resets could be disastrous for the files or filesystem on the SD card, as already indicated. In my case, I use a nice easy way to find out what is going on - Set a flag whenever the file is opened(I just use SDFLAG=1 for file open, and SDFLAG=0 for file closed), then have my reset button on an I/O pin using an interrupt. If the "Reset" button is pressed, the interrupt checks if SDFLAG is 1 or 0, and if it is 1, the interrupt knows the file is opened, so it closes the file handle(it's always the same one for writing), then restarts the system with a RUN command. I have played with that quite a bit, and I have never had a corrupted file or filesystem. It IS true, that you can, on occasion, have a truncated log-file, if "Reset" is pressed while the log-file is open for append when that button is pressed, but at least the file is safely closed first. I have not actually noticed any truncation either, as all my data to the log-file is in strings, so I would GUESS that if an interrupt tried to close the file in the middle of writing a string, that MMBASIC would finish writing that string before closing the file? Perhaps not. Perhaps I have just been lucky there with no missing messages in the log. Smoke makes things work. When the smoke gets out, it stops! |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
I just found : After boot if you use EDIT"xxx.bas" to open a file then F2 to run, you get "SD card protected" You must use LOAD"xxx.bas" then EDIT then F2 and it runs ... That may have been some of my confusion (or not ![]() |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
From MMBASIC manual, page 61: What I gather from this is, that F2 to run won't work, as using a filename with the EDIT command does not alter the existing program memory. Might have that wrong though - just my guess. Smoke makes things work. When the smoke gets out, it stops! |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
![]() The 'SD card protected' might have been part of my keyboard problem ( since resolved ) |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
I will try the same as you with one of my CMM units shortly.... You are sure that the write-protect tab thing on the SD card IS in the writable position? I know you have probably checked that, but just to be sure.... EDIT: I just tried this, and I have no such error - I would be wanting to check the SD card write-protect tab thing. If the tab is OK, try loading a program from the command prompt, then saving it again using SAVE and see what happens. It is POSSIBLE that the write-protect switch on the SD card slot is broken or faulty. Probably not that likely, but worth checking that. EDIT: I suppose I should list my process: LOAD ASC.BAT RUN EDIT (F2) NEW EDIT ASC.BAT (F2) That all completes fine. EDIT: OK, I can recreate your error exactly: EDIT ASC.BAT (F2) Error: SDcard is write protected I did this, by moving the tab on the SD card to LOCK(write-protected). So, assuming that you DON'T have the SD card tab in the LOCK position, but are still getting this error, then there may be an issue with the switch on the SD card holder that senses if the tab on the SD card is moved or not. Smoke makes things work. When the smoke gets out, it stops! |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
It must be ...... It's working now ...... The whole fiasco was evedently the keyboard ...... And I bought 4 of them for a 'lifetime supply ' ![]() Oh well ..... they work fine on a PC ..... |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
Well then - perhaps the $20 keyboard is not such a mad idea after all. I retract my comments about it's price. I would therefore assume, that the $20 KB is just plain old PS2 KB with NO extra functions or support for any multimedia keys etc. Perhaps those multimedia keyboards are a cause for concern on the MM. Out of interest, the KB's you bought that did not work - were they multimedia ones with extra keys on them? Smoke makes things work. When the smoke gets out, it stops! |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
NO ! It' made by the Stamp Outfit for Propellar et. al .......... Actually has a disclaimer against being anything else ... |
||||
Page 1 of 2 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |