vagrantc has joined #beagle
vagrantc has quit [Ping timeout: 240 seconds]
buzzmarshall has quit [Quit: Konversation terminated!]
Shadyman has joined #beagle
rob_w has joined #beagle
CaliBunda has joined #beagle
CaliBunda has quit [Remote host closed the connection]
set_ has quit [Ping timeout: 240 seconds]
CaliBunda has joined #beagle
florian_kc is now known as florian
Shadyman has quit [Quit: Leaving.]
ft has quit [Quit: leaving]
Siegurd has joined #beagle
buzzmarshall has joined #beagle
rob_w has quit [Remote host closed the connection]
brook has quit [Remote host closed the connection]
xet7 has quit [Remote host closed the connection]
<dinuxbg> Siegurd: You need a host-side Linux kernel driver to allocate physically contiguous memory. Alternatively, you may reserve memory in DTS, and mmap it from /dev/mem from your userspace application.
brook has joined #beagle
<dinuxbg> Siegurd: I have not tested it, but the following thread offers a viable solution: https://forum.beagleboard.org/t/pru-c-shared-mem/35095/13
indigaz has quit [Ping timeout: 264 seconds]
zjason` is now known as zjason
indigaz has joined #beagle
Stat_headcrabed has joined #beagle
florian has quit [Quit: Ex-Chat]
Stat_headcrabed has quit [Quit: Stat_headcrabed]
<zmatt> or use uio instead of rproc
<zmatt> (if you do through any route that involves manually reserving memory in DT, I would recommend creating an uio_pdrv_genirq device for that chunk of memory so that userspace can mmap it without having to use /dev/mem)
<zmatt> Siegurd: my py-uio project ( https://github.com/mvduin/py-uio ) includes an example that uses shared memory to stream messages from pru to python. that particular example has both an assembly version (stream.py + fw/stream.pasm) and a C++ version (stream-c.py + fw-c/stream.cc)
<zmatt> (most examples are in assembly)
<zmatt> if you want to stream adc samples to linux userspace it probably makes more sense to just use a ringbuffer of samples instead of sending large messages, but it depends on the exact use-case I guess
<zmatt> (note that the py-uio stream examples use a ringbuffer to stream messages, which works the same except it reads one message at a time while with streaming examples you'll want to read in larger chunks for efficiency
<zmatt> )
<zmatt> are you just using PRU to stream ADC data to userspace as an initial test, with the plan being to later actually use PRU to process the ADC data itself?
<Siegurd> Yes, I want to make PID regulator that reads ADC channel and controls PWM channel
<Siegurd> But first I want to understand what's ADC values de-facto are
<Siegurd> the frequency of PWM should be constant = 800 Hz, and the duty-cycle should be regulated by PID
<Siegurd> Of course I can do it in STM32-Arduino within 2 hours with PID auto tuning and so on, but I want go the harder way
vagrantc has joined #beagle
<zmatt> if your PWM is that slow, why do you need the ADC configured at its highest sample rate possible?
<zmatt> like, I can understand sampling at a higher rate than you need so that you can implement filtering to reduce the noise (in a way better than the averaging the ADC can do for you), but still
<zmatt> having the adc sampling 250 times faster than the output rate you need seems... generous
<Siegurd> Yes, I unerstand. But I wanted to confirure ADC in a proper way and know its maximum F. For some others projects in the future.
ft has joined #beagle
darkapex has quit [Ping timeout: 258 seconds]
darkapex has joined #beagle
Siegurd has quit [Read error: Connection reset by peer]
brook_ has joined #beagle
brook has quit [Ping timeout: 260 seconds]
behanw has joined #beagle
<zmatt> ok, just make sure to configure an appropriate sampling time (see the comments in adc.dtsi) if the thing you're measuring has a source impedance higher than 5.5 kOhm
<zmatt> (for lower source impedance it should be okay to use minimum sampling time)
brook_ has quit [Remote host closed the connection]
brook has joined #beagle
brook has quit [Ping timeout: 260 seconds]
ikarso has quit [Quit: Connection closed for inactivity]
brook has joined #beagle
brook has quit [Ping timeout: 240 seconds]