Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

SAM7_EMAC on at91sam7x512: hw reset fails

Posted by ursus on January 3, 2012
Hi,

I adapted the SAM7 web server example (FreeRTOS V1.7.0) to my at91sam7x512/DP83848i based board (deRFgateway by Dresden Electronic). (Basically, I only had to adjust the memory size defines)

The example runs so far, but there's a problem during the initialization of the PHY (DP83843i): the while loop which waits for end of hw reset

while( !( AT91C_BASE_RSTC->RSTC_RSR & AT91C_RSTC_NRSTL ) )
{
__asm volatile ( "NOP" );
}

will loop endlessly.

The problem does NOT occur when the SAM-ICE JTAG interface is connected!

Any idea what might be missing within the low level initialization?

Thanks!
Joerg

RE: SAM7_EMAC on at91sam7x512: hw reset fails

Posted by Richard on January 3, 2012
That particular code is taken directly from Atmel, and may have dependencies on Atmels own hardware (the hardware it was written on).

A couple of suggestions:

1) Put in a time out so if the initialisation fails it aborts the attempt, then tries again in a few milliseconds.
2) If it works with the debugger, but not stand alone, then see if the debugger is running a script before it runs the code. You can configure it to run scripts in the debugger settings of the project options.
3) Are you using MII or RMII mode? I know some chips (the ones I had) have an errata that basically says not to use RMII.

Hope that helps.

Regards.

RE: SAM7_EMAC on at91sam7x512: hw reset fails

Posted by ursus on January 4, 2012
thanks for your suggestions!

1) will give it a try
2) double checked the commands in the init script of the debugger, nothing special in there...
3) RMII is the only choice in my case because several "MII pins" are not wired

I'll try to ask for help in the at91 forum,

thanks again!

cheers
Joerg

RE: SAM7_EMAC on at91sam7x512: hw reset fails

Posted by ursus on January 8, 2012
embarrassing, I always switched off the SAM-ICE (removed USB cable) only but left the JTAG port connected to the board when testing "without" JTAG. The SAM-ICE is also connected to the reset pin, so I assume that the pin gets pulled up even when the adapter is powered off...

Everything works fine now, thanks again!

cheers
Joerg


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists