Skip to main content
Explorer II
January 30, 2025
Solved

GPIO Demo Program etc

  • January 30, 2025
  • 3 replies
  • 1468 views

Hello, can someone point me to where there are some demo programs for working with GPIO as individual pins and creating a bus from a number of outputs. I am also looking for a demo program with general s/w based timers, for example, in mbed which is what I am porting from, you would do

thread_sleep_for(1000);  // 1ms timer or delay

and to create a bus

BusOut select_drv(dp11,dp4, dp5, dp6, dp9, dp10); //creates a bus called select_drv

thanks

AndrewR

 

(I attached the code)

 

    This topic has been closed for replies.
    Best answer by TDK

    There is no "create a bus" function in HAL. You can control individual pins with HAL_GPIO_WritePin.

    A delay of 1-2ms can be done with HAL_Delay(1)

    3 replies

    Technical Moderator
    January 30, 2025

    Hello,

    For MBED questions please open a thread in their community.

    AndrewRAuthor
    Explorer II
    January 30, 2025

    Hello, I'm trying to get away from mbed* and on to a stable dev platform which is why I came here.  I really want to avoid using mbed moving forward and I dont want or need anyone to write or debug my code.I'm just looking for STM32Cube IDE demo programs so I can see how to work with the peripherals - are these available anywhere? Is there a repository where I can get these?

    Regards

    AndrewR

     

    *mbed is going to be closed down in 2026, and developers are leaving the platform. There isn't any point in remaining with it.

    Technical Moderator
    January 30, 2025

    In that case you need to tell which board you are using in order to guide you efficiently.

    AndrewRAuthor
    Explorer II
    January 30, 2025

    Hi, I am using the NUCLEO-GO31K8

    TDKAnswer
    Super User
    January 30, 2025

    There is no "create a bus" function in HAL. You can control individual pins with HAL_GPIO_WritePin.

    A delay of 1-2ms can be done with HAL_Delay(1)