Go to advanced search

by piras77
Thu Dec 08, 2016 9:02 am
Forum: Troubleshooting
Topic: DMA Trouble
Replies: 18
Views: 2945

Re: DMA Trouble

Yes, I am.
piras77 wrote:This problem regards DMA transfers on BCM2835 (i.e. Pi Zero) originated in userland on Raspbian (release 2016-09-23) with memory allocated by the ARM core (not Mailbox allocated memory).
by piras77
Thu Dec 08, 2016 8:00 am
Forum: Troubleshooting
Topic: DMA Trouble
Replies: 18
Views: 2945

Re: DMA Trouble

Just a followup: the test case on Raspbian kernel without L2 cache produces the same (inconclusive) results.
by piras77
Wed Dec 07, 2016 9:35 pm
Forum: Troubleshooting
Topic: DMA Trouble
Replies: 18
Views: 2945

Re: DMA Trouble

Hi dom, thank you for pointing me again to the source! The allocation there uses a "per-device area" and I can't figure out at the moment the setup for that. (Which makes me think how they would setup such a "safe" area, are they using special MMU attributes?!) Also, this source does basically a dma...
by piras77
Wed Dec 07, 2016 2:37 pm
Forum: Troubleshooting
Topic: DMA Trouble
Replies: 18
Views: 2945

Re: DMA Trouble

Thank you dom for your reply! I've still a few questions. Maybe you can help me out? The DMA (or any GPU hardware) cannot see the Arm's L1 or L2 caches. Therefore you need to allocate arm memory in a way that is uncached, or you need to explicitly invalidate the arm cache before starting dma. I'm aw...
by piras77
Wed Dec 07, 2016 12:19 pm
Forum: Troubleshooting
Topic: DMA Trouble
Replies: 18
Views: 2945

Re: DMA Trouble

Thanks for the quick reply! :-) Unfortunately, I can't see the hint... It seems you are using VideoCore memory that is allocated thru Mailbox interface. My question regards memory allocated by the ARM core. Or do you imply that only memory allocation thru the Mailbox interface is "proper"? Do you ha...
by piras77
Wed Dec 07, 2016 11:36 am
Forum: Troubleshooting
Topic: DMA Trouble
Replies: 18
Views: 2945

Re: DMA Trouble

So I guess I'm not going to get that hint?!
by piras77
Wed Dec 07, 2016 9:30 am
Forum: Troubleshooting
Topic: My Pi is getting very hot!
Replies: 7
Views: 1141

Re: My Pi is getting very hot!

One of my Pi-2 gained about additional 15°C when I blew (short circuited) two of the GPIO pins. Stll, the Pi-2 appears to be fully functional (besides the two no longer usable pins).
by piras77
Fri Dec 02, 2016 6:51 pm
Forum: Troubleshooting
Topic: DMA Trouble
Replies: 18
Views: 2945

Re: DMA Trouble

Can you give me a hint what you mean with "properly" allocated? Thank you!
by piras77
Fri Dec 02, 2016 6:16 pm
Forum: Troubleshooting
Topic: DMA Trouble
Replies: 18
Views: 2945

DMA Trouble

Hi there, I encountered occasionally some strange problems with DMA transfers. In the end I had to try to isolate the problem (see attached C++ source) which still does not always produce the same results. This problem regards DMA transfers on BCM2835 (i.e. Pi Zero) originated in userland on Raspbia...
by piras77
Sat Nov 19, 2016 11:11 pm
Forum: C/C++
Topic: Way to sync GPIO read with square wave
Replies: 14
Views: 3834

Re: Way to sync GPIO read with square wave

I want the input to receive at the exact same rate that it is sending at. So how should I adjust my receiving rate so that I can get 1111111... with a period of 100us, or 101010... with a period of 50us? You want to record the signal level with a fixed sampling rate. Unfortunately, you cant do this...
by piras77
Sat Nov 19, 2016 6:20 pm
Forum: C/C++
Topic: Way to sync GPIO read with square wave
Replies: 14
Views: 3834

Re: Way to sync GPIO read with square wave

[...] square wave [...] 10 Khz [...] Assumed, you would sample with 100 khz, you would get something like ...11111000001111100000... Right? Assumed, you sample a 10 khz signal with exactly 10 khz, you will get ...1111111... (ones only) or ...0000000... (zeros only). That means, you you get only a r...
by piras77
Wed Nov 09, 2016 12:25 pm
Forum: C/C++
Topic: Strange time gaps on GPIO clock
Replies: 5
Views: 1975

