• AVR Freaks

Hot!How do I specify the GPIO lines attributes in the bsp.hconfig" file?

Author
m4l490n
Senior Member
  • Total Posts : 121
  • Reward points : 0
  • Joined: 2010/06/15 22:21:39
  • Location: 0
  • Status: offline
2019/08/10 15:19:46 (permalink)
0

How do I specify the GPIO lines attributes in the bsp.hconfig" file?

If I want to have just a regular digital output configured in my BSP I have to do the following in the bsp.hconfig file:
set BSP_PIN_81_FUNCTION_NAME to "MY_OUTPUT_PIN" 
set BSP_PIN_81_FUNCTION_TYPE to "GPIO_OUT"

That will configure the pin 81 in the gui as:
Name: MY_OUTPUT_PIN
Function: GPIO_OUT
Direction: Out
Mode: Digital
 
But, how do I specify the "Latch" value, "Open Drain" config, and "Pull Up" value in the "bsp.hconfig" file?
 
The Harmony documentation Vol III section "Adding New BSPs" does not contain this information.
#1

3 Replies Related Threads

    Paul PortSol
    Super Member
    • Total Posts : 483
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: Newfoundland, Canada
    • Status: offline
    Re: How do I specify the GPIO lines attributes in the bsp.hconfig" file? 2019/08/12 05:31:25 (permalink)
    0
    In Harmony 2 use the Pin Configurator in MHC, likely similar in Harmony 3.
    Don't need any BSP, unless you are still in Harmony 1.
    Paul
    #2
    m4l490n
    Senior Member
    • Total Posts : 121
    • Reward points : 0
    • Joined: 2010/06/15 22:21:39
    • Location: 0
    • Status: offline
    Re: How do I specify the GPIO lines attributes in the bsp.hconfig" file? 2019/08/12 16:08:24 (permalink)
    0
    Paul PortSol
    In Harmony 2 use the Pin Configurator in MHC, likely similar in Harmony 3.
    Don't need any BSP, unless you are still in Harmony 1.
    Paul



    Not necessarily.
     
    Using the MHC GUI is precisely what I want to avoid by creating a BSP. There is no need to be configuring the same options over and over for the same board, that's one of the main uses of a BSP, to automatically configure the hardware when creating a project for a given board and just create the applications as needed, this, because the hardware for the same board will never change, just how many different applications you can create with the same hardware.
     
    I have been able to create an "initial" BSP for my board using the bsp.hconfig file. This BSP "pre-configures" the GPIOs for my board so I don't have to do it manually every time. What I have not been able to do is to figure out the options to specify the "Latch" value, "Open Drain" config, and "Pull Up" values for the PINs I'm configuring and I have noticed that these options are somewhat random if not specified explicitly in the bsp.hconfig file.
    #3
    Paul PortSol
    Super Member
    • Total Posts : 483
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: Newfoundland, Canada
    • Status: offline
    Re: How do I specify the GPIO lines attributes in the bsp.hconfig" file? 2019/08/13 05:22:01 (permalink)
    0
    Option1. Create it in MHC, then look at the generated files to see the generated init code, copy code to your BSP.
    Option2. Create an empty starter project for the board with all hardware init, including pins. Copy that for each new project on board. This "simple" project can be the same one you use to validate your hardware, or "factory test" your hardware.
    Option3. When you got a new project for same board, copy working project and delete unnecessary code & MHC settings.
     
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5