This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem with AM335X BeagleBone Black

Hi I'm trying to run an example of gpio of starterware for BEAGLEBONE. I want to use a delay for the user LEDs. I'm using the library delay.h.and it does not work does nothing. you can help me? thank you very much, the program is as follows .....

#include "soc_AM335x.h"
#include "beaglebone.h"
#include "gpio_v2.h"
#include "interrupt.h"
#include "dmtimer.h"
#include "delay.h"

#define GPIO_INSTANCE_ADDRESS           (SOC_GPIO_1_REGS)
#define GPIO_INSTANCE_PIN_NUMBER        (23)

int main(void)
{
  
    /* Enabling functional clocks for GPIO1 instance. */
    GPIO1ModuleClkConfig();

    /* Selecting GPIO1[23] pin for use. */
    GPIO1Pin23PinMuxSetup();
    
    /* Enabling the GPIO module. */
    GPIOModuleEnable(GPIO_INSTANCE_ADDRESS);

    /* Resetting the GPIO module. */
    GPIOModuleReset(GPIO_INSTANCE_ADDRESS);

    /* Setting the GPIO pin as an output pin. */
    GPIODirModeSet(GPIO_INSTANCE_ADDRESS,
                   GPIO_INSTANCE_PIN_NUMBER,
                   GPIO_DIR_OUTPUT);
    DelayTimerSetup();
    while(1)
    {
        /* Driving a logic HIGH on the GPIO pin. */
        GPIOPinWrite(GPIO_INSTANCE_ADDRESS,
                     GPIO_INSTANCE_PIN_NUMBER,
                     GPIO_PIN_LOW);

        delay(200);

        /* Driving a logic LOW on the GPIO pin. */
        GPIOPinWrite(GPIO_INSTANCE_ADDRESS,
                     GPIO_INSTANCE_PIN_NUMBER,
                     GPIO_PIN_HIGH);

       delay(200);
    }

} 

  • Moving this to the Starterware forum.
  • Hello Jon Jon,

    dealy.h is an include file which has delay() function declaration not a definition. 

    dealy() function was defined in the utilis library in the starterware.

    please add the utils library path of starterware to the ARM linker-->File Serach paths in your project properties.

    Build the project and run it. It should work.

    Regards

    Rama Krishna

  • Rama Krishna thank you very much . I 'll try and tell you the result. thanks for your time and sorry for my bad English .

    jon

  • Hello again, I have reviewed the libraries and see that they are correctly.
    I do not understand does not run
    Am i doing something wrong?
    Thank you
    jon

  • Can someone help me out? for me it is important to know how to generate delays with starterware libraries . Thank you

  • Hello Jon,
    Delay API are defined in the utils library and platform library.
    import both the projects into the workspace and build the projects.
    build your Application.

    Please check weather delay API files are added in your platform project or not.

    Regards
    Rama Krishna
  • Hello rama  I think everything is fine, but does not run . It is very strange , I have not modified any library. and the file not been modified to MLO . if I run other programs but not this particular.

    thanks

    jon

  • Hello again, anyone can help me?   I take one week trying to run a single delay, something that seems so simple, I have a little desperate.
    my code is well done?
    I added all the api project, to do something else?
    All my projects bare metal work well with MLO and app files.
    This same project runs well without delay.
    any suggestions?
    Thank you

  • Hello Jon Jon,
    you are using delay API, which are defined in the utils library, which inturns call the API's defined in the platform library.

    if you look close in sysdelay.c(beagle bone platform library), it using the interrupts for delay, but in your code interrupt sub system is not enabled at all.
    So please add the below lines in your code at starting.

    /* Enabling IRQ in CPSR of ARM processor. */
    IntMasterIRQEnable();

    /* Initializing the ARM Interrupt Controller. */
    IntAINTCInit();

    I hope this will solve your problem

    Regards
    Rama Krishna

  • I've made ​​the changes and it works perfectly . thank you. that was what was needed to to run.

    thank you very much helped me a lot

  • HI

    1. I updated the board with latest debian image but later to work on opencv I have updated it with ubuntu image since then the board is not visible in my system as usb drive.

    2. The node and bonescript are not supporting on the above said board to interface motor, camera and sensors

    3. The board eMMC is full so I am unable to write or transfer the files from BBB to server to make space or delete files which I have installed on it

    4. While using SD card for programming the expanding memory on sd card itself big headache and on PuTTY got fatal error: connection refused.

    If you have any queries / suggestions please let me know and help me to pass on this hurdle.