Go to advanced search

by piras77
Sun Jun 25, 2017 1:07 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Peripherals and Memory Barriers
Replies: 0
Views: 355

Peripherals and Memory Barriers

Hi there, I just encountered an occasional problem when I bit bang an SPI device. I use the ARM counter (@ 7e00:b420) to determine when to raise/lower an output pin. I don't use memory barriers when switching between GPIO and ARM counter. In very rare cases, I can see that for a sequence (set GPIO +...
by piras77
Sat Jun 03, 2017 8:00 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI max practical data throughput
Replies: 3
Views: 943

Re: SPI max practical data throughput

25MHz is about as good as you'll get on the GPIO header.
viewtopic.php?p=605369#p605369
by piras77
Sun Apr 30, 2017 12:20 pm
Forum: General discussion
Topic: Request for a Wiki for the Peripherals
Replies: 8
Views: 1333

Re: Request for a Wiki for the Peripherals

Do you mean: https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/README.md? There is nothing there yet regarding the peripherals (in the sense of the peripheral data sheet). Well, the Wiki would also start from scratch. The big problem I see is using Markdown as language, w...
by piras77
Sun Apr 30, 2017 11:58 am
Forum: General discussion
Topic: Request for a Wiki for the Peripherals
Replies: 8
Views: 1333

Re: Request for a Wiki for the Peripherals

Maybe I don't understand what you mean...

...The original document is PDF. How do you edit?

...An extra (errata) document would be very hard to maintain (and to read).

What do you suggest?
by piras77
Sun Apr 30, 2017 11:50 am
Forum: General discussion
Topic: Request for a Wiki for the Peripherals
Replies: 8
Views: 1333

Re: Request for a Wiki for the Peripherals

Thanks for your comments so far... I agree, a Wiki is prone to unwanted changes. However, there are various measures to counter these and still permit access for everyone who's interested to contribute. The actual challenge is rather to find volunteers to contribute. In case I didn't make it clear, ...
by piras77
Fri Apr 28, 2017 1:40 pm
Forum: General discussion
Topic: Request for a Wiki for the Peripherals
Replies: 8
Views: 1333

Request for a Wiki for the Peripherals

Hi there, I like the Raspberry Pi since it offers the opportunity to access low-level peripherals directly from a vanilla Linux userland process. The BCM2835's peripheral data sheet is a great resource to start with. However, it is not complete, and it contains various flaws. A few years have passed...
by piras77
Fri Apr 28, 2017 9:37 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI Slave (BSC Slave) Errata
Replies: 4
Views: 1926

Re: SPI Slave (BSC Slave) Errata

addendum with scope for Pi-2 ('cause limited number of attachments by forum software)
figure_1_pi2.png
Figure 1 (Pi-2)
figure_1_pi2.png (47.24 KiB) Viewed 1916 times
figure_2_pi2.png
Figure 2 (Pi-2)
figure_2_pi2.png (47.29 KiB) Viewed 1916 times
by piras77
Fri Apr 28, 2017 9:24 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI/BSC SLAVE peripheral problems
Replies: 8
Views: 6356

Re: SPI/BSC SLAVE peripheral problems

Hi Joan, You wrote above I can transfer data from the SPI/BSC slave to a SPI master correctly, but no data comes from the master to the slave. I can transfer data from a SPI master to the SPI/BSC slave incorrectly, but no data comes from the slave to the master. I say incorrectly as if value x is se...
by piras77
Fri Apr 28, 2017 9:14 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI Slave (BSC Slave) Errata
Replies: 4
Views: 1926

SPI Slave (BSC Slave) Errata

Hi there, I was playing around with the SPI Slave and, well, it didn't look that promising in the first place (see https://www.raspberrypi.org/forums/viewtopic.php?t=162790). Still, I'm quite disappointed of the BCM2835 data sheet's quality (pp.160). Here some findings (you have to read the data she...
by piras77
Mon Apr 24, 2017 5:34 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Aux SPI (gpios 16-21)
Replies: 5
Views: 1848

Re: Aux SPI (gpios 16-21)

From userland it is not safe to rely on TX Full to pace writes to the device. Received bytes will be lost as the RX FIFO overflows. It appears to be safe to write to the FIFO when it has less than 3 data units. For people who a curious about this... The tx and the rx fifo can each hold 4 words. Add...
by piras77
Mon Apr 24, 2017 5:18 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Universal SPI Master (SPI1) Errata
Replies: 2
Views: 495

Re: Universal SPI Master (SPI1) Errata

Great! I was only aware of the eLinux page.
by piras77
Mon Apr 24, 2017 4:38 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP3008 (T-DIS)
Replies: 5
Views: 1055

Re: MCP3008 (T-DIS)

Just an update: I exchanged the wiring/breadboard/cirucit/Pi and the "problem" persists in every case. So I use now the external pull-up resistor (to make things "safe").
by piras77
Mon Apr 24, 2017 4:26 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Universal SPI Master (SPI1) Errata
Replies: 2
Views: 495

Universal SPI Master (SPI1) Errata

To whom it may concern... ...I noticed some errors in the peripheral data sheet regarding SPI1 and wanted to state them for people who might not be aware of them. p.25: Status Register: Bit:7 is set if rx-fifo is empty Bit:8 is set if rx-fifo is full Bit:9 is set if tx-fifo is empty Bit:10 is set if...
by piras77
Fri Apr 21, 2017 7:49 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI0 and DLEN in non-DMA mode (errata)
Replies: 4
Views: 1987

SPI0 and DLEN in non-DMA mode (errata)

Hi there, The DLEN description in the datasheet (p.156) says: "This field is only valid for DMA mode (DMAEN set)". However, it appears to me, the value has also an impact to non-DMA transfers. I.e. SPI0.SCLK is suspended (i.e. stays low) in non-DMA mode for the duration of a single clock pulse at th...
by piras77
Wed Apr 19, 2017 6:43 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP3008 (T-DIS)
Replies: 5
Views: 1055

Re: MCP3008 (T-DIS)

When CS rises, Dout will go tristate within 100ns. After that, the voltage on Dout will depend on whatever else is connected to that line - including other SPI chips. So you are being advised that you shouldn't enable another SPI chip until after that period has elapsed. If you don't have another c...
by piras77
Wed Apr 19, 2017 12:01 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP3008 (T-DIS)
Replies: 5
Views: 1055

MCP3008 (T-DIS)

Hi there, This is an ADC related question. And since the MCP3008 appears to be often used, maybe somebody here can help... I can't see from the data sheet how the DOUT pin needs to be configured (wired up). In most applications I see on the Internet it is directly connected to an input pin. However,...
by piras77
Mon Jan 16, 2017 3:05 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: DMA Channel 15
Replies: 3
Views: 1100

Re: DMA Channel 15

What are you trying to tell: That they didn't get it working either? ;-) It's a pity there is so little feedback from the Broadcom people for such a great device. For the moment I simply speculate that channel 15 is hard wired for L2 cache updates. The registers are not even visible (return zero) at...
by piras77
Tue Jan 10, 2017 12:56 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: DMA Channel 15
Replies: 3
Views: 1100

DMA Channel 15

Hi there, according to the BCM2835 peripheral spec, DMA channel # 15 is located at bus address 0x7ee0:5000 (also http://elinux.org/BCM2835_registers#DMA15 says so). However, when I write to the registers, there is no effect. The value of the registers remains always zero. I address the peripherals f...
by piras77
Thu Dec 29, 2016 11:42 am
Forum: Troubleshooting
Topic: GPIO Transistor control always on
Replies: 11
Views: 2559

Re: GPIO Transistor control always on

These values make not much sense. You've got -1.9V at the transistor's base? Against ground level? What is the voltage at the collector and emitter?! Are the ground levels of your RPi and your external power supply connected at all? What do you mean when you say: "supply at the fan is then 9.4V". Do...
by piras77
Fri Dec 23, 2016 1:00 pm
Forum: Troubleshooting
Topic: PWM: Repeat Last Data (FIFO mode)
Replies: 3
Views: 849

Re: PWM: Repeat Last Data (FIFO mode)

Here an update regarding the flags (to whom it may concern): The RPTL1 flag appears to have no effect at all. The RPTL2 flag seems to have only an effect if the FIFO is shared between both channels. If not shared, repetition is always enabled. (I hope I set up and observed that correctly and did not...
by piras77
Wed Dec 21, 2016 9:48 am
Forum: Troubleshooting
Topic: SPI0: different behavior in BCM2835/6 [INVALID]
Replies: 1
Views: 408

Re: SPI0: different behavior in BCM2835/6 [INVALID]

Just an update: the defect in description is invalid. It seems there was a different setup for the two boards: the DLEN register may have held different values. Actually, this shouldn't make a difference since the peripheral document says: DLEN: The number of bytes to transfer. This field is only va...
by piras77
Tue Dec 20, 2016 8:44 pm
Forum: Troubleshooting
Topic: SPI0: different behavior in BCM2835/6 [INVALID]
Replies: 1
Views: 408

SPI0: different behavior in BCM2835/6 [INVALID]

Hi there, The implementation for SPI0 on Pi-0 (Zero) and Pi-2 (2B) appears to be slightly different. They both pull down MOSI when no data to transmit. However, the Pi-2 does also so (in poll-mode) in-between bytes (even though TX FIFO is not empty). The Pi-0 does not. I kind of like the Pi-0 since ...
by piras77
Sat Dec 17, 2016 9:08 pm
Forum: Troubleshooting
Topic: PWM: Repeat Last Data (FIFO mode)
Replies: 3
Views: 849

PWM: Repeat Last Data (FIFO mode)

Hi there, The BCM2835 peripheral documentation says that in PWM FIFO mode the last word is repeated when the FIFO is empty and the RPTL bit is set. However, it appears to me, that the last word is always repeated no matter whether RPTL is set or not. My setup is serialization, no DMA. Can anyone con...
by piras77
Thu Dec 08, 2016 10:31 am
Forum: Troubleshooting
Topic: DMA Trouble
Replies: 18
Views: 2945

Re: DMA Trouble

I'm not sure about this. First of all, your setup is rather different. You use a long chain of control blocks (and possibly buffers) and move a large amount of memory. My test doesn't. Secondly, you don't reuse your control blocks and buffers within microseconds. That's however the intent of this te...
by piras77
Thu Dec 08, 2016 9:30 am
Forum: Troubleshooting
Topic: DMA Trouble
Replies: 18
Views: 2945

Re: DMA Trouble

So you ran some kind of scenario as this one: Test case: A DMA transfer is setup to copy the contents of the system timer (low word) to memory. The number of words to transfer is configurable by the program (NBLKS). One DMA control-block is used for each single word. After the transfer, all the word...

Go to advanced search