Re: Strange time gaps on GPIO clock

So the question remains: what causes these gaps? Is it some load on the bus (maybe caused by the VC), some (strange) effect of the cache architecture, some housekeeping in the kernel / supervisor, ... ? Just curious. Since it is Linux and no real-time operating system we have to deal with such thing...
by piras77
Mon Nov 07, 2016 7:19 pm
Forum: C/C++
Topic: Strange time gaps on GPIO clock
Replies: 5
Views: 1975

Re: Strange time gaps on GPIO clock

Yeah, old news... ;-)

viewtopic.php?f=63&t=152401&p=999058#p999058

Though, no response there either.
by piras77
Sun Oct 30, 2016 10:38 pm
Forum: Bare metal, Assembly language
Topic: Baremetal document understanding
Replies: 3
Views: 1626

Re: Baremetal document understanding

You may want to take a look at https://github.com/raspberrypi/firmware ... -mailboxes and linked pages.
by piras77
Thu Jun 23, 2016 9:02 am
Forum: General discussion
Topic: Timer Gaps
Replies: 0
Views: 423

Timer Gaps

Hi there, When I read continuously the system timer (register CL0 according to BCM2835 ARM Peripherals: chapter 12 with Raspbian on a RPi 2), I get a few gaps. That is, two consecutive timer values are more than 1 us (sample time) apart. The average time of such a gap is about 10us. I'm aware that R...
by piras77
Mon Jun 13, 2016 9:28 pm
Forum: C/C++
Topic: GPIO glitches
Replies: 11
Views: 2387

Re: GPIO glitches

I don't have any special application in mind. I just wanted to check what the Pi's GPIO is capable of. So, for example, what kind of (software) protocols could you run with a Pi and at what transmission rate... (I know the Pi supports already a few.) The gaps are a detail one could (maybe) deal with...
by piras77
Mon Jun 13, 2016 6:46 pm
Forum: C/C++
Topic: GPIO glitches
Replies: 11
Views: 2387

Re: GPIO glitches

I just read thru the postings again... and I feel I have to do a bit more of explanation... It's about signal sampling. The process is in a busy loop, reading a (GPIO) register value again and again (polling). It can do that 10 million times per second. However, when the process is stuck (for exampl...
by piras77
Mon Jun 13, 2016 6:18 pm
Forum: C/C++
Topic: GPIO glitches
Replies: 11
Views: 2387

Re: GPIO glitches

Hi Joan, Thank you for running and posting your results! I see that you ran the program four times. With quite different results: 5980 108 9 9 118 3 0 0 5909 90 9 9 170 3 0 0 The first and the third run have quite a lot of gaps and a few glitches. The second and fourth do not. Did you use the same s...
by piras77
Mon Jun 13, 2016 3:36 pm
Forum: C/C++
Topic: GPIO glitches
Replies: 11
Views: 2387

Re: GPIO glitches

The program expects on GPIO pins 18,23,24,25 the (one and only) input signal. It needs 4 pins since there is only one event register but 4 events have to be watched. So, if you use one or more of these pins for the internal PWM you have to "rewire" the pins in the program and recompile. Pins pins(18...
by piras77
Mon Jun 13, 2016 3:11 pm
Forum: C/C++
Topic: GPIO glitches
Replies: 11
Views: 2387

Re: GPIO glitches

Nice, you actually tried to run it. :-) There is a short description at the top of the file. Well, short, indeed. The program expects GPIO pins 18,23,24,25 to be short circuit. There must be an _external_ signal that is connected to them. Edit: Well a PWM from the Pi should also work. However, then ...
by piras77
Mon Jun 13, 2016 2:55 pm
Forum: C/C++
Topic: GPIO glitches
Replies: 11
Views: 2387

Re: GPIO glitches

Hi Joan, Thanks for your reply! Please find my comments below: (1) The "test data" is a square wave at about 500 kHz with a duty cycle of about 1:3. Lower frequency at 1:1 from a downstream divider. All clear as per oscilloscope. Do you know of signals that cause problems? (2) I did in a long while ...
by piras77
Mon Jun 13, 2016 12:57 pm
Forum: C/C++
Topic: GPIO glitches
Replies: 11
Views: 2387

GPIO glitches

Hi there, I'm trying to sample a signal by polling a GPIO pin. However, there are gaps when the process (?) is stuck. In order to detect such gaps, I sample the events (GPEDS0) -- instead of the actual level (GPLEV0). So, I register raising (LH) and falling (HL) edges (which requires apparently two ...

Go to advanced search