Go to advanced search

by DogEars
Thu Jul 19, 2012 1:21 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Does the BUSY flag work for the Clock Control Registers?
Replies: 3
Views: 1149

Does the BUSY flag work for the Clock Control Registers?

The docs suggest that certain registers shouldn't be messed with if the BUSY flag is set. I've tried disabling the General Purpose clocks, but the busy flag is always set.

See page 107.

Cheers,
Graeme.
by DogEars
Tue Jul 17, 2012 8:31 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: General Purpose Clock Voltage
Replies: 17
Views: 10331

Re: General Purpose Clock Voltage

This is the address and values after configuring the clocks: They seem to be correct? Does this BUSY flag mentioned in the docs actually work, I've tried disabling the clocks and waiting for the BUSY flag to be zero and it doesn't happen, no one seems to be using it in any code examples I've seen. G...
by DogEars
Tue Jul 17, 2012 3:53 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: General Purpose Clock Voltage
Replies: 17
Views: 10331

Re: General Purpose Clock Voltage

We're setting the function explicitly now, but it only seems to actually start intermittently! // SET THE GPCLK0 INP_GPIO(4); SET_GPIO_ALT(4,0); But we're only getting approx. 2.5KHz not what we're aiming for GP_CLK0_DIV = 0x5A000000 | 1<<12 | 0xB36; // divider = 1.700683594 = b1.101100110110 (11.28...
by DogEars
Mon Jul 16, 2012 10:13 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: General Purpose Clock Voltage
Replies: 17
Views: 10331

Re: General Purpose Clock Voltage

What is the value of your 'clk'. The code is from one of you examples. #define BCM2708_PERI_BASE 0x20000000 #define CLOCK_BASE (BCM2708_PERI_BASE + 0x101000) /* Clocks */ clk_map = (unsigned char *)mmap( (caddr_t)clk_mem, MAP_BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, CLOCK_BAS...
by DogEars
Mon Jul 16, 2012 11:06 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: General Purpose Clock Voltage
Replies: 17
Views: 10331

Re: General Purpose Clock Voltage

