SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
The World Leader in High Performance Signal Processing Solutions




Blackfin System Services
         Presented By:
         David Lannigan
About this Module


    This module discusses the System Services software
    available for the Blackfin family of processors.

    It is recommended that users should have some
    understanding of the Blackfin architecture, a basic
    knowledge of software terminology and experience in
    embedded systems.




2
Module Outline

    Overview
     What are system services?
     Benefits of using system services
    Highlight functionality of each service
     Dynamic Power Management
     External Bus Interface Unit (EBIU)
     Interrupt Manager
     Deferred Callback Service
     DMA Manager
     Flag Control
     Timer Control
     Port Control
    Simple examples using the services

3
What are System Services?

    Software library
     Provides functionality common to embedded systems
      Simple, efficient access into
       PLL, DMA, interrupt controllers, timers, flags etc.
      Improved interrupt performance
       Deferred callbacks
     Callable from ‘C’ or assembly
    Common APIs across Blackfin processors
     ADSP-BF531, BF532, BF533, BF534, BF536, BF537
     ADSP-BF561
    Leveraged by applications, device drivers etc.
     Standalone environment
     VDK environment

4
Benefits To Using System Services

    Faster time to market
     Tested and proven software
     Shorter learning curve
     Less re-invention
    Modular software
     Better compatibility
     Simplifies integration efforts
    Portability
     APIs identical across Blackfin processors
      Both single-core and multi-core processors
     Leverage processor roadmap
      Transition quickly to new processors
    Access to device driver portfolio
     ADI device drivers built on top of system services
    Full source code provided


5
System Architecture

                Application



               RTOS (optional)


                 Device            Device
                 Driver            Driver



                          Device
                          Driver




              System Services

6
System Services

                   EBIU (SDRAM)


                   Dynamic Power


                  Interrupt Manager

        DMA Manager             Deferred Callback


         Flag Control             Timer Control


                        Port Control


7
Dynamic Power Management Service

    Controls Phase-Locked Loop (PLL) and internal voltage
    regulator
    Single function call to
     Change operating modes
      Full-on, active, sleep, deep sleep and hibernate
     Change core and system clock frequencies (CCLK and SCLK)
      Clock frequency priority
      Voltage level automatically adjusted accordingly EBIU (SDRAM)

       Lowered whenever possible to maximize power savings
                                                                   Dynamic Power
       Raised when performance requires
     Maximize CCLK and SCLK for given voltage level Interrupt Manager
      Voltage level priority
      Clocks raised to max safe frequency       DMA Manager    Deferred Callback


    Automatically controls EBIU service                   Flag Control         Timer Control


                                                                     Port Control

8
External Bus Interface Unit (EBIU)

    Initializes SDRAM settings
     Configures SDRAM controller
    Logic to calculate new values
     Changing SCLK frequencies
    Works in concert with Power Management Service
     Automatically adjusts settings for SCLK frequency changes
                                                           EBIU (SDRAM)


                                                          Dynamic Power


                                                         Interrupt Manager


                                                 DMA Manager        Deferred Callback


                                                 Flag Control         Timer Control


                                                            Port Control

9
Using EBIU and Power Management

     Application should
      Initialize the EBIU service
      Initialize the Power Management service
      Call Power Management functions as needed
       Such as
        adi_pwr_SetFreq();
                                                    EBIU (SDRAM)
        adi_pwr_MaxFreqForVolt();
        adi_pwr_SetPowerMode();                    Dynamic Power


                                                  Interrupt Manager


                                          DMA Manager        Deferred Callback


                                          Flag Control         Timer Control


                                                     Port Control

10
Dynamic Power Management API

Initialization/Termination
ADI_PWR_RESULT adi_pwr_Init();                    // Initializes the power service
ADI_PWR_RESULT adi_pwr_Terminate();               // Terminates the power service

Frequency and Voltage Control
ADI_PWR_RESULT adi_pwr_Control();                 // Sets/queries a configuration parameter
ADI_PWR_RESULT adi_pwr_SaveConfig();              // Saves the power configuration
ADI_PWR_RESULT adi_pwr_LoadConfig();              // Loads a power configuration

ADI_PWR_RESULT   adi_pwr_SetVoltageRegulator();   //   Adjusts the internal voltage regulator
ADI_PWR_RESULT   adi_pwr_SetMaxFreqforVolt();     //   Set the max clock freqs for voltage level
ADI_PWR_RESULT   adi_pwr_SetFreq();               //   Sets the core and system clock frequencies
ADI_PWR_RESULT   adi_pwr_AdjustFreq();            //   Adjusts the core and system clock frequencies
ADI_PWR_RESULT   adi_pwr_GetFreq();               //   Gets the core and system clock frequencies


Operating Modes
ADI_PWR_RESULT adi_pwr_SetPowerMode();            // Place processor in specified operating mode
ADI_PWR_RESULT adi_pwr_GetPowerMode();            // Gets the current operating mode




11
EBIU Service API

Initialization/Termination
ADI_EBIU_RESULT adi_ebiu_Init();          // Initializes the EBIU service
ADI_EBIU_RESULT adi_ebiu_Terminate();     // Terminates the EBIU service

EBIU Control
ADI_EBIU_RESULT adi_ebiu_Reset();         // Resets the EBIU module to power-up settings
ADI_EBIU_RESULT adi_ebiu_Control();       // Sets/queries module settings
ADI_EBIU_RESULT adi_ebiu_AdjustSDRAM();   // Recalculates and apply settings for SCLK changes


EBIU Configuration
ADI_EBIU_RESULT adi_ebiu_LoadConfig();    // Loads a set of controller settings
ADI_EBIU_RESULT adi_ebiu_SaveConfig()     // Saves a set of controller settings




12
Dynamic Power Example

                                                            Phase Locked
                                                             Loop (PLL)

     Change frequencies,
                           Dynamic Power
      voltage, operating
                              Service
            mode

                                                              Voltage
                                                             Regulator




                               EBIU
                                                              SDRAM
                              Service
                                           Adjust timings




13
Interrupt Manager Service

     Core Event Controller (CEC)
      Hook/Unhook interrupt handlers into Interrupt Vector Groups (IVG)
      Supports handler chaining
     System Interrupt Controller (SIC)
      Mapping of peripheral interrupts to IVG
      Enable/disable passing to core event controller
      Enable/disable wakeup of core event controller              EBIU (SDRAM)

     Utility functions
                                                                 Dynamic Power
      Critical region protection
      Interrupt Mask Register (IMASK) control                   Interrupt Manager


                                                        DMA Manager        Deferred Callback


                                                        Flag Control         Timer Control


                                                                   Port Control

14
Interrupt Manager API

Initialization/Termination
ADI_INT_RESULT adi_int_Init();                     // Initializes the interrupt manager
ADI_INT_RESULT adi_int_Terminate();                // Terminates the interrupt manager

Core Event Controller Functions
ADI_INT_RESULT adi_int_CECHook();                  // Hooks a handler into an IVG chain
ADI_INT_RESULT adi_int_CECUnhook();                // Unhooks a handler from an IVG chain

System Interrupt Controller Functions
ADI_INT_RESULT   adi_int_SICEnable();              //   Allows interrupt to be passed to the CEC
ADI_INT_RESULT   adi_int_SICDisable();             //   Disallows interrupt to be passed to the CEC
ADI_INT_RESULT   adi_int_SICSetIVG();              //   Sets the IVG to which a peripheral is mapped
ADI_INT_RESULT   adi_int_SICGetIVG();              //   Gets the IVG to which a peripheral is mapped
ADI_INT_RESULT   adi_int_SICWakeup();              //   Allows the interrupt to wakeup the processor
ADI_INT_RESULT   adi_int_SICInterruptAsserted();   //   Tests if an interrupt is asserted


Utility Functions
void   *adi_int_EnterCriticalRegion();             //   Enters a critical region of code
void   adi_int_ExitCriticalRegion();               //   Exits a critical region of code
void   adi_int_SetIMaskBits();                     //   Sets bits in IMASK register
void   adi_int_ClearIMaskBits();                   //   Clears bits in IMASK register
15
Interrupt Manager Example

                                     RTC


     Main program

                                               Minute
                                              Interrupt


                                System Interrupt
                                Controller (SIC)
                    Interrupt
                    Manager

                                  Core Event
                                Controller (CEC)



      Interrupt
      Handler


16
What’s a Callback?

     Call made to a function outside the normal flow of program
     execution
      Response to an asynchronous event (hardware interrupt)
     Callback Function
      Regular ‘C’ callable function
      Takes some action based on the event
     Types of Callbacks
      Live
       Call to the function is made immediately
       Callback function typically executes at hardware interrupt time
       Negative impact to performance (higher interrupt latency)
      Deferred
       Call to the function is deferred to some later point in time
       Callback function executes at software interrupt time
       Positive impact to performance (lower interrupt latency)
17
Deferred Callback Manager

     Reduce time spent in hardware Interrupt Service Routines (ISR)
      Service hardware, queue the callback and exit
     Map callback services to different IVG levels
      User specifies level(s)
       Typically lower than hardware levels
     Prioritization within each level
      Urgent callbacks processed first                          EBIU (SDRAM)

     Operating environments                                    Dynamic Power
      Standalone systems
       Callbacks execute before “normal” user code            Interrupt Manager


      VDK based systems                               DMA Manager        Deferred Callback

       Callbacks run at software interrupt thread
                                                      Flag Control         Timer Control


                                                                 Port Control

18
Deferred Callback Service API


Initialization/Termination
ADI_DCB_RESULT adi_dcb_Init();        // Initializes the deferred callback service
ADI_DCB_RESULT adi_dcb_Terminate();   // Terminates the deferred callback service

Callback Queue Server Control
ADI_DCB_RESULT adi_dcb_Open();        // Opens a callback queue
ADI_DCB_RESULT adi_dcb_Close();       // Closes a callback queue
ADI_DCB_RESULT adi_dcb_Control();     // Changes settings of a callback queue

ADI_DCB_RESULT adi_dcb_Post();        // Posts a callback to a queue
ADI_DCB_RESULT adi_dcb_Remove();      // Removes callbacks from a queue




19
DMA Manager

     Controls and schedules DMA
      Supports both peripheral and memory DMA
      User control of DMA channel mappings/priority, traffic control
     Comprehensive support for DMA modes
      Descriptor chaining (large, small)
       Queues descriptor jobs
      Autobuffering (called circular buffers)
     MemCopy functions                                          EBIU (SDRAM)

      DMA transfers rather than core access                    Dynamic Power
      One dimensional and two dimensional
     Optional callbacks on completion                         Interrupt Manager


      Live or deferred                                DMA Manager        Deferred Callback


                                                      Flag Control         Timer Control


                                                                 Port Control

20
DMA Manager API
Initialization/Termination
ADI_DMA_RESULT adi_dma_Init();             // Initializes the DMA manager
ADI_DMA_RESULT adi_dma_Terminate();        // Terminates the DMA manager

Channel Control
ADI_DMA_RESULT   adi_dma_Open();           //   Opens a channel for use
ADI_DMA_RESULT   adi_dma_Close();          //   Closes a channel
ADI_DMA_RESULT   adi_dma_Control();        //   Configures a channel
ADI_DMA_RESULT   adi_dma_Queue();          //   Posts a chain of descriptors to a channel
ADI_DMA_RESULT   adi_dma_Buffer();         //   Provides a one-shot or circular job to a channel

Memory Stream Control
ADI_DMA_RESULT   adi_dma_MemoryOpen();     //   Opens a memory stream
ADI_DMA_RESULT   adi_dma_MemoryClose();    //   Closes a memory stream
ADI_DMA_RESULT   adi_dma_MemoryCopy();     //   Performs a one-dimensional memory transfer
ADI_DMA_RESULT   adi_dma_MemoryCopy2D();   //   Performs a two-dimensional memory transfer

Channel Mappings
ADI_DMA_RESULT adi_dma_SetMapping();       // Sets the mapping of a channel to a peripheral
ADI_DMA_RESULT adi_dma_GetMapping();       // Gets the mapping of a channel to a peripheral




21
Memory DMA Example



                        Open memory stream
         Main program      and copy data                          Source




                               DMA                   DMA
                              Manager              Controller



           Callback
                                   Callback upon                Destination
           Function
                                    completion




 Do another copy




22
Flag Control Service

     Controls general purpose programmable flags (GPIO)
      All hardware capabilities exposed
       Set direction
       Set/clear/toggle level
       Sense level
     Provides callback capability
      Callback function invoked upon trigger condition         EBIU (SDRAM)

       Level sensitive
                                                              Dynamic Power
        High/low
       Edge sensitive                                        Interrupt Manager

        Rising/falling/either
                                                    DMA Manager         Deferred Callback
      Live or deferred
                                                     Flag Control         Timer Control


                                                                Port Control

23
Flag Control API

Initialization/Termination
ADI_FLAG_RESULT adi_flag_Init();                 // Initializes the flag service
ADI_FLAG_RESULT adi_flag_Terminate();            // Terminates the flag service

Flag Control
ADI_FLAG_RESULT   adi_flag_Open();               //   Opens a flag for use
ADI_FLAG_RESULT   adi_flag_Close();              //   Closes a flag
ADI_FLAG_RESULT   adi_flag_SetDirection();       //   Configures the flag for input or output
ADI_FLAG_RESULT   adi_flag_Set();                //   Sets a flag to logical 1
ADI_FLAG_RESULT   adi_flag_Clear();              //   Sets a flag to logical 0
ADI_FLAG_RESULT   adi_flag_Toggle();             //   Toggles the current value of a flag
ADI_FLAG_RESULT   adi_flag_Sense();              //   Senses the value of a flag

Flag Callback Control
ADI_FLAG_RESULT   adi_flag_InstallCallback();    //   Installs a callback for sensing flag changes
ADI_FLAG_RESULT   adi_flag_RemoveCallback();     //   Removes a callback from a flag
ADI_FLAG_RESULT   adi_flag_SetTrigger();         //   Sets the trigger condition for a flag callback
ADI_FLAG_RESULT   adi_flag_SuspendCallbacks();   //   Temporarily suspend callbacks for a flag
ADI_FLAG_RESULT   adi_flag_ResumeCallbacks();    //   Resume callbacks for a flag




24
Flag Control Example


                    Configure flag as an input
                      and install callback
     Main program



                                                 Programmable   Pushbutton
                         Flag Control
                                                      Flag       on EZ-Kit



       Callback
       Function
                         Callback upon
                        trigger condition




25
Timer Control Service

     Controls operation of timers
      Full access into all modes and features
       Core timer
        Count, period, scale, auto-reload
       Watchdog timer
        Select timeout event, reset counter
       General purpose timers
                                                          EBIU (SDRAM)
        PWM, WidthCap
        Simultaneous enable/disable                      Dynamic Power

     Provides callback capability                       Interrupt Manager
      Callback function upon timer expiration
                                                DMA Manager        Deferred Callback
      Live or deferred
                                                Flag Control         Timer Control


                                                           Port Control

26
Timer Control API

Initialization/Termination
ADI_TMR_RESULT adi_tmr_Init();                // Initializes the timer service
ADI_TMR_RESULT adi_tmr_Terminate();           // Terminates the timer service

Timer Control
ADI_TMR_RESULT   adi_tmr_Open();              //   Opens a timer for use
ADI_TMR_RESULT   adi_tmr_Close();             //   Closes a timer
ADI_TMR_RESULT   adi_tmr_Reset();             //   Resets a timer to power-up settings
ADI_TMR_RESULT   adi_tmr_GetPeripheralID();   //   Gets the peripheral ID for a timer

ADI_TMR_RESULT adi_tmr_CoreControl();         // Controls the core timer

ADI_TMR_RESULT adi_tmr_WatchdogControl(); // Controls the watchdog timer

ADI_TMR_RESULT adi_tmr_GPControl();           // Controls a general purpose timer
ADI_TMR_RESULT adi_tmr_GPGroupEnable();       // Simultaneously enables/disables a group of timers

Timer Callback Control
ADI_TMR_RESULT adi_tmr_InstallCallback(); // Installs a callback for a timer
ADI_TMR_RESULT adi_tmr_RemoveCallback(); // Removes a callback from a timer




27
Port Control Service

     Controls assignment of muxed pins
      Applicable to ADSP-BF534, ADSP-BF536, ADSP-BF537 only
     Operation largely transparent to applications
      Application need only initialize port control
      No other application involvement required
     Automatically accessed by drivers and other services
      Examples                                                  EBIU (SDRAM)

       PPI driver
                                                               Dynamic Power
        Data width, frame sync pins etc.
       Timer service                                          Interrupt Manager

        Input clocks/output signals                   DMA Manager        Deferred Callback
       Flag service
        Configures as appropriate for flag pins       Flag Control         Timer Control


                                                                 Port Control

28
Port Control API

Initialization/Termination
ADI_PORTS_RESULT adi_ports_Init();           // Initializes the port control service
ADI_PORTS_RESULT adi_ports_Terminate();      // Terminates the port control service

Peripheral Based Control
ADI_PORTS_RESULT   adi_portsEnablePPI();     //   Configures   pins   for   PPI operation
ADI_PORTS_RESULT   adi_portsEnableSPI();     //   Configures   pins   for   SPI operation
ADI_PORTS_RESULT   adi_portsEnableSPORT();   //   Configures   pins   for   SPORT operation
ADI_PORTS_RESULT   adi_portsEnableUART();    //   Configures   pins   for   UART operation
ADI_PORTS_RESULT   adi_portsEnableCAN();     //   Configures   pins   for   CAN operation
ADI_PORTS_RESULT   adi_portsEnableTimer();   //   Configures   pins   for   timer operation
ADI_PORTS_RESULT   adi_portsEnableGPIO();    //   Configures   pins   for   flag operation

Profile Based Control
ADI_PORTS_RESULT adi_ports_SetProfile();     // Sets a muxing profile
ADI_PORTS_RESULT adi_ports_GetProfile();     // Gets a muxing profile




29
Finding the System Services
     Include files
      C:Program FilesAnalog DevicesVisualDSP 4.0Blackfinincludeservices

     Source files
      C:Program FilesAnalog DevicesVisualDSP 4.0Blackfinlibsrcservices

     Libraries
      C:Program FilesAnalog DevicesVisualDSP 4.0Blackfinlib

     Examples
      C:Program FilesAnalog DevicesVisualDSP 4.0BlackfinEZ-KITsADSP-BF533Services

      C:Program FilesAnalog DevicesVisualDSP 4.0BlackfinEZ-KITsADSP-BF537Services

      C:Program FilesAnalog DevicesVisualDSP 4.0BlackfinEZ-KITsADSP-BF561Services

     Documentation
      Device Driver and System Services User Manual
       Blackfin Technical Library at www.analog.com

      Device Driver and System Services User Manual Addendum (Sept 2005)
       ftp://ftp.analog.com/pub/tools/patches/Blackfin/VDSP++4.0/



30
Conclusion

     System services provide:
      Faster development
       Stable software base for application development
         Fewer variables
       Less re-invention
         Don’t need to create everything from scratch
      Modular software
       Better compatibility
         Resource control is managed by the system services
       Easier integration
         Multiple software components working concurrently
      Portability
       Code portable to other Blackfin processors


31
Additional Information

     Documentation
      Device Drivers and System Services Manual for Blackfin
      Processors
        − http://www.analog.com/processors/resources/technicalLibrary/manuals/index.html
      Device Drivers and System Services Addendum (Sept 2005)
        − ftp://ftp.analog.com/pub/tools/patches/Blackfin/VDSP++4.0/


     For questions, click “Ask A Question” button




32

Weitere ähnliche Inhalte

Was ist angesagt?

Linux Power Management Slideshare
Linux Power Management SlideshareLinux Power Management Slideshare
Linux Power Management Slideshare
Patrick Bellasi
 
Drives Software Programming – using PLC or Drive bespoke programming?
Drives Software Programming – using PLC or Drive bespoke programming?Drives Software Programming – using PLC or Drive bespoke programming?
Drives Software Programming – using PLC or Drive bespoke programming?
Optima Control Solutions
 
Delta v advanced control overview_en
Delta v advanced control overview_enDelta v advanced control overview_en
Delta v advanced control overview_en
Luis Atencio
 
Safety control systems: Some essential considerations
Safety control systems: Some essential considerationsSafety control systems: Some essential considerations
Safety control systems: Some essential considerations
Optima Control Solutions
 
HKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 ServersHKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 Servers
Linaro
 

Was ist angesagt? (20)

Linux Power Management Slideshare
Linux Power Management SlideshareLinux Power Management Slideshare
Linux Power Management Slideshare
 
Yokogawa Centum VP
Yokogawa Centum VPYokogawa Centum VP
Yokogawa Centum VP
 
Dcs operator training
Dcs operator trainingDcs operator training
Dcs operator training
 
Android 电源管理 power_management_(英文版)
Android 电源管理 power_management_(英文版)Android 电源管理 power_management_(英文版)
Android 电源管理 power_management_(英文版)
 
Technical presentation on
Technical  presentation onTechnical  presentation on
Technical presentation on
 
Interesting and Useful Features of the DeltaV PID, Ratio and Bias/Gain Contro...
Interesting and Useful Features of the DeltaV PID, Ratio and Bias/Gain Contro...Interesting and Useful Features of the DeltaV PID, Ratio and Bias/Gain Contro...
Interesting and Useful Features of the DeltaV PID, Ratio and Bias/Gain Contro...
 
Xd instruction manual
Xd instruction manualXd instruction manual
Xd instruction manual
 
Omron PLC cqm1 opearation manual
Omron PLC cqm1 opearation manualOmron PLC cqm1 opearation manual
Omron PLC cqm1 opearation manual
 
Drives Software Programming – using PLC or Drive bespoke programming?
Drives Software Programming – using PLC or Drive bespoke programming?Drives Software Programming – using PLC or Drive bespoke programming?
Drives Software Programming – using PLC or Drive bespoke programming?
 
Manual CLP Omron CP1H
Manual CLP Omron CP1HManual CLP Omron CP1H
Manual CLP Omron CP1H
 
CENTUM VP - 2014 version
CENTUM VP - 2014 versionCENTUM VP - 2014 version
CENTUM VP - 2014 version
 
Delta v advanced control overview_en
Delta v advanced control overview_enDelta v advanced control overview_en
Delta v advanced control overview_en
 
OSMC 2014: Server Hardware Monitoring done right | Werner Fischer
OSMC 2014: Server Hardware Monitoring done right | Werner FischerOSMC 2014: Server Hardware Monitoring done right | Werner Fischer
OSMC 2014: Server Hardware Monitoring done right | Werner Fischer
 
Basics Of Embedded Systems
Basics Of Embedded SystemsBasics Of Embedded Systems
Basics Of Embedded Systems
 
Cfs0077 ul-c-web part3
Cfs0077 ul-c-web part3Cfs0077 ul-c-web part3
Cfs0077 ul-c-web part3
 
Safety control systems: Some essential considerations
Safety control systems: Some essential considerationsSafety control systems: Some essential considerations
Safety control systems: Some essential considerations
 
Smooooth Operations - Configuration Tips for Analog Blocks
Smooooth Operations - Configuration Tips for Analog BlocksSmooooth Operations - Configuration Tips for Analog Blocks
Smooooth Operations - Configuration Tips for Analog Blocks
 
Master the Mystery and Marvels of DeltaV MPC
Master the Mystery and Marvels of DeltaV MPCMaster the Mystery and Marvels of DeltaV MPC
Master the Mystery and Marvels of DeltaV MPC
 
HKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 ServersHKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 Servers
 
