Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
GHIElectronics.com
Home
Help
Search
Login
Register
GHI Electronics LLC
>
FAT File System Chipsets and OEM Boards
>
uALFAT
>
uALFAT SPI reduced power mode clarifications
Pages: [
1
]
« previous
next »
Print
Author
Topic: uALFAT SPI reduced power mode clarifications (Read 289 times)
jhwsmith
Newbie
Posts: 5
uALFAT SPI reduced power mode clarifications
«
on:
February 17, 2010, 12:04:40 PM »
Hi All,
I am having a problem with putting a uALFAT-USB in reduced power mode, over SPI. I am sending commands to the uALFAT from a PIC, programmed in C with the MCC18 compiler, using the supplied GHI library functions.
1. ---------------------------
On the uALFAT user manual P. 22 it says that the 'set power mode command' is as follows:
Z<SP>R>xxxx<CR>
Where 'xxxx' is TWO bytes.
However, the uALFAT library function 'GHI_μALFATPowerMode' seems to send FOUR bytes as the 'xxxx'.
------------------------------
2. ---------------------------
Likewise, the uALFAT library function 'GHI_μALFATPowerMode' says that variable 'baud' is the desired baud rate. However, looking at the code it seems that it should actually be the relevent UART divider.
------------------------------
3. ---------------------------
So after reading all the relevent posts on this forum, the furthest I have got is this:
GHI_PutC('Z');
GHI_PutC(' ');
GHI_PutC('R'); // reduced power mode
GHI_PutC('>');
GHI_PutC(0x1f); // trying to do UART 9600 baud divider 1FAB
GHI_PutC(0xab);
GHI_PutC('\r');
And I get back error code !68 (incorrect parameters). This is the only way I can get anything back at all.
I am using a slow SPI Master Clock (Fosc/64) on a 8MHz x 4PLL clock, well below the maximum allowable for reduced mode.
------------------------------
Any clarifications/suggestions would be much appreciated.
Jonathan
Logged
GHI_Support
Administrator
Hero Member
Posts: 1252
Re: uALFAT SPI reduced power mode clarifications
«
Reply #1 on:
February 18, 2010, 09:53:24 AM »
If you look at documentation, all these are sent as ascii charachters. I assume the library do that too.
I think something like this:
GHI_PutC('Z');
GHI_PutC(' ');
GHI_PutC('R'); // reduced power mode
GHI_PutC('>');
GHI_PutC('1');
GHI_PutC('F');
GHI_PutC('A');
GHI_PutC('B');
GHI_PutC('\r');
Logged
jhwsmith
Newbie
Posts: 5
Re: uALFAT SPI reduced power mode clarifications
«
Reply #2 on:
February 23, 2010, 04:40:26 AM »
Thanks for that - I'll get back to you once I have tried that.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
.NET Micro Framework Devices
-----------------------------
=> General Discussion
=> ChipworkX
=> EMX
=> Embedded Master
=> USBizi
-----------------------------
FAT File System Chipsets and OEM Boards
-----------------------------
=> General Discussion
=> uALFAT
=> USBwiz
Loading...