From romain.farkas at epfl.ch Thu Oct 18 07:49:24 2007 From: romain.farkas at epfl.ch (Romain Farkas) Date: Thu, 18 Oct 2007 15:49:24 +0200 Subject: [dev65] Siemens TC65 Platform and SPI Message-ID: <87a7df4f0710180649t270fb0a5n77355575393a3819@mail.gmail.com> Hello, I'm looking for a code snippet using the AT^SSPI command to configure a device on the SPI bus. We're trying to implement a SD card reader on the Siemens Wireless platform. Many thanks, Romain Farkas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://castrov.dyndns.org/pipermail/dev65/attachments/20071018/478c1e29/attachment.htm From mmazure2 at wp.pl Thu Oct 18 13:17:23 2007 From: mmazure2 at wp.pl (Marcin Mazurek) Date: Thu, 18 Oct 2007 21:17:23 +0200 Subject: [dev65] Siemens TC65 Platform and SPI In-Reply-To: References: Message-ID: <4717B143.30708@wp.pl> Well, here is some code snippets which I use to communicate from TC65 to ATMega with SPI: Open SPI channel: AT^SSPI=1010,0000,0000,0000,0000 this is SPI channel in mode 0 on 250 kbps. Now You have to open input and output stream: OutputStream atOs = atCmd.getDataOutputStream(); InputStream atIs = atCmd.getDataInputStream(); After that, You have open SPI channel with streams to which You can write and read from. That should be enaugh to communicate with any SPI device, but with SD card is one problem. When you want to initialize SD card, you have to change the state of CS line, and when You open SPI channel, You cannot controll CS line. Thats what I know. I hope this will help You. And I hope You'll chare your experience with TC65 and SD card. Let me know, if You'll have any problem. Best regards Marcin Mazurek dev65-request at castrov.cuug.ab.ca pisze: > Send dev65 mailing list submissions to > dev65 at castrov.cuug.ab.ca > > To subscribe or unsubscribe via the World Wide Web, visit > http://castrov.dyndns.org/cgi-bin/mailman/listinfo/dev65 > or, via email, send a message with subject or body 'help' to > dev65-request at castrov.cuug.ab.ca > > You can reach the person managing the list at > dev65-owner at castrov.cuug.ab.ca > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of dev65 digest..." > > > Today's Topics: > > 1. Siemens TC65 Platform and SPI (Romain Farkas) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 18 Oct 2007 15:49:24 +0200 > From: "Romain Farkas" > Subject: [dev65] Siemens TC65 Platform and SPI > To: dev65 at castrov.cuug.ab.ca > Message-ID: > <87a7df4f0710180649t270fb0a5n77355575393a3819 at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > I'm looking for a code snippet using the AT^SSPI command to configure a > device on the SPI bus. We're trying to implement a SD card reader on the > Siemens Wireless platform. > > Many thanks, > > Romain Farkas > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://castrov.dyndns.org/pipermail/dev65/attachments/20071018/478c1e29/attachment-0001.htm > > ------------------------------ > > _______________________________________________ > dev65 mailing list > dev65 at castrov.cuug.ab.ca > http://castrov.dyndns.org/cgi-bin/mailman/listinfo/dev65 > > > End of dev65 Digest, Vol 4, Issue 1 > *********************************** > > > From romain.farkas at epfl.ch Tue Oct 23 02:36:31 2007 From: romain.farkas at epfl.ch (Romain Farkas) Date: Tue, 23 Oct 2007 10:36:31 +0200 Subject: [dev65] Siemens TC65 Platform and SPI In-Reply-To: <4717B143.30708@wp.pl> References: <4717B143.30708@wp.pl> Message-ID: <87a7df4f0710230136j452d63c6v4ab7001d3076e67b@mail.gmail.com> Well for now I have been able to start the SD card from the module (AT commands). // open SPI channel AT^SSPI=1010,0000,0000,0000,0000 // in data mode: initialize SD card It seems to be possible to start the card (i'm getting on stuff on the data out of the SD card), but I'm not sure I can proceed further. How should I change (possibly) the state of that CS card (if I could !) ? Thanks Romain 2007/10/18, Marcin Mazurek : > > Well, here is some code snippets which I use to communicate from TC65 to > ATMega with SPI: > > Open SPI channel: > AT^SSPI=1010,0000,0000,0000,0000 > > this is SPI channel in mode 0 on 250 kbps. > > Now You have to open input and output stream: > > OutputStream atOs = atCmd.getDataOutputStream(); > InputStream atIs = atCmd.getDataInputStream(); > > After that, You have open SPI channel with streams to which You can > write and read from. > That should be enaugh to communicate with any SPI device, but with SD > card is one problem. > When you want to initialize SD card, you have to change the state of CS > line, and when You open SPI channel, You cannot controll CS line. > Thats what I know. I hope this will help You. > And I hope You'll chare your experience with TC65 and SD card. Let me > know, if You'll have any problem. > > Best regards > Marcin Mazurek > > dev65-request at castrov.cuug.ab.ca pisze: > > Send dev65 mailing list submissions to > > dev65 at castrov.cuug.ab.ca > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://castrov.dyndns.org/cgi-bin/mailman/listinfo/dev65 > > or, via email, send a message with subject or body 'help' to > > dev65-request at castrov.cuug.ab.ca > > > > You can reach the person managing the list at > > dev65-owner at castrov.cuug.ab.ca > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of dev65 digest..." > > > > > > Today's Topics: > > > > 1. Siemens TC65 Platform and SPI (Romain Farkas) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 18 Oct 2007 15:49:24 +0200 > > From: "Romain Farkas" > > Subject: [dev65] Siemens TC65 Platform and SPI > > To: dev65 at castrov.cuug.ab.ca > > Message-ID: > > <87a7df4f0710180649t270fb0a5n77355575393a3819 at mail.gmail.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Hello, > > > > I'm looking for a code snippet using the AT^SSPI command to configure a > > device on the SPI bus. We're trying to implement a SD card reader on the > > Siemens Wireless platform. > > > > Many thanks, > > > > Romain Farkas > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > http://castrov.dyndns.org/pipermail/dev65/attachments/20071018/478c1e29/attachment-0001.htm > > > > ------------------------------ > > > > _______________________________________________ > > dev65 mailing list > > dev65 at castrov.cuug.ab.ca > > http://castrov.dyndns.org/cgi-bin/mailman/listinfo/dev65 > > > > > > End of dev65 Digest, Vol 4, Issue 1 > > *********************************** > > > > > > > > > _______________________________________________ > dev65 mailing list > dev65 at castrov.cuug.ab.ca > http://castrov.dyndns.org/cgi-bin/mailman/listinfo/dev65 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://castrov.dyndns.org/pipermail/dev65/attachments/20071023/451341ad/attachment.htm