Hi
I have recently moved into starterware--beagleBone and finding a great difficulty to program beagleBone (rev A5) using Code composer studio v5.3 with a starterware AM335X_StarterWare_02_00_00_07. It appears that beagleBone runs very slow. I doubt there will be another simpler code than the one below to determine the execution speed of the beagleBone.
#include "soc_AM335x.h"
#include "beaglebone.h"
#include "gpio_v2.h"
/*****************************************************************************
** INTERNAL MACRO DEFINITIONS
*****************************************************************************/
#define GPIO_INSTANCE_ADDRESS (SOC_GPIO_1_REGS)
#define GPIO_INSTANCE_PIN_NUMBER (23)
#define beaglebone
/*
** The main function. Application starts here.
*/
int main()
{
/* 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);
while(1)
{
/* Driving a logic HIGH on the GPIO pin. */
GPIOPinWrite(GPIO_INSTANCE_ADDRESS,
GPIO_INSTANCE_PIN_NUMBER,
GPIO_PIN_HIGH);
/* Driving a logic LOW on the GPIO pin. */
GPIOPinWrite(GPIO_INSTANCE_ADDRESS,
GPIO_INSTANCE_PIN_NUMBER,
GPIO_PIN_LOW);
}
}
=========================Results ==================================
Time from Pin High to Pin Low : 660 ns
Time from Pin Low to Pin High : 1.72 us
I have both the USB and the dc power connected to the B.bone. I have read various posts such as "Creating a new CSS5 project for Beaglebone", "AM335x (Beaglebone) execution speed" and few more, where all of them had issue with the exeution speed. ??????? Well,
1) Cannot figure out the reason behind it? Also, how exactly the compiler is confguring the peripherals? I have a doubt that the clocks are not properly initialized. There is a very liitle literature, to the my best of knowledge, for initializating the beagleBone using starterware-ccs.
2) Sometimes I get the following message when I try to connect to the TI XDS100v2 USB Emulator _0/CortexA8? Don't know how to lower TCLK, or is it just a glitch. Solution that i have practised: remove all the connecting cables to B.bone and the dc power; and at next try it WORKS fine ????
Error connecting to the target:
(Error -1204 @ 0x3D5B)
Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
(Emulation package 5.0.857.0)
3) Could someone please refer me a well documented literature on starting with B.bone with starterware-ccs. I am trying to implement an algorithm where most of the computations are multplications of floating numbers and finally setting and resetting the GPIOs. http://processors.wiki.ti.com/index.php/StarterWare and its associated links does not seems to helping, for a beginner atleast.
I will appreciate your help