Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: at91sam3u1 vs at91sam3u4
PostPosted: Sat Jul 30, 2011 1:07 pm 
Offline

Joined: Sat Jul 30, 2011 12:50 pm
Posts: 6
I've been trying to compile the sample project basic-sdmmc-test-project-at91sam3u-ek (sam3u4) on a sam3u1 and I've hit a wall. It seems to work, but after a bit, it seems to get stuck on the SD Card init routine. I'm sure there's a more complex problem that I'm missing. Here are some comments and things I've done/tried..

. modified linker so it treats the two ram segments as one
. updated the board.h definition file to represent my hardware
. removed the slow clock init as I don't have a 32khz xtal

The code appears to work, but it gets stuck just after it tries to go into high speed mode. If I try to make small changes to the code (such as disabling high speed mode or 4-bit mode or turning off the USB interface) then it hard-faults on the clock init. If I step through the code, however, it gets past it, but I still experience the same problem.

In looking at the HSMCI_SR status register, when most commands are sent on the MCI bus (DMA enabled) and the code recognizes as a sucessfull transfer, the flags [UNDERRUN, OVERRRUN, TXRDY, CMDRDY, NOTBUSY] are set. When it gets "stuck" it just returns the flags [FIFO EMPTY, TXRDY, CMDRDY]. After some seconds, the flags match the sucessfull state but the code does not continue.

The fact that small changes to the code result in a hard fault is annoying. I've also not been able to find any sample code or the examples ported to the 3u1. Any help here would be greatly appreciated. If I can't figure it out, I'm going to try to switch to the 3u4 to see if that solves my problems.

It doesn't help that the example code is unnecessarily complex :/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: