at91sam3u1 vs at91sam3u4 problems

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

Posts: 6
Joined: Sat Jul 30, 2011 12:50 pm

at91sam3u1 vs at91sam3u4 problems

Sat Jul 30, 2011 1:07 pm

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 :/

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests