Hi all.
I was using the MSP430F5529 eval board and I had set the mclk to around 33 MHz. What I am trying to do is toggle a GPIO pin (or any other pin) on the micro at a frequency as close to 20MHz as possible. The code I use for toggling is -
for (; ;)
P1OUT ^= BIT0;
One of the previous posts say that the for and the toggle statement will take around 12 to 15 cycles to execute so the max. toggle frequency I am looking at is 33/15 = around 2 MHz.
I know this is a limitation of the micro, but is there any other way of increasing the toggle frequency of the I/O pins to bring it upto 20 MHz, maybe like using a timerA on an I/O pin etc.? I know I can set the MClk to 20MHz and bring it out on a pin, but I need to do some more calculations with the toggle freq. (phase shift etc.) so I need to toggle a GPIO pin that I can control easily by keeping it in a for loop. Also, is 50MHz the max. MClk freq for the MSP430F5529?
Do let me know. Help will be greatly appreciated ...
Thanks ...
z.