View previous topic :: View next topic |
Author |
Message |
mariom79
Joined: 11 Oct 2004 Posts: 48 Location: Faenza (RA) - ITALY
|
Posted: Thu Oct 23, 2008 5:26 pm Post subject: AVR-DOS, HDD and ATmega2560 Problems |
|
|
Hi guys, I have a lot of problems with AVR-DOS and ATmega2560. I have tried to connect an HDD to ATmega2560, but i get an error during the driveinit sequence, I have also tried with sample supplied with bascom, but nothing to do. If I use the sample with ATmega128, all working with no problem. I have used the standard ports (A,C,B) in both case. There are some tips to get working the HDD and AVR-DOS with new ATmega2560 ???
Many thanks in advance for any suggestion or help.
Best Regards. |
|
Back to top |
|
|
mariom79
Joined: 11 Oct 2004 Posts: 48 Location: Faenza (RA) - ITALY
|
Posted: Tue Oct 28, 2008 11:43 am Post subject: |
|
|
....no suggestions ??? ....there is no way to get it working ? |
|
Back to top |
|
|
mariom79
Joined: 11 Oct 2004 Posts: 48 Location: Faenza (RA) - ITALY
|
Posted: Sun Nov 16, 2008 12:08 pm Post subject: |
|
|
Hi again, I have made another test in order to understand where is the problem, AVR-DOS and ATmega2560 works perfectly with SD-CARD in SPI, but don't work with CF/HDD, the error returned with CF/HDD is 227 on driveinit(). So I think that the problem is with CF/HDD driver ...some timing or port register addressing ....I don't know I'm not an ASM developer. I hope that these tests are a good way for solve the issue. |
|
Back to top |
|
|
mariom79
Joined: 11 Oct 2004 Posts: 48 Location: Faenza (RA) - ITALY
|
Posted: Wed Feb 11, 2009 12:38 pm Post subject: |
|
|
up up. |
|
Back to top |
|
|
oe9vfj
Joined: 17 Jun 2004 Posts: 269 Location: Austria, Hard
|
Posted: Wed Feb 11, 2009 3:27 pm Post subject: |
|
|
On which ports do you attached the CF/HDD device.
Can you send me a schematic and the your CONFIG_HardDisk.bas file. _________________ regards Josef
DOS - File System for BASCOM-AVR on http://members.aon.at/voegel |
|
Back to top |
|
|
mariom79
Joined: 11 Oct 2004 Posts: 48 Location: Faenza (RA) - ITALY
|
Posted: Wed Feb 11, 2009 6:46 pm Post subject: |
|
|
oe9vfj wrote: | On which ports do you attached the CF/HDD device.
Can you send me a schematic and the your CONFIG_HardDisk.bas file. |
Hi, for the tests I have used the sample programs supplied with bascom, I have tried with all combination of ports.
In my application I have tried with PortA = IDEH, PortC = IDEL, PortD = IDECTRL.
In both case with the same problems. With ATmega128 this settings work fine.
Many thanks for your help. |
|
Back to top |
|
|
mariom79
Joined: 11 Oct 2004 Posts: 48 Location: Faenza (RA) - ITALY
|
Posted: Thu Feb 12, 2009 8:51 am Post subject: |
|
|
Hi Again, the problem is the same with ATmega 1280/1281. I think that the problem is in low level driver that interface with HDD/CF. If you want I can make all tests that you want.
Best Regards. |
|
Back to top |
|
|
oe9vfj
Joined: 17 Jun 2004 Posts: 269 Location: Austria, Hard
|
Posted: Thu Feb 12, 2009 11:02 am Post subject: |
|
|
Please check your XRAM configuration in Option/Compiler/Chip. No XRAM should be enabled in this Option or anywhere in the Code, because this configuration affects Port-A and Port-C.
Do you use HW-TWI. This also affect the Port-D. _________________ regards Josef
DOS - File System for BASCOM-AVR on http://members.aon.at/voegel |
|
Back to top |
|
|
mariom79
Joined: 11 Oct 2004 Posts: 48 Location: Faenza (RA) - ITALY
|
Posted: Thu Feb 12, 2009 11:08 am Post subject: |
|
|
Hi, the XRAM is disabled in any case, and I don't use HW-TWI or I2C. The same software compiled for ATM128 works fine, compiled for ATMEGA1281 (that is pinout compatible) don't work. I use STK501 with ATM128/1281/2561 and STK503 with ATM1280/2560 with the same wire and connections. |
|
Back to top |
|
|
mariom79
Joined: 11 Oct 2004 Posts: 48 Location: Faenza (RA) - ITALY
|
Posted: Mon Feb 16, 2009 2:23 pm Post subject: |
|
|
Hi, do you have find something about these problems ? Can I make some tests ?
Best Regards. |
|
Back to top |
|
|
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
|
Back to top |
|
|
oe9vfj
Joined: 17 Jun 2004 Posts: 269 Location: Austria, Hard
|
Posted: Tue Feb 17, 2009 7:38 am Post subject: |
|
|
After you started with the AVR-DOS Test-Program (FS_Interpreter) try to read the sector 0 with SD 0. If a sector is shown please post the dump. _________________ regards Josef
DOS - File System for BASCOM-AVR on http://members.aon.at/voegel |
|
Back to top |
|
|
mariom79
Joined: 11 Oct 2004 Posts: 48 Location: Faenza (RA) - ITALY
|
Posted: Tue Feb 17, 2009 8:24 pm Post subject: |
|
|
Hi, the result of the test (ATmega1281) is:
---------------------------------
Wait for Drive
Error during Drive Init: 227
AVR-DOS: Ready for commands
0000>sd 0
Dump Sectors from 0 to 0
Read Sector: 0 ... Error 227 at sector# 0
Drive Error: 227
Drive Status:00000000
Drive Debug: 0
0000>
----------------------------------
I have used PORTA, PORTC, PORTC with "Test_DOS_Drive.bas" supplied with BASCOM.
The hardware, board, wire, crystal, are the same with working ATmega128.
The result is the same with ATmega2560 / Atmega 2561 / ATmega1280.
Best Regards. |
|
Back to top |
|
|
oe9vfj
Joined: 17 Jun 2004 Posts: 269 Location: Austria, Hard
|
Posted: Wed Feb 18, 2009 3:26 pm Post subject: |
|
|
I checked the generated code for an ATMega1281, which interacts with the HD and found no difference to ATMega128. The Atmel Application Note AVR097 (Migration between ATMega128 and ATMega1281/ATMega2561) has no information which brings light to this topic.
I have no board with such ATMega types to test it on hardware. At the moment I have no idea, what could be the cause of your problem.
I am thinking about to buy a development-board to check new (high-end) AVR-Types with AVR-DOS. I am just checking, whether the STK600 with adapter-boards will be better than STK500 with STK501 and STK503. But the Information provided by ATMEL (schematic ) is very rare.
What is your opinion. Do you know a good (and cheap) distributor in EU for such boards.
best regards _________________ regards Josef
DOS - File System for BASCOM-AVR on http://members.aon.at/voegel |
|
Back to top |
|
|
mariom79
Joined: 11 Oct 2004 Posts: 48 Location: Faenza (RA) - ITALY
|
Posted: Wed Feb 18, 2009 4:03 pm Post subject: |
|
|
Hi, the ATmega1281 and ATmega2561 are pinout compatible with ATmega128, and you could use STK500+STK501 to program these chips. (I have made all tests with STK500+501). I have bought the bord from DIGIKEY, but you can find it also from FARNELL (www.farnell.com).
I don't know because with the same code the program don't work with new chips. Maybe the problems are around the port register. For example with PORTE and PORTF you can't use GLCD because these ports are in extended memory space. I don't know if these problems are the same.
Best Regards. |
|
Back to top |
|
|
|