Distributed Control System (Presentation)
Distributed Control System (Presentation)Distributed Control System (Presentation)
Distributed Control System (Presentation)
 

Ähnlich wie Blackfin system services

Track d more performance less power - freescale final
Track d   more performance less power  - freescale finalTrack d   more performance less power  - freescale final
Track d more performance less power - freescale final
chiportal
 

Ähnlich wie Blackfin system services (20)

Track d more performance less power - freescale final
Track d   more performance less power  - freescale finalTrack d   more performance less power  - freescale final
Track d more performance less power - freescale final
 
Arm7 architecture
Arm7 architectureArm7 architecture
Arm7 architecture
 
PowerManagement
PowerManagementPowerManagement
PowerManagement
 
S6 EEE MPLC FULL NOTE.pdf subject in electrical and electronics engineering
S6 EEE MPLC FULL NOTE.pdf subject in electrical and electronics engineeringS6 EEE MPLC FULL NOTE.pdf subject in electrical and electronics engineering
S6 EEE MPLC FULL NOTE.pdf subject in electrical and electronics engineering
 
8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijay8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijay
 
Honey process manager
Honey   process  managerHoney   process  manager
Honey process manager
 
Vfd
VfdVfd
Vfd
 
automation,vfd,plc,scada overview
automation,vfd,plc,scada overviewautomation,vfd,plc,scada overview
automation,vfd,plc,scada overview
 
automation,vfd,plc,scada overview
automation,vfd,plc,scada overviewautomation,vfd,plc,scada overview
automation,vfd,plc,scada overview
 
OPAL-RT RT13 Conference: Rapid control prototyping solutions for power electr...
OPAL-RT RT13 Conference: Rapid control prototyping solutions for power electr...OPAL-RT RT13 Conference: Rapid control prototyping solutions for power electr...
OPAL-RT RT13 Conference: Rapid control prototyping solutions for power electr...
 
LCA13: CPUIDLE: One driver to rule them all?
LCA13: CPUIDLE: One driver to rule them all?LCA13: CPUIDLE: One driver to rule them all?
LCA13: CPUIDLE: One driver to rule them all?
 
Cyclone III FPGA Overview Part2
Cyclone III FPGA Overview Part2Cyclone III FPGA Overview Part2
Cyclone III FPGA Overview Part2
 
Lecture on PIC-1.pptx
Lecture on PIC-1.pptxLecture on PIC-1.pptx
Lecture on PIC-1.pptx
 
Psoc
PsocPsoc
Psoc
 
embedded system introduction to microcontrollers
embedded system introduction to microcontrollersembedded system introduction to microcontrollers
embedded system introduction to microcontrollers
 
Nvidia tegra K1 Presentation
Nvidia tegra K1 PresentationNvidia tegra K1 Presentation
Nvidia tegra K1 Presentation
 
7SK80 Motor Protection Relay
7SK80 Motor Protection Relay7SK80 Motor Protection Relay
7SK80 Motor Protection Relay
 
Interrupts
InterruptsInterrupts
Interrupts
 
01 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa1601 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa16
 
A Comprehensive Implementation and Evaluation of Direct Interrupt Delivery
A Comprehensive Implementation and Evaluation of Direct Interrupt DeliveryA Comprehensive Implementation and Evaluation of Direct Interrupt Delivery
A Comprehensive Implementation and Evaluation of Direct Interrupt Delivery
 

Mehr von Pantech ProLabs India Pvt Ltd

Mehr von Pantech ProLabs India Pvt Ltd (20)

Registration process
Registration processRegistration process
Registration process
 
Choosing the right processor for embedded system design
Choosing the right processor for embedded system designChoosing the right processor for embedded system design
Choosing the right processor for embedded system design
 
Brain Computer Interface
Brain Computer InterfaceBrain Computer Interface
Brain Computer Interface
 
Electric Vehicle Design using Matlab
Electric Vehicle Design using MatlabElectric Vehicle Design using Matlab
Electric Vehicle Design using Matlab
 
Image processing application
Image processing applicationImage processing application
Image processing application
 
Internet of Things using Raspberry Pi
Internet of Things using Raspberry PiInternet of Things using Raspberry Pi
Internet of Things using Raspberry Pi
 
Internet of Things Using Arduino
Internet of Things Using ArduinoInternet of Things Using Arduino
Internet of Things Using Arduino
 
Brain controlled robot
Brain controlled robotBrain controlled robot
Brain controlled robot
 
Brain Computer Interface-Webinar
Brain Computer Interface-WebinarBrain Computer Interface-Webinar
Brain Computer Interface-Webinar
 
Development of Deep Learning Architecture
Development of Deep Learning ArchitectureDevelopment of Deep Learning Architecture
Development of Deep Learning Architecture
 
Future of AI
Future of AIFuture of AI
Future of AI
 
Gate driver design and inductance fabrication
Gate driver design and inductance fabricationGate driver design and inductance fabrication
Gate driver design and inductance fabrication
 
Brainsense -Brain computer Interface
Brainsense -Brain computer InterfaceBrainsense -Brain computer Interface
Brainsense -Brain computer Interface
 
Median filter Implementation using TMS320C6745
Median filter Implementation using TMS320C6745Median filter Implementation using TMS320C6745
Median filter Implementation using TMS320C6745
 
Introduction to Code Composer Studio 4
Introduction to Code Composer Studio 4Introduction to Code Composer Studio 4
Introduction to Code Composer Studio 4
 
Waveform Generation Using TMS320C6745 DSP
Waveform Generation Using TMS320C6745 DSPWaveform Generation Using TMS320C6745 DSP
Waveform Generation Using TMS320C6745 DSP
 
Interfacing UART with tms320C6745
Interfacing UART with tms320C6745Interfacing UART with tms320C6745
Interfacing UART with tms320C6745
 
Switch & LED using TMS320C6745 DSP
Switch & LED using TMS320C6745 DSPSwitch & LED using TMS320C6745 DSP
Switch & LED using TMS320C6745 DSP
 
Led blinking using TMS320C6745
Led blinking using TMS320C6745Led blinking using TMS320C6745
Led blinking using TMS320C6745
 
Introduction to tms320c6745 dsp
Introduction to tms320c6745 dspIntroduction to tms320c6745 dsp
Introduction to tms320c6745 dsp
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Blackfin system services

  • 1. The World Leader in High Performance Signal Processing Solutions Blackfin System Services Presented By: David Lannigan
  • 2. About this Module This module discusses the System Services software available for the Blackfin family of processors. It is recommended that users should have some understanding of the Blackfin architecture, a basic knowledge of software terminology and experience in embedded systems. 2
  • 3. Module Outline Overview What are system services? Benefits of using system services Highlight functionality of each service Dynamic Power Management External Bus Interface Unit (EBIU) Interrupt Manager Deferred Callback Service DMA Manager Flag Control Timer Control Port Control Simple examples using the services 3
  • 4. What are System Services? Software library Provides functionality common to embedded systems Simple, efficient access into PLL, DMA, interrupt controllers, timers, flags etc. Improved interrupt performance Deferred callbacks Callable from ‘C’ or assembly Common APIs across Blackfin processors ADSP-BF531, BF532, BF533, BF534, BF536, BF537 ADSP-BF561 Leveraged by applications, device drivers etc. Standalone environment VDK environment 4
  • 5. Benefits To Using System Services Faster time to market Tested and proven software Shorter learning curve Less re-invention Modular software Better compatibility Simplifies integration efforts Portability APIs identical across Blackfin processors Both single-core and multi-core processors Leverage processor roadmap Transition quickly to new processors Access to device driver portfolio ADI device drivers built on top of system services Full source code provided 5
  • 6. System Architecture Application RTOS (optional) Device Device Driver Driver Device Driver System Services 6
  • 7. System Services EBIU (SDRAM) Dynamic Power Interrupt Manager DMA Manager Deferred Callback Flag Control Timer Control Port Control 7
  • 8. Dynamic Power Management Service Controls Phase-Locked Loop (PLL) and internal voltage regulator Single function call to Change operating modes Full-on, active, sleep, deep sleep and hibernate Change core and system clock frequencies (CCLK and SCLK) Clock frequency priority Voltage level automatically adjusted accordingly EBIU (SDRAM) Lowered whenever possible to maximize power savings Dynamic Power Raised when performance requires Maximize CCLK and SCLK for given voltage level Interrupt Manager Voltage level priority Clocks raised to max safe frequency DMA Manager Deferred Callback Automatically controls EBIU service Flag Control Timer Control Port Control 8
  • 9. External Bus Interface Unit (EBIU) Initializes SDRAM settings Configures SDRAM controller Logic to calculate new values Changing SCLK frequencies Works in concert with Power Management Service Automatically adjusts settings for SCLK frequency changes EBIU (SDRAM) Dynamic Power Interrupt Manager DMA Manager Deferred Callback Flag Control Timer Control Port Control 9
  • 10. Using EBIU and Power Management Application should Initialize the EBIU service Initialize the Power Management service Call Power Management functions as needed Such as adi_pwr_SetFreq(); EBIU (SDRAM) adi_pwr_MaxFreqForVolt(); adi_pwr_SetPowerMode(); Dynamic Power Interrupt Manager DMA Manager Deferred Callback Flag Control Timer Control Port Control 10
  • 11. Dynamic Power Management API Initialization/Termination ADI_PWR_RESULT adi_pwr_Init(); // Initializes the power service ADI_PWR_RESULT adi_pwr_Terminate(); // Terminates the power service Frequency and Voltage Control ADI_PWR_RESULT adi_pwr_Control(); // Sets/queries a configuration parameter ADI_PWR_RESULT adi_pwr_SaveConfig(); // Saves the power configuration ADI_PWR_RESULT adi_pwr_LoadConfig(); // Loads a power configuration ADI_PWR_RESULT adi_pwr_SetVoltageRegulator(); // Adjusts the internal voltage regulator ADI_PWR_RESULT adi_pwr_SetMaxFreqforVolt(); // Set the max clock freqs for voltage level ADI_PWR_RESULT adi_pwr_SetFreq(); // Sets the core and system clock frequencies ADI_PWR_RESULT adi_pwr_AdjustFreq(); // Adjusts the core and system clock frequencies ADI_PWR_RESULT adi_pwr_GetFreq(); // Gets the core and system clock frequencies Operating Modes ADI_PWR_RESULT adi_pwr_SetPowerMode(); // Place processor in specified operating mode ADI_PWR_RESULT adi_pwr_GetPowerMode(); // Gets the current operating mode 11
  • 12. EBIU Service API Initialization/Termination ADI_EBIU_RESULT adi_ebiu_Init(); // Initializes the EBIU service ADI_EBIU_RESULT adi_ebiu_Terminate(); // Terminates the EBIU service EBIU Control ADI_EBIU_RESULT adi_ebiu_Reset(); // Resets the EBIU module to power-up settings ADI_EBIU_RESULT adi_ebiu_Control(); // Sets/queries module settings ADI_EBIU_RESULT adi_ebiu_AdjustSDRAM(); // Recalculates and apply settings for SCLK changes EBIU Configuration ADI_EBIU_RESULT adi_ebiu_LoadConfig(); // Loads a set of controller settings ADI_EBIU_RESULT adi_ebiu_SaveConfig() // Saves a set of controller settings 12
  • 13. Dynamic Power Example Phase Locked Loop (PLL) Change frequencies, Dynamic Power voltage, operating Service mode Voltage Regulator EBIU SDRAM Service Adjust timings 13
  • 14. Interrupt Manager Service Core Event Controller (CEC) Hook/Unhook interrupt handlers into Interrupt Vector Groups (IVG) Supports handler chaining System Interrupt Controller (SIC) Mapping of peripheral interrupts to IVG Enable/disable passing to core event controller Enable/disable wakeup of core event controller EBIU (SDRAM) Utility functions Dynamic Power Critical region protection Interrupt Mask Register (IMASK) control Interrupt Manager DMA Manager Deferred Callback Flag Control Timer Control Port Control 14
  • 15. Interrupt Manager API Initialization/Termination ADI_INT_RESULT adi_int_Init(); // Initializes the interrupt manager ADI_INT_RESULT adi_int_Terminate(); // Terminates the interrupt manager Core Event Controller Functions ADI_INT_RESULT adi_int_CECHook(); // Hooks a handler into an IVG chain ADI_INT_RESULT adi_int_CECUnhook(); // Unhooks a handler from an IVG chain System Interrupt Controller Functions ADI_INT_RESULT adi_int_SICEnable(); // Allows interrupt to be passed to the CEC ADI_INT_RESULT adi_int_SICDisable(); // Disallows interrupt to be passed to the CEC ADI_INT_RESULT adi_int_SICSetIVG(); // Sets the IVG to which a peripheral is mapped ADI_INT_RESULT adi_int_SICGetIVG(); // Gets the IVG to which a peripheral is mapped ADI_INT_RESULT adi_int_SICWakeup(); // Allows the interrupt to wakeup the processor ADI_INT_RESULT adi_int_SICInterruptAsserted(); // Tests if an interrupt is asserted Utility Functions void *adi_int_EnterCriticalRegion(); // Enters a critical region of code void adi_int_ExitCriticalRegion(); // Exits a critical region of code void adi_int_SetIMaskBits(); // Sets bits in IMASK register void adi_int_ClearIMaskBits(); // Clears bits in IMASK register 15
  • 16. Interrupt Manager Example RTC Main program Minute Interrupt System Interrupt Controller (SIC) Interrupt Manager Core Event Controller (CEC) Interrupt Handler 16
  • 17. What’s a Callback? Call made to a function outside the normal flow of program execution Response to an asynchronous event (hardware interrupt) Callback Function Regular ‘C’ callable function Takes some action based on the event Types of Callbacks Live Call to the function is made immediately Callback function typically executes at hardware interrupt time Negative impact to performance (higher interrupt latency) Deferred Call to the function is deferred to some later point in time Callback function executes at software interrupt time Positive impact to performance (lower interrupt latency) 17
  • 18. Deferred Callback Manager Reduce time spent in hardware Interrupt Service Routines (ISR) Service hardware, queue the callback and exit Map callback services to different IVG levels User specifies level(s) Typically lower than hardware levels Prioritization within each level Urgent callbacks processed first EBIU (SDRAM) Operating environments Dynamic Power Standalone systems Callbacks execute before “normal” user code Interrupt Manager VDK based systems DMA Manager Deferred Callback Callbacks run at software interrupt thread Flag Control Timer Control Port Control 18
  • 19. Deferred Callback Service API Initialization/Termination ADI_DCB_RESULT adi_dcb_Init(); // Initializes the deferred callback service ADI_DCB_RESULT adi_dcb_Terminate(); // Terminates the deferred callback service Callback Queue Server Control ADI_DCB_RESULT adi_dcb_Open(); // Opens a callback queue ADI_DCB_RESULT adi_dcb_Close(); // Closes a callback queue ADI_DCB_RESULT adi_dcb_Control(); // Changes settings of a callback queue ADI_DCB_RESULT adi_dcb_Post(); // Posts a callback to a queue ADI_DCB_RESULT adi_dcb_Remove(); // Removes callbacks from a queue 19
  • 20. DMA Manager Controls and schedules DMA Supports both peripheral and memory DMA User control of DMA channel mappings/priority, traffic control Comprehensive support for DMA modes Descriptor chaining (large, small) Queues descriptor jobs Autobuffering (called circular buffers) MemCopy functions EBIU (SDRAM) DMA transfers rather than core access Dynamic Power One dimensional and two dimensional Optional callbacks on completion Interrupt Manager Live or deferred DMA Manager Deferred Callback Flag Control Timer Control Port Control 20
  • 21. DMA Manager API Initialization/Termination ADI_DMA_RESULT adi_dma_Init(); // Initializes the DMA manager ADI_DMA_RESULT adi_dma_Terminate(); // Terminates the DMA manager Channel Control ADI_DMA_RESULT adi_dma_Open(); // Opens a channel for use ADI_DMA_RESULT adi_dma_Close(); // Closes a channel ADI_DMA_RESULT adi_dma_Control(); // Configures a channel ADI_DMA_RESULT adi_dma_Queue(); // Posts a chain of descriptors to a channel ADI_DMA_RESULT adi_dma_Buffer(); // Provides a one-shot or circular job to a channel Memory Stream Control ADI_DMA_RESULT adi_dma_MemoryOpen(); // Opens a memory stream ADI_DMA_RESULT adi_dma_MemoryClose(); // Closes a memory stream ADI_DMA_RESULT adi_dma_MemoryCopy(); // Performs a one-dimensional memory transfer ADI_DMA_RESULT adi_dma_MemoryCopy2D(); // Performs a two-dimensional memory transfer Channel Mappings ADI_DMA_RESULT adi_dma_SetMapping(); // Sets the mapping of a channel to a peripheral ADI_DMA_RESULT adi_dma_GetMapping(); // Gets the mapping of a channel to a peripheral 21
  • 22. Memory DMA Example Open memory stream Main program and copy data Source DMA DMA Manager Controller Callback Callback upon Destination Function completion Do another copy 22
  • 23. Flag Control Service Controls general purpose programmable flags (GPIO) All hardware capabilities exposed Set direction Set/clear/toggle level Sense level Provides callback capability Callback function invoked upon trigger condition EBIU (SDRAM) Level sensitive Dynamic Power High/low Edge sensitive Interrupt Manager Rising/falling/either DMA Manager Deferred Callback Live or deferred Flag Control Timer Control Port Control 23
  • 24. Flag Control API Initialization/Termination ADI_FLAG_RESULT adi_flag_Init(); // Initializes the flag service ADI_FLAG_RESULT adi_flag_Terminate(); // Terminates the flag service Flag Control ADI_FLAG_RESULT adi_flag_Open(); // Opens a flag for use ADI_FLAG_RESULT adi_flag_Close(); // Closes a flag ADI_FLAG_RESULT adi_flag_SetDirection(); // Configures the flag for input or output ADI_FLAG_RESULT adi_flag_Set(); // Sets a flag to logical 1 ADI_FLAG_RESULT adi_flag_Clear(); // Sets a flag to logical 0 ADI_FLAG_RESULT adi_flag_Toggle(); // Toggles the current value of a flag ADI_FLAG_RESULT adi_flag_Sense(); // Senses the value of a flag Flag Callback Control ADI_FLAG_RESULT adi_flag_InstallCallback(); // Installs a callback for sensing flag changes ADI_FLAG_RESULT adi_flag_RemoveCallback(); // Removes a callback from a flag ADI_FLAG_RESULT adi_flag_SetTrigger(); // Sets the trigger condition for a flag callback ADI_FLAG_RESULT adi_flag_SuspendCallbacks(); // Temporarily suspend callbacks for a flag ADI_FLAG_RESULT adi_flag_ResumeCallbacks(); // Resume callbacks for a flag 24
  • 25. Flag Control Example Configure flag as an input and install callback Main program Programmable Pushbutton Flag Control Flag on EZ-Kit Callback Function Callback upon trigger condition 25
  • 26. Timer Control Service Controls operation of timers Full access into all modes and features Core timer Count, period, scale, auto-reload Watchdog timer Select timeout event, reset counter General purpose timers EBIU (SDRAM) PWM, WidthCap Simultaneous enable/disable Dynamic Power Provides callback capability Interrupt Manager Callback function upon timer expiration DMA Manager Deferred Callback Live or deferred Flag Control Timer Control Port Control 26
  • 27. Timer Control API Initialization/Termination ADI_TMR_RESULT adi_tmr_Init(); // Initializes the timer service ADI_TMR_RESULT adi_tmr_Terminate(); // Terminates the timer service Timer Control ADI_TMR_RESULT adi_tmr_Open(); // Opens a timer for use ADI_TMR_RESULT adi_tmr_Close(); // Closes a timer ADI_TMR_RESULT adi_tmr_Reset(); // Resets a timer to power-up settings ADI_TMR_RESULT adi_tmr_GetPeripheralID(); // Gets the peripheral ID for a timer ADI_TMR_RESULT adi_tmr_CoreControl(); // Controls the core timer ADI_TMR_RESULT adi_tmr_WatchdogControl(); // Controls the watchdog timer ADI_TMR_RESULT adi_tmr_GPControl(); // Controls a general purpose timer ADI_TMR_RESULT adi_tmr_GPGroupEnable(); // Simultaneously enables/disables a group of timers Timer Callback Control ADI_TMR_RESULT adi_tmr_InstallCallback(); // Installs a callback for a timer ADI_TMR_RESULT adi_tmr_RemoveCallback(); // Removes a callback from a timer 27
  • 28. Port Control Service Controls assignment of muxed pins Applicable to ADSP-BF534, ADSP-BF536, ADSP-BF537 only Operation largely transparent to applications Application need only initialize port control No other application involvement required Automatically accessed by drivers and other services Examples EBIU (SDRAM) PPI driver Dynamic Power Data width, frame sync pins etc. Timer service Interrupt Manager Input clocks/output signals DMA Manager Deferred Callback Flag service Configures as appropriate for flag pins Flag Control Timer Control Port Control 28
  • 29. Port Control API Initialization/Termination ADI_PORTS_RESULT adi_ports_Init(); // Initializes the port control service ADI_PORTS_RESULT adi_ports_Terminate(); // Terminates the port control service Peripheral Based Control ADI_PORTS_RESULT adi_portsEnablePPI(); // Configures pins for PPI operation ADI_PORTS_RESULT adi_portsEnableSPI(); // Configures pins for SPI operation ADI_PORTS_RESULT adi_portsEnableSPORT(); // Configures pins for SPORT operation ADI_PORTS_RESULT adi_portsEnableUART(); // Configures pins for UART operation ADI_PORTS_RESULT adi_portsEnableCAN(); // Configures pins for CAN operation ADI_PORTS_RESULT adi_portsEnableTimer(); // Configures pins for timer operation ADI_PORTS_RESULT adi_portsEnableGPIO(); // Configures pins for flag operation Profile Based Control ADI_PORTS_RESULT adi_ports_SetProfile(); // Sets a muxing profile ADI_PORTS_RESULT adi_ports_GetProfile(); // Gets a muxing profile 29
  • 30. Finding the System Services Include files C:Program FilesAnalog DevicesVisualDSP 4.0Blackfinincludeservices Source files C:Program FilesAnalog DevicesVisualDSP 4.0Blackfinlibsrcservices Libraries C:Program FilesAnalog DevicesVisualDSP 4.0Blackfinlib Examples C:Program FilesAnalog DevicesVisualDSP 4.0BlackfinEZ-KITsADSP-BF533Services C:Program FilesAnalog DevicesVisualDSP 4.0BlackfinEZ-KITsADSP-BF537Services C:Program FilesAnalog DevicesVisualDSP 4.0BlackfinEZ-KITsADSP-BF561Services Documentation Device Driver and System Services User Manual Blackfin Technical Library at www.analog.com Device Driver and System Services User Manual Addendum (Sept 2005) ftp://ftp.analog.com/pub/tools/patches/Blackfin/VDSP++4.0/ 30
  • 31. Conclusion System services provide: Faster development Stable software base for application development Fewer variables Less re-invention Don’t need to create everything from scratch Modular software Better compatibility Resource control is managed by the system services Easier integration Multiple software components working concurrently Portability Code portable to other Blackfin processors 31
  • 32. Additional Information Documentation Device Drivers and System Services Manual for Blackfin Processors − http://www.analog.com/processors/resources/technicalLibrary/manuals/index.html Device Drivers and System Services Addendum (Sept 2005) − ftp://ftp.analog.com/pub/tools/patches/Blackfin/VDSP++4.0/ For questions, click “Ask A Question” button 32