- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I made a very simple test jig , where the system clock is set to 48MHz, no dividers. I am simply toggling a pin.
int main()
{
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
/* CyGlobalIntEnable; */ /* Uncomment this line to enable global interrupts. */
for(;;)
{
SCLK_Write(0x01);
SCLK_Write(0x00);
/* Place your application code here. */
}
}
but I am not seeing the pin toggle at nearly the rate I would expect given the system clock speed. Frequency of the output is 350kHz, so it is 48MHz/350kHz = 137 off from 48MHz. I have a hard time believing that there are so many cycles per instruction. Rather, I am thinking something is not configured quite right in my project. What could it be?
Also, why is there a question mark under Desired for Sysclk?
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This sped up the signals to 1.5Mhz, certainly better. Is there any way to speed this up further? Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cannot see the question mark 😉
Can you post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file. Also, tell us what board you used, Cypress Kit? Which one?? Self-made???
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also this Document on GPIO pin uses. http://www.cypress.com/documentation/application-notes/an86439-psoc-4-using-gpio-pins. There are also example programs for each example in the Document.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now I see what you mean! Toggling a pin to its maximum speed by using the CPU is of no use:
- You have no control over the duty-cycle
- You are burning all your MIPS
- When interrupts fire there will be tremendous jitter
- The clock will be always non symetric caused by the jump in the loop
For having a pin to output a frequency always use a PWM or a timer, you may even output a clock directly. This will avoid all the problems from above.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hii Bob:
That was just a test jig for evaluating speed of operation. I was trying to determine why my bit banged spi bus was running so slowly. It doesn't run continuously, only occasionally and I did not lay out the board to take advantage of the built in SPI driver. I will do that on my next board spin. Thanks