USB Audio on L1 TFQ48

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Post Reply
dirk1980
Active Member
Posts: 32
Joined: Fri Oct 07, 2011 3:20 pm

USB Audio on L1 TFQ48

Post by dirk1980 »

Hello,
i'm trying to build the USB Audio to work on a L1 TFQ48.

I change some Pins but now i have the problem that i can't change the main_clock (codec.xc).

USB Reset : X0D53 -> Port32A.4
MLCK_SEL: X052 -> Port32A.3
The Codec and LED stuff is deleted.

When i now try to read and write Port 32A nothing is happen.

tmp = port32A_peek(); // tmp is always 0
port32A_out(portval | tmp); // portval is 16 or 24

But the Pin is not changing.
Can somebody help me?

Dirk


User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am
Contact:

Post by segher »

Try

Code: Select all

port32A_out((tmp & ~24) | portval);
...on the other hand. You say the value returned by peek is always zero,
so either your GPIO from port 32A is not routed to the pin (that happens
if a higher priority port is enabled on that pin), or something external to
the xcore is pulling the signal down.
dirk1980
Active Member
Posts: 32
Joined: Fri Oct 07, 2011 3:20 pm

Post by dirk1980 »

i don't know why the debugger is showing me tmp with 0, it can't be zero.

I have change my code to:
//tmp = port32A_peek(); // tmp is always 0
port32A_out(portval); // portval is 16 or 24

and now it is working. Why? I don't know.

Dirk
Post Reply