2008-01-16 17:10:22 Using GPIO PF3 as timer to generate 33Khz
Bill Fassler (UNITED STATES)
Message: 49693 I have a Silicon Labs AM/FM radio chip on my custom BF561 powered board. I don't have any software yet to run it, but I am at least trying to peek and poke to see if I can find any hardware problems before we send off for our 2nd generation board run with all the fixes I/we found so far.
Anyway, when I use i2c utilities specifically i2cdetect I find my camera and audio device, but no radio. I probed for power and the chip seems to be there and getting power.
I now suspect that because it isn't getting a clock frequency it isn't being detected. I found a similar thing with the camera, we couldn't even detect its presence until we made sure it was getting the appropriate clock frequency.
The radio clock pin is connected to GPIO PF3. I have never configured a programmable flag to be a timer and am having trouble locating documentation in your wiki that I find helpful. Can someone explain to me what I need to do or point me to some documentation if it exists and I missed it?
Bill
QuoteReplyEditDelete
2008-01-16 17:53:15 Re: Using GPIO PF3 as timer to generate 33Khz
Bill Fassler (UNITED STATES)
Message: 49696 Now that I think about it, I sort of did exactly this in the LCD driver. Even though I don't have a driver for the radio yet, perhaps I can write a ghost driver that basically does nothing but start the clock.
Ugh, the radio is a low priority from my (software) perspective, but identifying hardware issues now is paramount. Can anyone think of any way I can get a clock signal to the device so I can detect and possibly probe the registers without writing any kind of driver code?
Bill
QuoteReplyEditDelete
2008-01-16 20:44:03 Re: Using GPIO PF3 as timer to generate 33Khz
Mike Frysinger (UNITED STATES)
Message: 49699 you're messing disparate topics, so let's sort that first.
PF - a Blackfin Programmable Flag. on parts with ports, a number appended means it refers to a specific pin on a port. so on BF537, PF3 is the 4th Programmable Flag on Port F. the pin can function either as a GPIO or as a peripheral (assuming it is muxed). it cannot function as both simultaneously. on the BF561, since it has no ports, PF3 merely means the 4th Programmable Flag.
GPIO - a General Purpose pin for doing Input/Output. this means you can set a signal high or low, in or out, and that's it. since GPIOs only deal in logical levels, you can really only do square waveforms, and it would require the processor to constantly be toggling the level which means the waveform isnt going to be consistent.
General Purpose Timers - a timer which can output a waveform based on its configuration setup.
with this information you should be able to stop mixing topics in a confusing manner.
if you want to take PF3 and use it as a peripheral (which on the BF561 is General Purpose Timer 3), then you should use the General Purpose Timer API which is documented here:
http://docs.blackfin.uclinux.org/doku.php?id=gptimers
the reason you dont find any information in the GPIO documents about timers/waveforms is because you do not use GPIOs to do such things. you use mux the Programmable Flag so that it functions as a peripheral, not as a GPIO, so the GPIO aspect of the pin no longer applies at all.