Hi,
I’m working on a sine - triangle modulator, is running on BeagleBone black / PRU 1.
On Linux/Arm I calculate the pattern for one period in form of a data structure
pattern to output and time to the next event.
Output is PRU 1 __R30 bit 0, 1, 2, 3 ( 4 only for debug reasons, oscilloscope trigger )
It works … but I’m not surprised about the speed.
The output loop of the PRU is written in some lines of ASM.
Frequencies: triangle should be 400kHz, better 800kHz,
sine wave is between 20kHz and 100kHz
Beaglebone has to drive a high speed GaN H-Bridge.
The datatransport and handshake between Linux and PRU works fine.
A C-Program on PRU is watching for new data. Then the new data ( pattern-time structure )
are copied into local ram, to get the best speed ( lowest latency ).
If the data are stored in local ram, the assembler program is called, to output the given pattern. First the arguments are saved in registers,
then the output starts in a loop.
Pick up pattern from local RAM, and output,
feed delay loop from local RAM,
delay loop,
update index register,
check for possible new data,
if not, back to the top, output next period.
What I said … it works. But with cycle time of 5nsec ( 1/200MHz ) and 1 cycle for most of the (ASM) instructions, I can’t see the speed.
So there is something wrong in my setup or code.
If somebody would like to help debugging, let me know.
Sources with Makefile etc are available.
All based on latest Debian image, all udates are installed, HDMI is off.
So, let me know, think it makes only sense to upload that stuff in case there is really
somebody able to help on that.
Thanks in advance
Kasimir