Hi
I had exactly the same problems when I tried to get the SPI working. In the end I didnt spend too long looking at it because it became apparent that the etrax couldnt do the speed I needed anyway (even with its turbo mode which is only for testing anyway). I had to have a PIC24 on the board anyway for other critical real time functions so I used it as a parallel to SPI bridge as well. With all the parallel to SPI stuff running in an assembly coded fast interrupt the overhead on the PIC was no problem. Tristan _____ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Teddy Sent: 14 February 2008 14:58 To: [email protected] Subject: Re: [foxboard] Re: Foxboard SDK, sync_serial driver Hello again :) > If you look at the etrax developer datasheet it seems that the clock keeps > running even when there is no data to be sent. Have a look at this tread > too: > HYPERLINK "http://mhonarc.axis.se/dev-etrax/msg07275.html"http://mhonarc.-axis.se/dev- -etrax/msg07275.-html I´m right now playing with the SYNC_OFF and CLOCK_GATED. If the clock is gated and the sync off, the clock doesn´t run anymore. However, the clock that is then sent with the data is completely wrong. I was thinking that the sync off would only disable the frame synchronisation, which is not the case: the frame pin still changes its status and the clock does nonsense :s The documentation of the Etrax is really not exhaustive :( > In the end I designed my own SPI master chip which connected to the etrax by > parallel bus. I needed this because I wanted a data rate of 25MHz and the > max the etrax can do is 4MHz. oh nice :) What kind of chip did you use for generating the SPI signal? > You also need to have a look at the etrax design ref page 560 (Table 19-3). > This explains that the Syn Serial Port 3 should be in groups c and f. > because Port 3 uses U16 and so does SCSI-8 p1. Ah, I was wondering what were these groups in the driver code :D Thanks for the tip, I didn´t see that part at the end of the datasheet. Really helpful info, thanks Teddy > ____________-_________-_________-__ > > > From: HYPERLINK "mailto:foxboard%40yahoogroups.com"[EMAIL PROTECTED] [mailto:HYPERLINK "mailto:foxboard%40yahoogroups.com"[EMAIL PROTECTED] On Behalf > Of Teddy > Sent: 14 February 2008 13:27 > To: HYPERLINK "mailto:foxboard%40yahoogroups.com"[EMAIL PROTECTED] > Subject: [foxboard] Re: Foxboard SDK, sync_serial driver > > > > > > > > Hello again, > > I went a bit further into my investigation. Here are the results: > > > The problem I´m facing is with the sync_serial driver (SPI driver). I > > wanted to try it out, but I have the following message when starting > > linux: > > ETRAX100LX sync_serial: Could not allocate IO group for port 1 > > > > I included the driver, configured for the sync serial port 1 (sser3). > > The only configured serial port is the port 0 (for the debug console). > > > > I´m going further in checking why there is a conflict (currently in > > io_interface_-mux.c). To debug, it would be much easier for me to have > > the sync_serial driver as module. Did somebody create it? > > (see HYPERLINK "http://mhonarc.axis.se/dev-etrax/msg08321.html,"http://mhonarc.-axis.se/dev --etrax/msg08321.-html, the driver has to > > be modified to be able to be used as a module; if somebody did it, I > > wouldn´t lose too much time...) > > io_interface_-mux.c is responsible for the registration of the device > drivers and allows (or not) the multiplexing of the interfaces. For > this purpose, devices groups are created: > static struct interface interfaces[] = { > /* Begin Non-multiplexed interfaces */ > { > .ioif = if_serial_0, > .groups = 0, > .gpio_g_in = 0, > .gpio_g_out = 0, > .gpio_b = 0 > }, > /* End Non-multiplexed interfaces */ > { > .ioif = if_serial_1, > .groups = group_e, > .gpio_g_in = 0x00000000, > .gpio_g_out = 0x00000000, > .gpio_b = 0x00 > }, > { > .ioif = if_serial_2, > .groups = group_b, > .gpio_g_in = 0x000000c0, > .gpio_g_out = 0x000000c0, > .gpio_b = 0x00 > }, > { > .ioif = if_serial_3, > .groups = group_c, > .gpio_g_in = 0xc0000000, > .gpio_g_out = 0xc0000000, > .gpio_b = 0x00 > }, > ... > for example. > As I was trying to use sync serial 3, its definition is: > { > .ioif = if_sync_serial_-3, > .groups = group_c | group_f, > .gpio_g_in = 0xc0000000, > .gpio_g_out = 0xc0000000, > .gpio_b = 0x80 > }, > but sync serial 3 as nothing to do with the group f (syncser1, i2c > ,usb1, scsi...) and has only to be defined in group c (common pins > with serial 3, scsi8_0 and ata), therefore it´s new definition is: > { > .ioif = if_sync_serial_-3, > .groups = group_c, > .gpio_g_in = 0xc0000000, > .gpio_g_out = 0xc0000000, > .gpio_b = 0x80 > }, > And then I can use this syncser3 :) > > Now I´m trying to have the real SPI behaviour on the syncser3 (MISO, > MOSI and CLK which clocks only when data is on the bus). I still > didn´t find any solution to stop the clock when no data is sent. Do > you have any advice? > > Thanks > Teddy > > > > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.20.4/1277 - Release Date: 13/02/2008 > 20:00 > > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.20.4/1277 - Release Date: 13/02/2008 > 20:00 > No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.4/1277 - Release Date: 13/02/2008 20:00 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.4/1277 - Release Date: 13/02/2008 20:00