Without load, and I'm assured we're using the correct probes (it's not actually me that doing the measurement as I'm many miles away from hardware that's running the code!) we get approx 0.1 volts and a very noisy square wave! Does this code look correct, should we be doing something with pull up/do...
by DogEars
Fri Jul 13, 2012 9:54 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: General Purpose Clock Voltage
Replies: 17
Views: 10331

Re: General Purpose Clock Voltage

Gert van Loo wrote:What frequency?
I've got it running at 10Mhz just to test it's coming out on the pin I thought it should be on (P1-07 on the header?)
by DogEars
Fri Jul 13, 2012 9:48 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread. [I2S works]
Replies: 996
Views: 564570

Re: I2S: Anyone got it running?

We've got the I2s interface woring with a Twisted Pair Buffalo DAC, as it doesn't require the master clock (MCLK) input. We're hoping to get it working with a cheaper DAC, hopefully with the Pi supplying the MCLK. The LRCLK translates to the PCM_FS available via one of the tiny resistors not fitted ...
by DogEars
Fri Jul 13, 2012 9:23 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: General Purpose Clock Voltage
Replies: 17
Views: 10331

General Purpose Clock Voltage

I'm experimenting with using the GPCLK0 to supply the master clock to an external DAC, but when checking the voltage on a scope it's very low around 0.2 volts, is this expected?
by DogEars
Tue Jul 03, 2012 6:51 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread. [I2S works]
Replies: 996
Views: 564570

Re: I2S: Anyone got it running?

....what's the input pin for the pi? The PCM/I2S clock pin changes direction if you put the module interface into 'use external clock' mode. Hi Gert, This is the bit clock, wouldn't changing this to slave mode require a clock of, say 1.4112Mhz being supplied not the Master clock of 11.2896Mhz. That...
by DogEars
Thu Jun 28, 2012 1:15 pm
Forum: C/C++
Topic: Cross-Compile from Eclipse
Replies: 0
Views: 1253

Cross-Compile from Eclipse

Here (http://linuxtortures.blogspot.fr/2012/06/cross-compiling-and-cross-debugging-c.html) you can find a post just written by me where you can learn step by step how to cross develop on your Raspberry using eclipse. I hope you enjoy it reading as much as I did writing it :D Best Regards!! I tried ...
by DogEars
Wed Jun 27, 2012 11:43 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread. [I2S works]
Replies: 996
Views: 564570

Re: I2S: Anyone got it running?

I'm trying to get this working correctly with 44.1/16bit stereo. What do I put for FLEN & FSLEN in the MODE_A register? Do I need a Frame Length or 32bits and a Frame Sync Length of 16bits; this is what i've got: *(i2s+2) = 31<<10 | 16; // bits 19:10 FLEN , 9:0 FSLEN 16 What do I use for Channel 1 &...
by DogEars
Tue Jun 26, 2012 10:17 pm
Forum: C/C++
Topic: Recommeded C++ dev environment ?
Replies: 108
Views: 83103

Re: Recommeded C++ dev environment ?

Here (http://linuxtortures.blogspot.fr/2012/06/cross-compiling-and-cross-debugging-c.html) you can find a post just written by me where you can learn step by step how to cross develop on your Raspberry using eclipse. I hope you enjoy it reading as much as I did writing it :D Best Regards!! I tried ...
by DogEars
Fri Jun 22, 2012 9:21 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread. [I2S works]
Replies: 996
Views: 564570

Re: I2S: Anyone got it running?

Or you could solder a wire to one of the PCM/I2S pins going to the 'revision' resistors. This is what I'm hoping to do, we should be able to solder a wire on to one of the pads (the one that's not 3.3V) of R7 (that's missing) that should give us access to GPIO29. Will we still need to remove R9? wi...
by DogEars
Fri Jun 22, 2012 12:56 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread. [I2S works]
Replies: 996
Views: 564570

Re: I2S: Anyone got it running?

DogEars wrote:what the 12 and the 9 represent
That was a typo, I meant 3 and 1.

G.
by DogEars
Fri Jun 22, 2012 12:09 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread. [I2S works]
Replies: 996
Views: 564570

Re: I2S: Anyone got it running?

Now i'm more confused... So was I correct with my calculation.. now how do i bit twiddle the registers to reflect what I want? I guess it's this bit (from your code) but I can't quite figure out what it's doing: printf("Confiure I2S clock\n"); *(clk+0x26) = 0x5A000001; *(clk+0x27) = 0x5A000000 | 3<<...
by DogEars
Thu Jun 21, 2012 10:17 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread. [I2S works]
Replies: 996
Views: 564570

Re: I2S: Anyone got it running?

I don't quite understand how I'd set the PCM_CLK correctly? All this bit twiddling is confusing me :?

standard stereo audio 44.1 KHz @ 16bit would require 1,411,200Hz [is tht right?] any help would be appreciated!

Cheers,
Ears.
by DogEars
Mon Jun 18, 2012 10:06 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread. [I2S works]
Replies: 996
Views: 564570

Re: I2S: Anyone got it running?

Could you just clarify; do we need to remove resistors and solder onto the bare tracks to get to the I2S outputs?

Cheers,
Ears.
by DogEars
Mon Jun 18, 2012 10:23 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread. [I2S works]
Replies: 996
Views: 564570

STICKY: The I2S sound thread. [I2S works]

dariush wrote:Hi Gert,

thank you very much! That was it!
Hi Dariush,

Would it be possible to post your working code?

Cheers,
Ears.
by DogEars
Mon Jun 18, 2012 10:16 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread. [I2S works]
Replies: 996
Views: 564570

STICKY: The I2S sound thread. [I2S works]

dariush wrote:Hi Gert,

thank you very much! That was it!
HI Dariush, would there be any chance you could post your working code?

Cheers,
Ears.

Go to advanced search