Matt:

Let me reiterate: It's not relying on the USART subsystem in any way.
Unlike on the Msp430, the USART on the ATMega128L does not support SPI
mode.

The ATMega128L does have a dedicated SPI, but that is used for the
radio. That's why the external flash chip is driven in bit-bang mode.
Even the clock line is toggled from software.

Janos

On Wed, Nov 25, 2009 at 5:08 AM, Matthew Bygo <[email protected]> wrote:
> Hey Janos,
> Thanks for having a look.
> I see the bit banging code in HplAt45dbIOP. But where's the _underlying_
> hardware being configured ? the bit banging is providing the SPI protocol.
> But it seems to just "assume" that somehow the underlying uart is set to
> synchronous mode, that the baud rate is OK, that the parity bit setting is
> OK, etc. The Mps430 has a Msp430UartConfigure interface which explicitly
> sets these parameters, but I can't find the equivalent for Atm128...
> Cheers,
> Matt
>
>> Date: Tue, 24 Nov 2009 13:16:32 -0600
>> Subject: Re: [Tinyos-help] USART1 on Atm128 - last try :-(
>> From: [email protected]
>> To: [email protected]
>> CC: [email protected]
>>
>> No, it's actually not wiring against the HplAtm128Uart* files. It's
>> doing bit-banging in tos/platforms/mica2/chips/at45db/HplAt45dbIOP.nc.
>> It's not relying on the USART subsystem in any way, that's why you
>> couldn't find the code that configures the USART.
>>
>> Janos
>>
>> On Tue, Nov 24, 2009 at 5:29 AM, Matthew Bygo <[email protected]>
>> wrote:
>> > Really no takers on the issue below ? is this the wrong mailing list ?
>> > should I be posting this to the dev list ?
>> > Cheers
>> > Matt
>> >
>> > ________________________________
>> > From: [email protected]
>> > To: [email protected]
>> > CC: [email protected]
>> > Subject: RE: [Tinyos-help] USART1 on Atm128
>> > Date: Fri, 13 Nov 2009 11:44:25 +0000
>> >
>> > Paul, and all,
>> >
>> > I'm not having much success with this :-(
>> >
>> > I just can't figure out how the At45db code configures the USART... the
>> > files you pointed to set USART1 to asynch mode, and therefore don't
>> > configure the clock line. But magically the At45db code is able to use
>> > the
>> > USART1 pins in synch mode, with the right clock rate ! where is it
>> > configuring this ?? I'm obviously not looking at this right.... Anyone
>> > help
>> > would be really appreciated here !
>> >
>> > Thanks,
>> > Matt
>> >
>> > ________________________________
>> > From: [email protected]
>> > To: [email protected]
>> > CC: [email protected]
>> > Subject: RE: [Tinyos-help] USART1 on Atm128
>> > Date: Tue, 10 Nov 2009 17:13:27 +0000
>> >
>> > Paul,
>> >
>> > Thankyou for the quick response.
>> > If I'm reading these files right, they configure both USART ports to be
>> > asynchronous... which I find confusing ! HplAt45dbIOP.nc uses the USART
>> > in
>> > synchronous mode, but the underlying HplAtm128UartP.nc sets it up as
>> > asynchronous...
>> > Any ideas what I'm missing ???
>> >
>> > Regards,
>> > Matt
>> >
>> > ________________________________
>> > Date: Tue, 10 Nov 2009 10:49:31 -0600
>> > From: [email protected]
>> > To: mat
>> > [email protected]
>> > CC: [email protected]
>> > Subject: Re: [Tinyos-help] USART1 on Atm128
>> >
>> > Matt,
>> >
>> > Take a look in this directory:
>> >
>> > tinyos-2.1.0/tos/chips/atm128/
>> >
>> > Files:
>> >
>> > HplAtm128Uart.nc
>> > HplAtm128UartP.nc
>> > HplAtm128UartC.nc
>> >
>> > These are the components that control the UART interfaces.  Look for
>> > UART1
>> > in those files. You might also want to look at
>> >
>> > tinyos-2.1.0/tos/platforms/micaz/MotePlatformC.nc
>> >
>> > which defines the pin used for serial input/output(UART0 i believe)
>> >
>> > -Paul
>> >
>> > Matthew Bygo wrote:
>> >
>> > Hi all,
>> >
>> > I want to reuse the USART1 for my own peripheral on a micaz, and I'm
>> > struggling to find the USART hpl in the TinyOS code.
>> >
>> > My understanding is that the USART is used only for the flash chip and I
>> > can
>> > find the SPI bit banging code (HplAt45dbIOP.nc) which operates over the
>> > USART, but I can't find the actual USART config code.
>> >
>> > Presumably this is somewhere in the Atm128 folder... can anyone clarify
>> > ?
>> >
>> > Many thanks,
>> > Matt
>> >
>> > ________________________________
>> > Add other email accounts to Hotmail in 3 easy steps. Find out how.
>> >
>> > ________________________________
>> > _______________________________________________
>> > Tinyos-help mailing list
>> > [email protected]
>> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>> >
>> > ________________________________
>> > Add other email accounts to Hotmail in 3 easy steps. Find out how.
>> > ________________________________
>> > View your other email accounts from your Hotmail inbox. Add them now.
>> > ________________________________
>> > View your other email accounts from your Hotmail inbox. Add them now.
>> > _______________________________________________
>> > Tinyos-help mailing list
>> > [email protected]
>> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>> >
>
> ________________________________
> Have more than one Hotmail account? Link them together to easily access
> both.

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to