Hi,
I'm running a code in Baremetal mode using starterware and trying to execute certain low level operation if possible under 1 us.
I did some simple test on simple instruction like the below snippet and found out that the below snippet executes more than 3us :
unsigned int motors[16];
_Bool motorsEnabled[16];
static void test(void){
motorsEnabled[10] = TRUE;
motors[10] = 1500;
unsigned int start = ticks;
if(motorsEnabled[10] && (abs(start - motors[10]) < 7))
{
}
GPIOMultiplePinsWrite(GPIO_1_INSTANCE_ADDRESS, 3 << LED_1, 0);
unsigned int end = ticks;
UARTprintf("Start: %d ", start);
UARTprintf("End: %d ", end);
UARTprintf("Dist: %d ", end-start);
}
ticks is just a macro that read Timer4 counter register, Timer4 has been set to use 24Mhz input clock. The 3 us figure that I got is based on the difference between start and end devide by 24.
If i understand correctly by looking at bootloader code, beaglebone should runs at 720Mhz (Is powering by USB affecting this speed). My expectation might be wrong, but I'm expecting that with the core speed of 720Mhz, the instruction should be bellow 1 us, is my expectation correct? Any way to speed up the execution?
Please bear with me since this is the first time I'm dealing with SoC, previouslly just play around with simple uC that is not as complex as AM335x.
Any explanation is greatlly appreciated.
Regards,
Yovi