Post Go back to editing

BF548

Category: Software
Software Version: CCES 12.0.0
I want to configure the  blackfin processor 548 in gpio mode.
 
void Init_port()
{
    *pPORTB_FER            =  0x0000;  // set PORTB to GPIO mode
    *pPORTB_DIR_SET        =  PB9 | PB10 |PB12 | PB13 | PB14 ;    //Set as output pin
    *pPORTB_INEN         =  0x0000;   // enable  as output
    *pPORTB_CLEAR        =  0x0000;    // clear the port
    *pPORTB_MUX         =  0x0000;

    printf("Port Setting for SPI2 is Done.....\n");
}
 
Is the above code is correct for gpio mode configuration setting?
And i want to generate 32 clock pulses with delay of 10ns . How can i generate it?
 
 
Thanks
  • Hi,

    Is the above code is correct for gpio mode configuration setting?
    >>Yes, its correct.  PORTx_INEN register is used for input mode, you can remove that.

    And i want to generate 32 clock pulses with delay of 10ns . How can i generate it?
    >> You can refer General-purpose timers . Please refer chapter 10 for more details in the below linked HRM:
    www.analog.com/.../ADSP-BF54x_hwr_rev1.2.pdf

    Please download “ADSP-BF548 EZ KIT Board Support Package” from the below link:
    www.analog.com/.../bf548-ezlite.html

    After installation timer example available in the below link:
    < installation path>\ADSP-BF548_EZKIT-Rel1.0.0\BF548_EZ-Kit_Lite\Blackfin\Examples\Timer_Callback

    Regards,
    Divya.P