Hi, all,

what I want to do is the following:

There is a LinearTechnology/AD LTC2500-32 ADC that can deliver up to
1Meg 32-Bit results per second on its slave SPI-Interface. Baud rate
can be 100MBit/sec. I could live with somewhat less, but would like to 
max it out as far as possible.

I want to read the data via SPI0. Collecting them by DMA might be possible,
but I see problems allocating large enough fixed buffers and much ado 
with physical/virtual adresses.

So I decided to use the PRU0 to do the fast work. In the 12 KB shared ram, 
there
will be 2  1KWord ping-pong-Buffers and a few words for 
command/status/handshake.
The PRU can simply do busy waiting; it has nothing else to do. No 
interrupts etc
needed.

The ARM CPU fetches 1Kword worth of data when a buffer gets full and moves 
it to virtual address land, where there is a lot of space & network access.

I can mmap() the shared buffer, the PRU data rams and the PRU instruction
rams and change / test them. (I cannot yet load the PRU program & start it,
but that is not the problem now.)

The problem is that I get bus errors when I access anything of the SPI 
interface.  There was some "Robotics" driver pre-installed that claimed all 
SPI
for itself, which I consider kinda unfriendly.

Blacklisting removed it, but it did not remove the bus errors.
What is the minimum I have to do to get access to the SPI registers?

I get no complaints when I mmap() the SPI0, but I get killed when I actually
access it.  Using devmem2 does the same.

------------------------------
root@beaglebone:/home/gerhard# devmem2 0x48030000
Bus error

All existing SPI examples end with "now look at the slot entries...." but 
kernel overlays are gone and going through the file system is MUCH too slow.

I could live with a userland wart, I need nothing with interrupts or a nice 
& tidy device driver.
At least for now.

-------------------------
root@beaglebone:/home/gerhard# inxi -v7
System:    Host: beaglebone 
Kernel:  4.9.82-ti-r102 armv7l (32 bit gcc: 6.3.0) 
Console: tty 0
Distro: Debian GNU/Linux 9 (stretch) .....

------------------------- 
root@beaglebone:/home/gerhard# lsmod
Module                  Size  Used by
pruss_soc_bus           4788  0
evdev                  13811  1
uio_pdrv_genirq         4205  0
uio                    11036  1 uio_pdrv_genirq
8021q                  24278  0
garp                    7357  1 8021q
mrp                     9301  1 8021q
stp                     2686  1 garp
llc                     6287  2 garp,stp
usb_f_mass_storage     51462  2
usb_f_acm               8610  2
u_serial               13482  3 usb_f_acm
usb_f_ecm              11619  2
usb_f_rndis            26944  2
u_ether                13962  2 usb_f_ecm,usb_f_rndis
libcomposite           55456  16 
usb_f_ecm,usb_f_acm,usb_f_mass_storage,usb_f_rndis
iptable_nat             2512  0
nf_conntrack_ipv4      12035  1
nf_defrag_ipv4          2016  1 nf_conntrack_ipv4
nf_nat_ipv4             6857  1 iptable_nat
nf_nat                 18928  1 nf_nat_ipv4
nf_conntrack          117486  3 nf_conntrack_ipv4,nf_nat_ipv4,nf_nat
iptable_mangle          2303  0
iptable_filter          2453  0
pru_rproc              14966  0
pruss_intc              9092  1 pru_rproc
pruss                  10889  1 pru_rproc
tieqep                  9111  0
ip_tables              14529  3 iptable_mangle,iptable_filter,iptable_nat
x_tables               22165  3 iptable_mangle,ip_tables,iptable_filter

So, to repeat my question:

What is the minimum I have to do to get access to the SPI registers?

thanks and best regards,

Gerhard


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/fed54861-d6f9-45dd-b2f1-7b9de005ab10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to