DSPRelated.com
Forums

On Blackfin Processor Programming

Started by isni...@gmail.com April 22, 2008
Hi,
I am using BF534 with many peripherals for my apllication... I am designing a board with Bf534 and several perpherals like ADC, DAC, LCD,SDRAM ,Flash memory, Buttons, VGA etc...........
I am controlling each of the peripherals using the processor...... I have built the interface conntrol source code for most of the peripherals......
But now I found that there is manual in Analog devices website called "Device drivers and Sytem sercvices for Blackfin processors"(Initially I found it difficult and so ignored it)...Now, I am not using that kind of programming for my application...... Is it OK??? I am dierctly programming the registers...For example
*pTIMER3_WIDTH 00; //Program timer width register//
*pTIMER3_PERIOD00+7500; ///Program timer period register///

1) Which type of programming would be easier?
2)Which is more faster?
3)Is it OK if I continue in the same manner?
4)Which method is more efficient and ideal and used for controlling different perpherals?
5)How much time would I take more (in general) to learn and start programming based on the above mentioned device driver manual??

Thank you,
--
Kind Regards,
Nithin K S
On Tue, 22 Apr 2008 i...@gmail.com wrote:

> Hi,
> I am using BF534 with many peripherals for my apllication... I am
>designing a board with Bf534 and several perpherals like ADC, DAC,
>LCD,SDRAM ,Flash memory, Buttons, VGA etc...........
> I am controlling each of the peripherals using the processor......
>I have built the interface conntrol source code for most of the
>peripherals......
> But now I found that there is manual in Analog devices website called
>"Device drivers and Sytem sercvices for Blackfin processors"(Initially I
>found it difficult and so ignored it)...Now, I am not using that kind of
>programming for my application...... Is it OK??? I am dierctly
>programming the registers...For example
> *pTIMER3_WIDTH 00; //Program timer width register//
> *pTIMER3_PERIOD00+7500; ///Program timer period register///
>
> 1) Which type of programming would be easier?

It's usually easier to cut and paste with calls.

2)Which is more faster?

Faster to program or faster to run? It is faster to cut and paste,
but your own code will run faster than that.

> 3)Is it OK if I continue in the same manner?

YES!! You will become an expert on all the control registers in a
big hurry. This will help you a lot over the long run.

> 4)Which method is more efficient and ideal and used for controlling
>different perpherals?

It depends on your attitude. "Ideal" depends on point of view. If you
want perfect control and fastest processor response, then taking control
of the registers directly in your own code is ideal. If time to market is
more important and you don't care what customers think, then cutting and
pasting is ideal.

> 5)How much time would I take more (in general) to learn and start
>programming based on the above mentioned device driver manual??

If you fully understand how each periferal works first, then it won't take
that long to understand the driver level concepts. It might actually be a
little frustrating because you'll know what bits to flip but you won't
know which commands to send to flip them!

Patience, persistence, truth,
Dr. mike