For users of the Atmel AT91SAM7 and AT91SAM9 ARM CPU chips. Atmel has taken a new direction by combining on chip flash and ram with the ARM CPU on a single die. This provides low cost devices for small systems using the ARM CPU.
This group is to exchange information to help users get started and learn how to use the devices.
Reading the DBGU Serial Output - "ICLI, Bekir (EXT)" - Feb 20 3:07:18 2008
Hi all,
I am trying to read the serial output from DBGU, and I have taken the settings from board
demo program.
But somehow, my prints (and the program, as well) stop after 14-15 characters.
Is this problem familiar with anybody?
Mit freundlichem Gruß / Best regards
Bekir ICLI
Siemens AG
Automation and Drives, Automation and Drives, A&D SC IC RD4
Tel. : +49 (721) 595-3280
mailto:b...@siemens.com
http://www.siemens.com/automation
Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer;
Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt, Hermann Requardt,
Siegfried Russwurm, Peter Y. Solmssen
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )
Re: Reading the DBGU Serial Output - John - Feb 20 11:15:22 2008
I have used the DBGU port for Modbus communications at 19,200. The
Modbus implementation used transfers up to 253 byte packets - and does
so all day long without missing a beat.
John
--- In A...@yahoogroups.com, "ICLI, Bekir (EXT)"
wrote:
>
> Hi all,
>=20
> I am trying to read the serial output from DBGU, and I have taken
the settings from board demo program.
> But somehow, my prints (and the program, as well) stop after 14-15
characters.
>=20
> Is this problem familiar with anybody?
>=20
> Mit freundlichem Gru=DF / Best regards
>=20
> Bekir ICLI
>=20
> Siemens AG
> Automation and Drives, Automation and Drives, A&D SC IC RD4
> Tel. : +49 (721) 595-3280
> mailto:bekir.icli.ext@...
> http://www.siemens.com/automation
>=20
> Siemens Aktiengesellschaft: Chairman of the Supervisory Board:
Gerhard Cromme
> Managing Board: Peter Loescher, Chairman, President and Chief
Executive Officer;=20
> Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt,
Hermann Requardt,=20
> Siegfried Russwurm, Peter Y. Solmssen
> Registered offices: Berlin and Munich;=20
> Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB
6684
> WEEE-Reg.-No. DE 23691322
>
=20
=20

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )AW: Re: Reading the DBGU Serial Output - "ICLI, Bekir (EXT)" - Feb 21 4:10:33 2008
Hi John,
The problem I am having seems to be like this:
If I don't turn on the interrupts (where I am enabling PIT and TC interrupts) everything
goes smooth.
But if I do turn on the interrupts, serial output stops at somewhere in the middle.
I am not quite sure where this problem comes from. Is there a special measure to be
taken, while handling the interrupts?
Mit freundlichem Gruß / Best regards
Bekir ICLI
Siemens AG
Automation and Drives, Automation and Drives, A&D SC IC RD4
Tel. : +49 (721) 595-3280
mailto:b...@siemens.com
http://www.siemens.com/automation
Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer;
Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt, Hermann Requardt,
Siegfried Russwurm, Peter Y. Solmssen
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322
________________________________
Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com] Im Auftrag von John
Gesendet: Mittwoch, 20. Februar 2008 17:10
An: A...@yahoogroups.com
Betreff: [AT91SAM] Re: Reading the DBGU Serial Output
I have used the DBGU port for Modbus communications at 19,200. The
Modbus implementation used transfers up to 253 byte packets - and does
so all day long without missing a beat.
John
--- In A...@yahoogroups.com , "ICLI, Bekir (EXT)"
wrote:
>
> Hi all,
>
> I am trying to read the serial output from DBGU, and I have taken
the settings from board demo program.
> But somehow, my prints (and the program, as well) stop after 14-15
characters.
>
> Is this problem familiar with anybody?
>
> Mit freundlichem Gruß / Best regards
>
> Bekir ICLI
>
> Siemens AG
> Automation and Drives, Automation and Drives, A&D SC IC RD4
> Tel. : +49 (721) 595-3280
> mailto:bekir.icli.ext@...
> http://www.siemens.com/automation Siemens
Aktiengesellschaft: Chairman of the Supervisory Board:
Gerhard Cromme
> Managing Board: Peter Loescher, Chairman, President and Chief
Executive Officer;
> Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt,
Hermann Requardt,
> Siegfried Russwurm, Peter Y. Solmssen
> Registered offices: Berlin and Munich;
> Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB
6684
> WEEE-Reg.-No. DE 23691322
>

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )Re: AW: Re: Reading the DBGU Serial Output - Caglar Akyuz - Feb 21 4:16:30 2008
ICLI, Bekir (EXT) wrote:
> Hi John,
>
> The problem I am having seems to be like this:
> If I don't turn on the interrupts (where I am enabling PIT and TC
> interrupts) everything goes smooth.
> But if I do turn on the interrupts, serial output stops at somewhere in
> the middle.
Can it be possible that you are forgetting to acknowledge the end of
interrupt to AIC? It may help if you can post your interrupt handling
routine.
Caglar

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )
AW: AW: Re: Reading the DBGU Serial Output - "ICLI, Bekir (EXT)" - Feb 21 4:27:07 2008
Hi Caglar,
I have tried to be particularly careful about it, but still might have done something
wrong. Here is how it goes:
static void hw_IRQ_TC0_handler( void )
{
static HW_UINT32 time = 0;
if( (++time % 100000 ) == 0 )
{
hw_led_toggle( HW_IO_LED2 );
}
//hw_IRQ_EOI(); If I say end of interrupt here, both LEDs stop after a couple of
blinking.
}
static void hw_IRQ_SYS_handler( void )/* SDRAM, Debug Unit, PIT, RTT, WDT, RSTC, PMC
*/
{
if( AT91C_BASE_WDTC->WDTC_WDSR & AT91C_WDTC_WDUNF )
{
final_idt[HW_ISR_TYPE_WATCHDOG].isr();
}
else if( AT91C_BASE_PITC->PITC_PISR & AT91C_PITC_PITS )
{
volatile unsigned long pivr = 0;
// Read the PIVR. It acknowledges the IT
pivr = AT91C_BASE_PITC->PITC_PIVR;
jiffies += (pivr >> 20);
if( (jiffies % 500) == 0 )
{
hw_led_toggle( HW_IO_LED3 );
}
}
hw_IRQ_EOI();
}
inline void hw_IRQ_EOI( void )
{
AT91C_BASE_AIC->AIC_EOICR = 0;
}
Any help would be much appreciated..
Mit freundlichem Gruß / Best regards
Bekir ICLI
Siemens AG
Automation and Drives, Automation and Drives, A&D SC IC RD4
Tel. : +49 (721) 595-3280
mailto:b...@siemens.com
http://www.siemens.com/automation
Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer;
Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt, Hermann Requardt,
Siegfried Russwurm, Peter Y. Solmssen
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322
________________________________
Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com] Im Auftrag von Caglar Akyuz
Gesendet: Donnerstag, 21. Februar 2008 10:13
An: A...@yahoogroups.com
Betreff: Re: AW: [AT91SAM] Re: Reading the DBGU Serial Output
ICLI, Bekir (EXT) wrote:
> Hi John,
>
> The problem I am having seems to be like this:
> If I don't turn on the interrupts (where I am enabling PIT and TC
> interrupts) everything goes smooth.
> But if I do turn on the interrupts, serial output stops at somewhere in
> the middle.
Can it be possible that you are forgetting to acknowledge the end of
interrupt to AIC? It may help if you can post your interrupt handling
routine.
Caglar

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )Re: AW: AW: Re: Reading the DBGU Serial Output - Caglar Akyuz - Feb 21 5:44:57 2008
ICLI, Bekir (EXT) wrote:
> Hi Caglar,
>
Hi Bekir :)
> I have tried to be particularly careful about it, but still might have
> done something wrong. Here is how it goes:
>
Yes it seems like you were. Have you tried all the code in one function?
My second guess is stack overflow. How much is your interrupt stack?
Maybe defining all with static inline may help??
BTW, what is your GCC version? Because some have problems about frame
pointer. What is your optimization level? -O2 may help. And finally, I'm
sure that your function definitions are correct for interrupt functions
but just in case: They should include __attribute__ ((interrupt("IRQ")))
Caglar
> static void hw_IRQ_TC0_handler( void )
> {
> static HW_UINT32 time = 0;
>
> if( (++time % 100000 ) == 0 )
> {
> hw_led_toggle( HW_IO_LED2 );
> }
> //hw_IRQ_EOI(); If I say end of interrupt here, both LEDs stop after a
> couple of blinking.
> }
> static void hw_IRQ_SYS_handler( void )/* SDRAM, Debug Unit, PIT, RTT,
> WDT, RSTC, PMC */
> {
> if( AT91C_BASE_WDTC->WDTC_WDSR & AT91C_WDTC_WDUNF )
> {
> final_idt[HW_ISR_TYPE_WATCHDOG].isr();
> }
> else if( AT91C_BASE_PITC->PITC_PISR & AT91C_PITC_PITS )
> {
> volatile unsigned long pivr = 0;
> // Read the PIVR. It acknowledges the IT
> pivr = AT91C_BASE_PITC->PITC_PIVR;
>
> jiffies += (pivr >> 20);
>
> if( (jiffies % 500) == 0 )
> {
> hw_led_toggle( HW_IO_LED3 );
> }
> }
> hw_IRQ_EOI();
> }
> inline void hw_IRQ_EOI( void )
> {
> AT91C_BASE_AIC->AIC_EOICR = 0;
> }
> Any help would be much appreciated..
>
> Mit freundlichem Gru� / Best regards
>
> Bekir ICLI
>
> Siemens AG
> Automation and Drives, Automation and Drives, A&D SC IC RD4
> Tel. : +49 (721) 595-3280
> _mailto:b...@siemens.com
_
>
> __ _http://www.siemens.com/automation
> _ Siemens
Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard
> Cromme
> Managing Board: Peter Loescher, Chairman, President and Chief Executive
> Officer;
> Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt,
> Hermann Requardt,
> Siegfried Russwurm, Peter Y. Solmssen
> Registered offices: Berlin and Munich;
> Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
> WEEE-Reg.-No. DE 23691322
>
>
>
> ------------------------------------------------------------------------
> *Von:* A...@yahoogroups.com [mailto:A...@yahoogroups.com] *Im
> Auftrag von *Caglar Akyuz
> *Gesendet:* Donnerstag, 21. Februar 2008 10:13
> *An:* A...@yahoogroups.com
> *Betreff:* Re: AW: [AT91SAM] Re: Reading the DBGU Serial Output
>
> ICLI, Bekir (EXT) wrote:
>> Hi John,
>>
>> The problem I am having seems to be like this:
>> If I don't turn on the interrupts (where I am enabling PIT and TC
>> interrupts) everything goes smooth.
>> But if I do turn on the interrupts, serial output stops at somewhere in
>> the middle.
>
> Can it be possible that you are forgetting to acknowledge the end of
> interrupt to AIC? It may help if you can post your interrupt handling
> routine.
>
> Caglar

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )