element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Achievement Levels
    • Benefits of Membership
    • Feedback and Support
    • Members Area
    • Personal Blogs
    • What's New on element14
  • Learn
    Learn
    • eBooks
    • Learning Center
    • Learning Groups
    • STEM Academy
    • Webinars, Training and Events
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Arduino Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Project Groups
    • Raspberry Pi Projects
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Azure Sphere Starter Kit
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Azure Sphere Starter Kit
  • More
  • Cancel
Azure Sphere Starter Kit
Forum Using GPIO2 Baremetal
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Azure Sphere Starter Kit requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 8 replies
  • Answers 6 answers
  • Subscribers 45 subscribers
  • Views 465 views
  • Users 0 members are here
  • azure sphere kit
  • azurespherech
  • azure sphere
  • azuresphkt
  • azure sphere starter kit
Related

Using GPIO2 Baremetal

blacktronics
blacktronics over 5 years ago

So i have been playing around with the Kit a little and i find it quite difficult to find any documentation whatsoever.

 

I pulled the GPIO sample application from

https://github.com/Azure/azure-sphere-samples/tree/master/Samples/GPIO/GPIO_RTApp_MT3620_BareMetal

 

Changing the GPIO pin from 8 to 9 or 10 drives the expected LED, however, changing this to pin 2 does nothing.

 

I assume it is on a different GPIO block but i am not sure and can't really find anything.

What am i missing here?

 

I have been considering to replace an STM32 in a current project with the MT3620 but so far, using this thing just feels incredibly messy and cumbersome.

Tons of sample code that is practically uncommented and unexplained definitions everywhere for which you gotta dig through the references because there is no info of what is going on.

 

What i am currently trying to do as a getting into it project is drive some servos (pulse/direction) based on gyro data

  • Sign in to reply
  • Cancel

Top Replies

  • javagoza
    javagoza over 5 years ago in reply to blacktronics +2 suggested
    Sorry for the misunderstanding. As you had already pointed GPIO2 is in another block, so you have to add the block first, but I think that block base addresses are not public at this moment. Maybe you…
  • javagoza
    javagoza over 5 years ago +1 suggested
    What do you expect changing to GPIO 2? GPIO 2 isn't connected to anything in the kit. If you want to play with the leds: See the User Guide: Azure Sphere Starter Kit User Guide (v1.5) Azure Sphere - Tips…
Parents
  • javagoza
    0 javagoza over 5 years ago

    What do you expect changing to GPIO 2? GPIO 2 isn't connected to anything in the kit. If you want to play with the leds:

    See the User Guide:

     

    Azure Sphere Starter Kit User Guide (v1.5)

    Azure Sphere - Tips to max-out your Starter Kit hardware! (Part 1)

     

    image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • javagoza
    0 javagoza over 5 years ago

    What do you expect changing to GPIO 2? GPIO 2 isn't connected to anything in the kit. If you want to play with the leds:

    See the User Guide:

     

    Azure Sphere Starter Kit User Guide (v1.5)

    Azure Sphere - Tips to max-out your Starter Kit hardware! (Part 1)

     

    image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • blacktronics
    0 blacktronics over 5 years ago in reply to javagoza

    I'd expect GPIO2_PWM, which is exposed on the pin headers, to output a TTL signal, which it doesn't.

     

    People with soldering irons and oscilloscopes exist.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • javagoza
    0 javagoza over 5 years ago in reply to blacktronics

    Sorry for the misunderstanding.

     

    As you had already pointed GPIO2 is in another block, so you have to add the block first, but I think that block base addresses are not public at this moment. Maybe you can try to figure which address is from this part of the code:

     

        // Block includes led1RedGpio, GPIO8.
        static const GpioBlock pwm2 = {
            .baseAddr = 0x38030000, .type = GpioBlock_PWM, .firstPin = 8, .pinCount = 4};
    
        Mt3620_Gpio_AddBlock(&pwm2);
    
        // Block includes buttonAGpio, GPIO12
        static const GpioBlock grp3 = {
            .baseAddr = 0x38040000, .type = GpioBlock_GRP, .firstPin = 12, .pinCount = 4};
    
        Mt3620_Gpio_AddBlock(&grp3);

     

    /// <summary>
    /// The MT3620 board supports multiple GPIO block types. These blocks
    /// have slightly different register layouts, so the GPIO software needs
    /// to know what kind of block a given pin is in.
    /// </summary>
    typedef enum {
        /// <summary>GPIO pins are multiplexed with an ADC block.</summary>
        GpioBlock_ADC = 0,
        /// <summary>GPIO block also supports PWM.</summary>
        GpioBlock_PWM = 1,
        /// <summary>A plain GPIO block.</summary>
        GpioBlock_GRP = 2,
        /// <summary>GPIO pins are multiplexed with I2C / SPI / UART.</summary>
        GpioBlock_ISU = 3,
        /// <summary>GPIO pins are multiplexed with I2S block.</summary>
        GpioBlock_I2S = 4
    } GpioBlockType;

     

    I also had the same problem, I'm using GPIO2 and GPIO1 in order to signal MRDY and SRDY in a SNP connection with a BLE TI cc2650SOMA module and I have had to make my driver in the high level app environment, until Mediatek frees some more info.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • clem57
    0 clem57 over 5 years ago in reply to javagoza

    javagoza  Just remember to drive low to turn on and drive high to turn off. Plz do not shoot the messenger.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • blacktronics
    0 blacktronics over 5 years ago in reply to javagoza

    Thanks!

    I'll have a look at this when i have some more time to pointlessly mess around with the board.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube