Without implementing a timer, I had thought that toggling a GPIO pin and observing the result via a logic analyzer(has 100Megasample/sec). The Microblaze input clock is coming from the "ui_clk" from the MIG, which seems to be 83 MHz, but when observing the pin toggle the frequency is ~37 kHz. My method for toggling the pin is just an infinite while loop with two Xil_Out32 commands, one for turning the pin on, and the other command turns it off. Any debugging methods I should try as to why the frequency of this switching is so low?
p.s. I've since moved from toggling via the xil_out function and am targeting the address of the GPIO pins directly, the frequency I'm seeing now is 130.7kHz, still nowhere near the 80MHz I had been expecting.
p.s.s. I've enabled caches and tried block ram vs ddr and the max i've gotten to is 1.3Mhz
The following is all of the code in my program for this test:
#include "platform.h"
int main(void)
{
init_platform();
volatile unsigned int *pins = (volatile unsigned int *) 0x40000000;
for(;;){
pins[0] ^= 0x1;
}
cleanup_platform();
}
Question
Nystflame
Hello,
Without implementing a timer, I had thought that toggling a GPIO pin and observing the result via a logic analyzer(has 100Megasample/sec). The Microblaze input clock is coming from the "ui_clk" from the MIG, which seems to be 83 MHz, but when observing the pin toggle the frequency is ~37 kHz. My method for toggling the pin is just an infinite while loop with two Xil_Out32 commands, one for turning the pin on, and the other command turns it off. Any debugging methods I should try as to why the frequency of this switching is so low?
p.s. I've since moved from toggling via the xil_out function and am targeting the address of the GPIO pins directly, the frequency I'm seeing now is 130.7kHz, still nowhere near the 80MHz I had been expecting.
p.s.s. I've enabled caches and tried block ram vs ddr and the max i've gotten to is 1.3Mhz
The following is all of the code in my program for this test:
#include "platform.h"
int main(void)
{
init_platform();
volatile unsigned int *pins = (volatile unsigned int *) 0x40000000;
for(;;){
pins[0] ^= 0x1;
}
cleanup_platform();
}
Best Regards,
nystflame
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.