8devices Community https://www.8devices.com/community/ |
|
Carambola + slow SPI https://www.8devices.com/community/viewtopic.php?f=1&t=79 |
Page 1 of 1 |
Author: | jedas [ 06 Apr 2012, 05:50 ] |
Post subject: | Carambola + slow SPI |
Hi, I would like to read data from slave SPI device, which is based on slow microcontroller, with maximum 250 kHz clock. I've managed to configure SPI interface at ~5 MHz clock or so, but spidev driver refuses to configure at low speed. As far as I've dig into driver, it checks for limit F_CPU / 128, which would be 320 MHz / 128 = 2.5 MHz. Is it possible to configure some kind of hardware pre-scaler for that, or maybe I should use some kind of bit banging SPI driver for such application? j |
Author: | Saulius [ 07 Apr 2012, 08:53 ] |
Post subject: | Re: Carambola + slow SPI |
I have not tried it yet, but if you tell more details (working code / register dump if you are using mmio to test it manual way) it would be clearer. |
Author: | jedas [ 10 Apr 2012, 05:44 ] |
Post subject: | Re: Carambola + slow SPI |
Actually I'm using spidev_test utility from kernel source. My question would be if it's possible to configure SPI device below 2.5 MHz clock. I've found similar device datasheet: http://www.tracermcc.ru/foto/bender/RT3 ... 8_0902.pdf SPICFG register, SPICLK bits, recifies SPI clock divide control, which minimum value is: rate / 128. So given the fact that system clock is 320 MHz, it isn't possible to achieve less than 2.5 MHz ? |
Author: | gedass [ 10 Apr 2012, 11:02 ] |
Post subject: | Re: Carambola + slow SPI |
try to use software SPI for slow modes |
Author: | Gerd [ 04 May 2012, 09:01 ] |
Post subject: | Re: Carambola + slow SPI |
System clock is 1/3 of the CPU CLK 320Mhz / 3 /128 = 833 kHz is the lowest speed on the hardware SPI |
Author: | jedas [ 04 May 2012, 10:32 ] |
Post subject: | Re: Carambola + slow SPI |
Author: | Gerd [ 04 May 2012, 13:14 ] |
Post subject: | Re: Carambola + slow SPI |
thx jedas for this useful hint |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |